You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(memory): use namespacePath for hierarchical memory retrieval (#95)
AgentCore Memory's RetrieveMemoryRecords API changed how the `namespace`
parameter works: it used to do prefix-match, now it does exact-match. AWS
introduced a new `namespacePath` field for the prior hierarchical
(prefix) semantics. Existing accounts get a 120-day grace period before
the legacy behavior is removed.
ABCA's episodic retrieval relies on prefix-match: per-task records live
at `/{actorId}/episodes/{sessionId}/`, but the orchestrator queries
`/{actorId}/episodes/`. Under exact-match, that query silently returns
zero records — the agent loses access to past task episodes with no
visible failure. Migrating both reads in loadMemoryContext to
`namespacePath` preserves the intended retrieval semantics and is
forward-compatible once the grace window closes.
Also bumps `@aws-sdk/client-bedrock-agentcore` from `^3.1021.0` (which
predates the new field) to `^3.1046.0`.
Refs:
- API reference: https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_RetrieveMemoryRecords.html
- Best-practice blog: https://aws.amazon.com/blogs/machine-learning/organizing-agents-memory-at-scale-namespace-design-patterns-in-agentcore-memory/
Co-authored-by: bgagent <bgagent@noreply.github.com>
- Reads use the `namespacePath` field on [`RetrieveMemoryRecords`](https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_RetrieveMemoryRecords.html) for hierarchical retrieval — episodic records live one level below the parent path so a hierarchical query is required to surface them.
- Reads use the `namespacePath` field on [`RetrieveMemoryRecords`](https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_RetrieveMemoryRecords.html) for hierarchical retrieval — episodic records live one level below the parent path so a hierarchical query is required to surface them.
0 commit comments