Skip to content

AgentConversationServiceModel

Scoped conversation service for a specific agent. Auto-fills agentId and folderId from the agent.

Methods

create()

create(options?: ConversationCreateOptions): Promise<ConversationGetResponse>

Creates a conversation for this agent

Parameters

Parameter Type Description
options? ConversationCreateOptions Optional conversation options (label, etc.)

Returns

Promise<ConversationGetResponse>

Promise resolving to the created conversation with methods

Example

const agent = (await conversationalAgent.getAll())[0];
const conversation = await agent.conversations.create({ label: 'My Chat' });
const session = conversation.startSession();