Skip to content

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? ​

optional clientId: string

Defined in: client/src/client.ts:101

Client ID for WebSocket connections


EventSource()? ​

optional EventSource: (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()? ​

optional fetch: (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? ​

optional headers: Record<string, string>

Defined in: client/src/client.ts:83

Custom headers for all requests


paths? ​

optional paths: object

Defined in: client/src/client.ts:60

Override default endpoint paths (SSE transport only)

abort? ​

optional abort: string

Abort endpoint (default: /abort)

channel? ​

optional channel: string

Channel endpoint (default: /channel)

close? ​

optional close: string

Close endpoint (default: /close)

events? ​

optional events: string

SSE stream endpoint (default: /events)

invoke? ​

optional invoke: string

Invoke endpoint for custom methods (default: /invoke)

send? ​

optional send: string

Send endpoint (default: /send)

subscribe? ​

optional subscribe: string

Subscribe endpoint (default: /subscribe)

toolResponse? ​

optional toolResponse: string

Tool response endpoint (default: /tool-response)


timeout? ​

optional timeout: number

Defined in: client/src/client.ts:86

Request timeout in ms (default: 30000)


token? ​

optional token: string

Defined in: client/src/client.ts:80

Authentication token (adds Authorization: Bearer header)


transport? ​

optional transport: "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 ​

ts
"auto"

WebSocket()? ​

optional WebSocket: (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? ​

optional withCredentials: boolean

Defined in: client/src/client.ts:98

Send cookies with requests and SSE

Released under the ISC License.