Normandy.A2A.Server
(normandy v0.6.2)
View Source
Exposes Normandy agents as A2A-compatible endpoints.
Provides logic for building agent cards from Normandy agent configurations and handling incoming A2A messages by routing them through the agent.
This module provides the logic layer only - it does not start an HTTP server. Integrate it into your web framework (e.g., Phoenix controller or Plug).
Example
# Build agent card
card = Normandy.A2A.Server.build_agent_card(agent_config,
name: "My Agent",
description: "Helps with tasks",
url: "https://myapp.com/a2a",
version: "1.0.0"
)
# Handle incoming message (in your controller)
{:ok, task} = Normandy.A2A.Server.handle_message(agent_config, a2a_message)
Summary
Functions
Builds a Claudio.A2A.AgentCard from a Normandy agent configuration.
Handles an incoming A2A message by routing it through the agent.
Functions
@spec build_agent_card( Normandy.Agents.BaseAgentConfig.t(), keyword() ) :: Claudio.A2A.AgentCard.t()
Builds a Claudio.A2A.AgentCard from a Normandy agent configuration.
Introspects registered tools to generate skill descriptions.
Required Options
:name- Agent name:description- Agent description
Optional
:url- A2A endpoint URL:version- Agent version:provider_url- Provider URL:provider_org- Provider organization name
@spec handle_message(Normandy.Agents.BaseAgentConfig.t(), Claudio.A2A.Message.t()) :: {:ok, Claudio.A2A.Task.t()} | {:error, term()}
Handles an incoming A2A message by routing it through the agent.
Returns a Claudio.A2A.Task with the result as an artifact.