Documentation / @agentick/core / 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 ​
readonlychannels:Map<string,Channel>
Defined in: kernel/src/channel.ts:253
createdAt ​
readonlycreatedAt:number
Defined in: kernel/src/channel.ts:254
id ​
readonlyid: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() ​
staticgenerateId(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 ​
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 ​
removeChannel() ​
removeChannel(
name):void
Defined in: kernel/src/channel.ts:276
Remove a channel from the session.
Parameters ​
name ​
string
Returns ​
void