feat: add claude-agent-a2a app#236
Open
Tehsmash wants to merge 11 commits into
Open
Conversation
A2A protocol server wrapping the Claude Agent SDK. Maps A2A context_id directly to Claude session_id for multi-turn conversation continuity, with each A2A task running a single query() call until ResultMessage. Supports two configurable transport bindings via agent.yaml: - JSON-RPC / HTTP+JSON over FastAPI/uvicorn - SLIM RPC via slima2a, with connection config loaded from slim.yaml A custom add_artifact MCP tool lets Claude attach structured output as A2A TaskArtifactUpdateEvents. Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
- slima2a now sourced from agntcy/slim-a2a-python main (pins a2a-sdk==1.1.0), so the a2a-sdk override and slim-bindings git source are no longer needed - _run_slimrpc now uses slima2a.slim_helper.initialize_slim_service and connect_and_subscribe instead of load_slim_config (which was only on the slim-bindings PR branch) - SLIM connection params (url, namespace, group, name, secret) moved into agent.yaml under bindings.slimrpc Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Add use_slim_config: bool to SlimRpcBindingConfig. When true, _run_slimrpc calls slim_bindings.load_slim_config() + create_app_from_slim_config() to load all connection details (node address, app name, auth) from slim.yaml discovered via hierarchical walk-up from cwd. When false the explicit url/namespace/group/name/secret fields in agent.yaml are used as before. slim-bindings sourced from feat/hierarchical-slim-config-loading branch (PR#21) which adds load_slim_config(); slim-bindings>=2 override retained to satisfy slima2a's <2 upper bound. Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a new
claude-agent-a2aapplication — an A2A protocol server that wraps the Claude Agent SDK, making Claude accessible to any A2A-compatible agent or orchestrator.Key design decisions:
context_id= Claudesession_id: useslist_sessions()to detect existing sessions and resume them, otherwise starts a new session pinned to the A2A-supplied UUID, giving multi-turn conversation continuity across tasks in the same context.query()call: each task runs untilResultMessageis received.add_artifactMCP tool: a custom in-process MCP tool lets Claude attach structured output as A2ATaskArtifactUpdateEvents.agent.yaml: each transport (JSON-RPC over HTTP, SLIM RPC) has anenabledflag; only active bindings are registered and advertised in the AgentCard.slim.yamlusing the config loader from slim-bindings#21.Example
agent.yamlUsage
cd claude-agent-a2a uv sync uv run a2a-claude-agentType of Change
Checklist