Skip to content

feat: add claude-agent-a2a app#236

Open
Tehsmash wants to merge 11 commits into
mainfrom
feat/claude-agent-a2a
Open

feat: add claude-agent-a2a app#236
Tehsmash wants to merge 11 commits into
mainfrom
feat/claude-agent-a2a

Conversation

@Tehsmash

@Tehsmash Tehsmash commented Jul 9, 2026

Copy link
Copy Markdown
Member

Description

Adds a new claude-agent-a2a application — an A2A protocol server that wraps the Claude Agent SDK, making Claude accessible to any A2A-compatible agent or orchestrator.

Key design decisions:

  • A2A context_id = Claude session_id: uses list_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.
  • A2A task = one query() call: each task runs until ResultMessage is received.
  • add_artifact MCP tool: a custom in-process MCP tool lets Claude attach structured output as A2A TaskArtifactUpdateEvents.
  • Config-driven binding registration via agent.yaml: each transport (JSON-RPC over HTTP, SLIM RPC) has an enabled flag; only active bindings are registered and advertised in the AgentCard.
  • SLIM RPC support via slima2a: connection details (node address, app name, auth) are loaded from slim.yaml using the config loader from slim-bindings#21.

Example agent.yaml

agent:
  name: "Claude Agent"
  organization: "agntcy"

bindings:
  jsonrpc:
    enabled: true
    host: "0.0.0.0"
    port: 45000
  slimrpc:
    enabled: true   # reads connection details from slim.yaml

Usage

cd claude-agent-a2a
uv sync
uv run a2a-claude-agent

Type of Change

  • Bugfix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

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>
@Tehsmash
Tehsmash requested a review from a team as a code owner July 9, 2026 16:36
@Tehsmash
Tehsmash requested a review from adamtagscherer July 9, 2026 16:36
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Tehsmash added 10 commits July 13, 2026 09:19
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants