Documentation
¶
Overview ¶
Package a2a provides a factory for creating A2A protocol servers. This eliminates ~350 lines of boilerplate per agent.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Agent is the ADK agent to expose via A2A protocol.
Agent agent.Agent
// Port is the port to listen on. If empty, a random port is used.
Port string
// Description overrides the agent's description in the agent card.
// If empty, uses the agent's built-in description.
Description string
// InvokePath is the path for the invoke endpoint. Default is "/invoke".
InvokePath string
// ReadHeaderTimeout is the timeout for reading request headers.
// Default is 10 seconds.
ReadHeaderTimeout time.Duration
// SessionService is the session service for the executor.
// If nil, uses in-memory session service.
SessionService session.Service
}
Config holds the configuration for an A2A server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server wraps an A2A protocol server with convenient lifecycle methods.
func NewServer ¶
NewServer creates a new A2A server for the given agent. This is a factory that eliminates ~70 lines of boilerplate per agent.
func (*Server) AgentCardURL ¶
AgentCardURL returns the URL of the agent card endpoint.
func (*Server) StartAsync ¶
StartAsync starts the A2A server in the background. Returns immediately. Use Stop() to shut down the server.
Click to show internal directories.
Click to hide internal directories.