Skip to content

API Reference parrot.bots.flows.agents.a2a_orchestrator

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.bots.flows.agents.a2a_orchestrator

View source

A2A-Enhanced Orchestrator Agent.

Moved from parrot.bots.orchestration.a2a_orchestrator to parrot.bots.flows.agents.a2a_orchestrator (FEAT-143).

Import paths are recalculated for the new package depth. OrchestratorAgent is now imported from the sibling module .orchestrator instead of .agent. All class signatures are preserved; no API changes.

Alias A2AAgentConnection

Re-exported from parrot.a2a.client.A2AAgentConnection.

Alias A2AClient

Re-exported from parrot.a2a.client.A2AClient.

Alias A2AClientMixin

Re-exported from parrot.a2a.mixin.A2AClientMixin.

Class A2AOrchestratorAgent

An orchestrator agent that supports both local and remote A2A agents.

This class combines the OrchestratorAgent's ability to coordinate local specialized agents with A2AClientMixin's remote agent communication.

Example::

orchestrator = A2AOrchestratorAgent(
    name="HybridOrchestrator",
    llm="google:gemini-3.1-flash-lite-preview"
)
await orchestrator.configure()

# Add local agents
local_agent = BasicAgent(name="Analyst", llm="openai:gpt-4")
await local_agent.configure()
orchestrator.add_agent(local_agent)

# Add remote A2A agents
await orchestrator.add_a2a_agent("http://localhost:8082")
await orchestrator.add_a2a_agent("http://localhost:8083")

# Now orchestrator can use both local and remote agents
response = await orchestrator.ask("Analyze data and summarize")
Parameter Type Default Description
name str 'A2AOrchestratorAgent' Name of the orchestrator.
orchestration_prompt str None Custom system prompt (optional).
a2a_endpoints Optional[List[str]] None List of A2A agent URLs to connect to on startup.
auto_discover bool False If True, automatically discover agents from endpoints.
**kwargs {} Additional arguments for parent classes.

Method A2AOrchestratorAgent.configure

Configure the A2AOrchestratorAgent.

This sets up:

  • Base orchestrator configuration
  • The discovery tool
  • Auto-connects to configured A2A endpoints

configure(app=None) -> None

Parameter Type Default Description
app None

Method A2AOrchestratorAgent.list_all_agents

List all agents (both local and remote).

list_all_agents() -> Dict[str, List[str]]

Returns: Dict[str, List[str]] — Dict with 'local' and 'remote' keys containing agent names.

Method A2AOrchestratorAgent.get_all_agent_stats

Get statistics about all agent usage.

get_all_agent_stats() -> Dict[str, Any]

Returns: Dict[str, Any] — Dict with orchestration stats and A2A connection info.

Method A2AOrchestratorAgent.shutdown

Shutdown orchestrator and cleanup all connections.

shutdown(**kwargs) -> None

Parameter Type Default Description
**kwargs {}

Alias AbstractTool

Re-exported from parrot.tools.abstract.AbstractTool.

Alias AbstractToolArgsSchema

Re-exported from parrot.tools.abstract.AbstractToolArgsSchema.

Class DiscoverA2AAgentsInput

Input schema for ListAvailableA2AAgentsTool.

Attributes:

Attribute Type Description
endpoints Optional[List[str]]
register_as_tools bool

Class ListAvailableA2AAgentsTool

Tool that discovers available A2A agents from specified endpoints.

This tool allows the LLM to dynamically discover what remote agents are available for orchestration tasks.

Parameter Type Default Description
orchestrator 'A2AOrchestratorAgent' The A2AOrchestratorAgent instance to manage connections.
**kwargs {}

Attributes:

Attribute Type Description
name str
description str
args_schema Type[BaseModel]

Alias OrchestratorAgent

Re-exported from parrot.bots.flows.agents.orchestrator.OrchestratorAgent.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally