Repository navigation
Built a stateless A2A-to-MCP bridge with cross-instance task recovery #2444
aarushitandon0
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone!
I've been working on [a2a-mcp-bridge](https://github.com/aarushitandon0/a2a-mcp-bridge), an open-source Python bridge that exposes A2A 1.0 agent skills as MCP tools.
The problem I wanted to explore was how to preserve access to long-running A2A tasks without maintaining task mappings inside the bridge.
For example, an A2A agent might pause a task to request additional input. If the bridge instance that initiated the request crashes, another instance should still be able to resume that same task without depending on the original process's memory.
I approached this using CBOR-encoded, AES-256-GCM-sealed task handles that carry the remote agent ID, task ID, context ID, and expiry. Any bridge instance with the appropriate configuration and encryption key can resolve the handle and continue interacting with the original A2A task.
Some of the implementation details:
INPUT_REQUIREDandAUTH_REQUIREDinterruptions.I also tested the architecture with three bridge instances behind a round-robin load balancer. I terminated the instance that initiated a task, resumed it through another instance, and confirmed completion. The repository includes reproducible demonstrations for instance failure, full-pool restarts, and key rotation.
Repository: https://github.com/aarushitandon0/a2a-mcp-bridge
Reproducible demo:
python demo/run_local.py(after installing the project)I'd particularly appreciate feedback on the A2A task lifecycle integration, authentication handling, and compatibility considerations I might have missed when working with different A2A agents.
Thanks!
All reactions