> ## 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: SessionContext

> Generated from the public TypeScript API.

Dependencies and runtime metadata used to construct a Session. Applications normally obtain handles from Agent or AgentClient instead.

## Properties

### client

```ts theme={null}
client: CognitioClient;
```

***

### control?

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

***

### createOptions

```ts theme={null}
createOptions: SessionCreateOptions | undefined;
```

***

### directory

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

***

### onClose?

```ts theme={null}
optional onClose?: (sessionId, session) => void;
```

Called when a handle closes so its owning client can release its registration.

#### Parameters

##### sessionId

`string`

##### session

[`Session`](../classes/Session)

#### Returns

`void`

***

### runtimeConfig?

```ts theme={null}
optional runtimeConfig?: RuntimeConfig;
```

***

### sdkMcpHosts?

```ts theme={null}
optional sdkMcpHosts?: SdkMcpHost[];
```

***

### session

```ts theme={null}
session: Session;
```

***

### workspaceId?

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


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