Documentation
¶
Index ¶
Constants ¶
View Source
const ( // AgentCardRoute is the well-known HTTP path for the A2A Agent Card. AgentCardRoute = "/.well-known/agent.json" // ContentTypeJSON is the MIME type for JSON responses. ContentTypeJSON = "application/json" // SkillTagOrchestration tags the root agent skill. SkillTagOrchestration = "orchestration" // SkillTagSubAgentPrefix prefixes sub-agent skill tags. SkillTagSubAgentPrefix = "sub_agent:" )
Variables ¶
This section is empty.
Functions ¶
func LoadRemoteAgents ¶
func LoadRemoteAgents(remotes []config.RemoteAgentConfig, logger *zap.SugaredLogger) ([]agent.Agent, error)
LoadRemoteAgents creates ADK agents from the configured remote A2A agent list. Each remote agent can be used as a sub-agent in the orchestrator.
Types ¶
type AgentCard ¶
type AgentCard struct {
Name string `json:"name"`
Description string `json:"description"`
URL string `json:"url"`
Skills []AgentSkill `json:"skills"`
// P2P extensions
DID string `json:"did,omitempty"`
Multiaddrs []string `json:"multiaddrs,omitempty"`
Capabilities []string `json:"capabilities,omitempty"`
Pricing *PricingInfo `json:"pricing,omitempty"`
ZKCredentials []ZKCredential `json:"zkCredentials,omitempty"`
}
AgentCard is a simplified representation of the A2A Agent Card served at /.well-known/agent.json.
type AgentSkill ¶
type AgentSkill struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Tags []string `json:"tags,omitempty"`
}
AgentSkill describes a capability of the agent.
type PricingInfo ¶
type PricingInfo struct {
Currency string `json:"currency"`
PerQuery string `json:"perQuery,omitempty"`
PerMinute string `json:"perMinute,omitempty"`
ToolPrices map[string]string `json:"toolPrices,omitempty"`
}
PricingInfo describes the pricing for an agent's services.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server exposes a Lango agent as an A2A-compatible server.
func (*Server) RegisterRoutes ¶
func (s *Server) RegisterRoutes(mux interface { Get(string, http.HandlerFunc) })
RegisterRoutes mounts the A2A routes on the given HTTP mux. - GET /.well-known/agent.json — serves the Agent Card
func (*Server) SetP2PInfo ¶
SetP2PInfo adds P2P networking information to the agent card.
func (*Server) SetPricing ¶
func (s *Server) SetPricing(pricing *PricingInfo)
SetPricing sets the pricing information on the agent card.
Click to show internal directories.
Click to hide internal directories.