Skip to content

add server for a2a#24

Merged
Iamsdt merged 1 commit into10xHub:mainfrom
atharvacoolkni:main
Mar 30, 2026
Merged

add server for a2a#24
Iamsdt merged 1 commit into10xHub:mainfrom
atharvacoolkni:main

Conversation

@atharvacoolkni
Copy link
Copy Markdown
Contributor

@atharvacoolkni atharvacoolkni commented Mar 24, 2026

This pull request adds support for running an A2A-protocol-compliant agent server in the CLI, allowing users to expose their agentflow graphs as A2A-compatible services. It introduces a new CLI command (a2a), provides configuration and customization options via both CLI flags and agentflow.json, and includes a working example for a currency conversion agent with a custom executor. The changes also add an optional dependency group for A2A support.

A2A Server Feature Integration:

  • Added a new A2ACommand class in a2a.py to implement the A2A server command, including configuration loading, environment setup, agent card creation, executor resolution, and server startup using Uvicorn. The command supports overrides via CLI flags and integration with agentflow-specific executors and skills.
  • Registered the new a2a command in the CLI (main.py), with options for config, host, port, agent name, description, streaming, and logging verbosity. [1] [2]
  • Added A2A-related default constants (DEFAULT_A2A_HOST, DEFAULT_A2A_PORT, etc.) to constants.py for consistent configuration.

Example: Currency Agent with Custom Executor:

  • Added a complete example in examples/currency_agent:
    • agentflow.json demonstrates A2A configuration, including a custom executor and skills.
    • executor.py provides a custom executor that emits INPUT_REQUIRED when the LLM requests missing info.
    • graph.py defines the agent's graph, including a tool node for currency conversion using the Frankfurter API and an LLM node for conversational logic.

Dependency Management:

  • Added an a2a optional dependency group in pyproject.toml to install required packages for A2A server support.

@Iamsdt Iamsdt merged commit f11eb35 into 10xHub:main Mar 30, 2026
1 check failed
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