aws / aws/bedrock-agentcore-sdk-python
Multi-agent (Graph) session support missing from AgentCoreMemorySessionManager
- Dominant language
- Python
- Stars
- 761
- Forks
- 147
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 7
Description
### Summary
`AgentCoreMemorySessionManager` (at
[`src/bedrock_agentcore/memory/integrations/strands/session_manager.py`](https://github.com/aws/bedrock-agentcore-sdk-python/blob/main/src/bedrock_agentcore/memory/integrations/strands/session_manager.py))
does not implement the three multi-agent methods on Strands'
`SessionRepository` interface (`create_multi_agent`,
`read_multi_agent`, `update_multi_agent`). As a result, any Strands
`Graph` that uses `AgentCoreMemorySessionManager` fails at graph
build time with `NotImplementedError`, before any AWS API call is
even attempted.
The single-agent methods (`create_agent`, `read_agent`,
`update_agent`, etc.) are fully implemented. The gap is only in the
multi-agent methods, which were added to `SessionRepository`
upstream and default to raising.
### Impact
Any workflow that wants Graph-level session persistence with
AgentCore Memory is blocked. Examples:
- Classifier-routed multi-agent graphs (the Strands docs' own
[Interactive Customer Support](https://strandsagents.com/docs/user-guide/concepts/multi-agent/multi-agent-patterns/)
canonical Graph example)
- Workflows that use Strands interrupts for human-in-the-loop
steps, which require Graph nodes because the Agents-as-Tools
pattern swallows interrupts
### Reproduction
Minimal repro repo: https://github.com/akomandooru/agentcore-graph-repro/
Two scripts, broken and fixed, both using the real
`AgentCoreMemorySessionManager` from this SDK:
- `repro_broken.py` constructs `AgentCoreMemorySessionManager`,
attaches it to a two-node `GraphBuilder`, and calls `.build()`.
Fails with `NotImplementedError: MultiAgent is not implemented for
this repository`. No AWS credentials needed; the error fires before
any API call.
- `repro_fixed.py` subclasses `AgentCoreMemorySessionManager` with the
three methods and demonstrates graph state serialising and
round-tripping cleanly.
```
File ".../strands/multiagent/graph.py", line 390, in build
return Graph(nodes=self.nodes.copy(), ...)
File ".../strands/multiagent/graph.py", line 476, in __init__
run_async(lambda: self.hooks.invoke_callbacks_async(MultiAgentInitializedEvent(self)))
File ".../strands/hooks/registry.py", line 306, in invoke_callbacks_async
callback(event)
File ".../strands/session/session_manager.py", line 54, in
registry.add_callback(MultiAgentInitializedEvent, lambda event: self.initialize_multi_agent(event.source))
File ".../strands/session/repository_session_manager.py", line 332, in initialize_multi_agent
self.session_repository.create_multi_agent(self.session_id, source, **kwargs)
File ".../strands/session/session_repository.py", line 58, in create_multi_agent
raise NotImplementedError("MultiAgent is not implemented for this repository")
NotImplementedError: MultiAgent is not implemented for this repository
```
`self.session_repository` here is `AgentCoreMemorySessionManager`.
The MRO hops right past it into `SessionRepository` because the
AgentCore class doesn't override the multi-agent methods.
### Proposed fix
Add three methods to `AgentCoreMemorySessionManager`, mirroring the
single-agent pattern. Full implementation in
[`repro_fixed.py`](https://github.com/akomandooru/agentcore-graph-repro/blob/main/repro_fixed.py). ~50 lines, mostly
boilerplate matching the existing single-agent methods.
Additions beyond the method bodies:
1. New `stateType` value: `"MULTI_AGENT"` (alongside `"SESSION"`
and `"AGENT"`).
2. New metadata key `multiAgentId` (alongside `agentId`) so
multiple graphs in a session don't collide.
Payload is `json.dumps(multi_agent.serialize_state())`.
`update_multi_agent` delegates to `create_multi_agent` because
AgentCore Memory is append-only and `list_events(max_results=1)`
returns the latest by timestamp, same pattern as the existing
`update_agent`.
### Willing to contribute
Happy to open a PR with the fix if the approach (new `stateType`
value, new `multiAgentId` metadata key, append-only with max_results=1
reads) is the one you'd take. Flagging as a question first in case
there's a planned design that differs.
### Environment
- `bedrock-agentcore` 1.9.0 (latest published wheel as of
May 11, 2026; verified that the three multi-agent methods are
absent by inspecting the installed
`src/bedrock_agentcore/memory/integrations/strands/session_manager.py`,
which also matches `main`)
- `strands-agents` 1.39.0
- Python 3.13
---
Contributor guide
Assessment
This issue has not been assessed yet.