Skip to main content

HistoryApi

@codebolt/client-sdk


Class: HistoryApi

Defined in: CodeBolt/packages/clientsdk/src/api/history.api.ts:11

Provides access to agent execution history.

Use this API to retrieve the historical record of actions and events for a specific agent, useful for auditing, debugging, and replaying past agent sessions.

Constructors

Constructor

new HistoryApi(http: HttpClient): HistoryApi;

Defined in: CodeBolt/packages/clientsdk/src/api/history.api.ts:12

Parameters

ParameterType
httpHttpClient

Returns

HistoryApi

Methods

getByAgentId()

getByAgentId(agentId: string): Promise<HistoryEntry[]>;

Defined in: CodeBolt/packages/clientsdk/src/api/history.api.ts:30

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

ParameterTypeDescription
agentIdstringThe unique identifier of the agent whose history to retrieve

Returns

Promise<HistoryEntry[]>

A promise that resolves to an array of HistoryEntry objects in chronological order

Example

const history = await client.history.getByAgentId('agent-001');
history.forEach(entry => console.log(entry.action, entry.timestamp));