> ## Documentation Index
> Fetch the complete documentation index at: https://cognitio-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Interface: ClientOptions

> Generated from the public TypeScript API.

Options to `createAgentClient`.

* Pass `baseUrl` to connect to an already-running server (remote transport).
* Omit `baseUrl` to spawn a local `cognitio serve` via the existing SDK.

## Properties

### baseUrl?

```ts theme={null}
optional baseUrl?: string;
```

Absolute URL of a running cognitio server. If set, no server is spawned.

***

### control?

```ts theme={null}
optional control?: ControlOptions;
```

Control-channel dispatcher readiness and reconnect tuning.

***

### directory?

```ts theme={null}
optional directory?: string;
```

Working directory sent to the server on session creation.

***

### headers?

```ts theme={null}
optional headers?: Record<string, string>;
```

Headers sent on every remote HTTP/SSE request, including Authorization. Requires baseUrl.

***

### spawn?

```ts theme={null}
optional spawn?: SpawnOptions;
```

Override spawn behavior. Not used when `baseUrl` is provided.

***

### workspaceId?

```ts theme={null}
optional workspaceId?: string;
```

Optional workspace id passed through to the server.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.