Skip to main content

getByAgentId

client.history.getByAgentId(agentId: string): Promise<HistoryEntry[]>

Retrieves the execution history for a specific agent.

Returns an ordered list of history entries documenting every action the agent performed, including timestamps and payloads. Useful for reviewing what an agent did during a session.

Parameters

ParameterTypeRequiredDescription
agentIdstringYesThe unique identifier of the agent whose history to retrieve

Returns

Promise<HistoryEntry[]> — A promise that resolves to an array of objects in chronological order

Example

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

const client = new CodeBoltClient();

const result = await client.history.getByAgentId('agentId');
console.log(result);