Skip to content
Letta Platform Letta Platform Letta Docs
Sign up

Cancel Conversation

client.conversations.cancel(stringconversationID, RequestOptionsoptions?): ConversationCancelResponse
post/v1/conversations/{conversation_id}/cancel

Cancel runs associated with a conversation.

Note: To cancel active runs, Redis is required.

ParametersExpand Collapse
conversationID: string

The conversation identifier. Either the special value 'default' or an ID in the format 'conv-'

minLength1
maxLength41
ReturnsExpand Collapse
ConversationCancelResponse = Record<string, unknown>
Cancel Conversation
import Letta from '@letta-ai/letta-client';

const client = new Letta({
  apiKey: process.env['LETTA_API_KEY'], // This is the default and can be omitted
});

const response = await client.conversations.cancel('default');

console.log(response);
{
  "foo": "bar"
}
Returns Examples
{
  "foo": "bar"
}