@@ -20,12 +20,36 @@ import (
2020 "github.com/a2aproject/a2a-go/a2a"
2121)
2222
23+ // AgentExecutor implementations translate agent outputs to A2A events.
2324type AgentExecutor interface {
24- Execute (ctx context.Context , reqCtx RequestContext , queue EventQueue ) error
25+ // Execute invokes an agent with the provided context and translates agent outputs
26+ // into A2A events writing them to the provided event queue.
27+ //
28+ // Returns an error if agent invocation failed.
29+ Execute (ctx context.Context , reqCtx RequestContext , queue EventWriter ) error
2530
26- Cancel (ctx context.Context , reqCtx RequestContext , queue EventQueue ) error
31+ // Cancel requests the agent to stop processing an ongoing task.
32+ //
33+ // The agent should attempt to gracefully stop the task identified by the
34+ // task ID in the request context and publish a TaskStatusUpdateEvent with
35+ // state TaskStateCanceled to the event queue.
36+ //
37+ // Returns an error if the cancellation request cannot be processed.
38+ Cancel (ctx context.Context , reqCtx RequestContext , queue EventWriter ) error
2739}
2840
41+ // AgentCardProducer creates an AgentCard instances used for agent discovery and capability negotiation.
2942type AgentCardProducer interface {
43+ // Card returns a self-describing manifest for an agent. It provides essential
44+ // metadata including the agent's identity, capabilities, skills, supported
45+ // communication methods, and security requirements and is publicly available.
3046 Card () a2a.AgentCard
3147}
48+
49+ // ExtendedAgentCardProducer can create both public agent cards and cards available to authenticated users only.
50+ type ExtendedAgentCardProducer interface {
51+ AgentCardProducer
52+
53+ // ExtendedCard returns a manifest for an agent which is only available to authenticated users.
54+ ExtendedCard () a2a.AgentCard
55+ }
0 commit comments