Skip to content

Documentation / @agentick/kernel / ChannelSession

Class: ChannelSession

Defined in: kernel/src/channel.ts:252

Channel session manages a collection of channels. Sessions persist across multiple engine executions.

Constructors

Constructor

new ChannelSession(id): ChannelSession

Defined in: kernel/src/channel.ts:257

Parameters

id

string

Returns

ChannelSession

Properties

channels

readonly channels: Map<string, Channel>

Defined in: kernel/src/channel.ts:253


createdAt

readonly createdAt: number

Defined in: kernel/src/channel.ts:254


id

readonly id: string

Defined in: kernel/src/channel.ts:257


lastActivity

lastActivity: number

Defined in: kernel/src/channel.ts:255

Methods

destroy()

destroy(): void

Defined in: kernel/src/channel.ts:302

Cleanup all channels in the session.

Returns

void


generateId()

static generateId(ctx): string

Defined in: kernel/src/channel.ts:289

Default session ID generator. Uses user context + conversation ID or trace ID. Users can override this via ChannelService config.

Parameters

ctx

KernelContext

Returns

string


getChannel()

getChannel(name): Channel

Defined in: kernel/src/channel.ts:265

Get or create a channel within this session.

Parameters

name

string

Returns

Channel


removeChannel()

removeChannel(name): void

Defined in: kernel/src/channel.ts:276

Remove a channel from the session.

Parameters

name

string

Returns

void

Released under the ISC License.