Documentation / @agentick/client / AgentickClientConfig
Interface: AgentickClientConfig
Defined in: client/src/client.ts:45
Configuration for AgentickClient.
Properties
baseUrl
baseUrl:
string
Defined in: client/src/client.ts:47
Base URL for the server (e.g., https://api.example.com or ws://localhost:18789)
clientId?
optionalclientId:string
Defined in: client/src/client.ts:101
Client ID for WebSocket connections
EventSource()?
optionalEventSource: (url,init?) =>EventSource
Defined in: client/src/client.ts:92
Custom EventSource constructor (SSE transport only, for Node.js polyfills)
Parameters
url
string | URL
init?
EventSourceInit
Returns
EventSource
fetch()?
optionalfetch: (input,init?) =>Promise<Response>
Defined in: client/src/client.ts:89
Custom fetch implementation (SSE transport only)
Parameters
input
string | URL | Request
init?
RequestInit
Returns
Promise<Response>
headers?
optionalheaders:Record<string,string>
Defined in: client/src/client.ts:83
Custom headers for all requests
paths?
optionalpaths:object
Defined in: client/src/client.ts:60
Override default endpoint paths (SSE transport only)
abort?
optionalabort:string
Abort endpoint (default: /abort)
channel?
optionalchannel:string
Channel endpoint (default: /channel)
close?
optionalclose:string
Close endpoint (default: /close)
events?
optionalevents:string
SSE stream endpoint (default: /events)
invoke?
optionalinvoke:string
Invoke endpoint for custom methods (default: /invoke)
send?
optionalsend:string
Send endpoint (default: /send)
subscribe?
optionalsubscribe:string
Subscribe endpoint (default: /subscribe)
toolResponse?
optionaltoolResponse:string
Tool response endpoint (default: /tool-response)
timeout?
optionaltimeout:number
Defined in: client/src/client.ts:86
Request timeout in ms (default: 30000)
token?
optionaltoken:string
Defined in: client/src/client.ts:80
Authentication token (adds Authorization: Bearer header)
transport?
optionaltransport:"websocket"|"sse"|ClientTransport|"auto"
Defined in: client/src/client.ts:57
Transport to use for communication.
- "sse": HTTP/SSE transport (default for http:// and https:// URLs)
- "websocket": WebSocket transport (default for ws:// and wss:// URLs)
- "auto": Auto-detect based on URL scheme (default)
- ClientTransport instance: Use a custom transport (e.g., SharedTransport for multi-tab)
Default
"auto"WebSocket()?
optionalWebSocket: (url,protocols?) =>WebSocket
Defined in: client/src/client.ts:95
Custom WebSocket constructor (WebSocket transport only, for Node.js)
Parameters
url
string | URL
protocols?
string | string[] | WebSocketInit
Returns
WebSocket
withCredentials?
optionalwithCredentials:boolean
Defined in: client/src/client.ts:98
Send cookies with requests and SSE