Skip to main content

UseAGUIOptions

Agent Runtimes


Agent Runtimes / hooks/useAgUi / UseAGUIOptions

Interface: UseAGUIOptions

Defined in: hooks/useAgUi.tsx:14

Properties

agentId?

optional agentId?: string

Defined in: hooks/useAgUi.tsx:22

Agent ID to use (default: 'demo-agent')


autoConnect?

optional autoConnect?: boolean

Defined in: hooks/useAgUi.tsx:26

Auto-connect on mount


baseUrl?

optional baseUrl?: string

Defined in: hooks/useAgUi.tsx:18

Base URL for the AG-UI endpoint (e.g., http://localhost:8000).


onError?

optional onError?: (error) => void

Defined in: hooks/useAgUi.tsx:38

Callback when an error occurs

Parameters

error

Error

Returns

void


onMessageReceived?

optional onMessageReceived?: (message) => void

Defined in: hooks/useAgUi.tsx:34

Callback when a message is received

Parameters

message

Message

Returns

void


onMessageSent?

optional onMessageSent?: (content) => void

Defined in: hooks/useAgUi.tsx:30

Callback when a message is sent

Parameters

content

string

Returns

void