chore: update namespace design for data plane#1114
Conversation
Coverage Report
|
|
Blocker: generated Python agent code will fail at runtime — In memory_client.retrieve_memories(memory_id=memory_id, namespace_path=f'/users/{user_id}/facts', ...)But the # bedrock_agentcore/memory/client.py @ 1.8.0
def retrieve_memories(
self, memory_id: str, namespace: str, query: str, actor_id: Optional[str] = None, top_k: int = 3
):So every agent generated with This is distinct from the raw data‑plane SDK ( Options:
|
|
Public web-UI API types are not updated — frontend can't send The server handler in // api-types.ts (unchanged by this PR)
// GET /api/memory?memoryName=xxx&namespace=yyy[&strategyId=zzz] <-- comment still documents old shape
...
/** Request body for POST /api/memory/search */
export interface RetrieveMemoryRecordsRequest {
memoryName: string;
namespace: string; // <-- still required, no `namespacePath` option
searchQuery: string;
strategyId?: string;
}These types are exported from the package specifically so the frontend (
Please also update |
This is expected. The following PR adds the missing field in the SDK: aws/bedrock-agentcore-sdk-python#449 |
52cfdee to
3f47058
Compare
Description
Adds support for the new
namespacePathdata-plane field introduced by the memory namespace redesign.namespacePathis a hierarchical path-prefix filter that sits alongside the existing namespace field on ListMemoryRecords and RetrieveMemoryRecords. The existing namespace field will migrate to function as exact-match.Replaced required namespace with unions for the option types. Forcing callers to supply exactly one of namespace / namespacePath at compile-time. Defensive runtime validation is kept for paths that bypass the type system (JSON body from web UI requests).
Type of Change
Testing
How have you tested the change?
npm run test:unitandnpm run test:integnpm run typechecknpm run lintsrc/assets/, I rannpm run test:update-snapshotsand committed the updated snapshotsChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.