UseA2AOptions
Agent Runtimes / hooks/useA2A / UseA2AOptions
Interface: UseA2AOptions
Defined in: hooks/useA2A.tsx:33
Properties
agentId?
optionalagentId?:string
Defined in: hooks/useA2A.tsx:41
Agent ID to use (default: 'demo-agent')
autoConnect?
optionalautoConnect?:boolean
Defined in: hooks/useA2A.tsx:49
Auto-connect on mount (default: true)
baseUrl?
optionalbaseUrl?:string
Defined in: hooks/useA2A.tsx:37
Base URL for the A2A endpoint (e.g., http://localhost:8000).
onError?
optionalonError?: (error) =>void
Defined in: hooks/useA2A.tsx:65
Callback when an error occurs
Parameters
error
Error
Returns
void
onMessageReceived?
optionalonMessageReceived?: (message) =>void
Defined in: hooks/useA2A.tsx:57
Callback when a message is received
Parameters
message
Returns
void
onMessageSent?
optionalonMessageSent?: (content) =>void
Defined in: hooks/useA2A.tsx:53
Callback when a message is sent
Parameters
content
string
Returns
void
onTaskStatusChange?
optionalonTaskStatusChange?: (task) =>void
Defined in: hooks/useA2A.tsx:61
Callback when a task status changes
Parameters
task
Task
Returns
void
streaming?
optionalstreaming?:boolean
Defined in: hooks/useA2A.tsx:45
Whether to use streaming (default: true)