Skip to main content

saveContextFromChat

client.memory.saveContextFromChat(threadId: string, data: SaveContextFromChatRequest): Promise<unknown>

Saves context extracted from a chat conversation into a context thread.

Captures relevant information, decisions, and knowledge from an ongoing or completed chat session and persists it in the specified context thread for future reference.

Parameters

ParameterTypeRequiredDescription
threadIdstringYesThe unique identifier of the context thread to save into
dataSaveContextFromChatRequestYesThe chat context extraction payload

Returns

Promise<unknown> — A promise that resolves when the context has been saved

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.memory.saveContextFromChat('threadId', /* SaveContextFromChatRequest */);
console.log(result);