Type Alias: AgentInstanceHistoryItemResult
type AgentInstanceHistoryItemResult = object;
A single conversation history item belonging to an agent instance.
Properties
agentInstanceKey
agentInstanceKey: AgentInstanceKey;
The key of the agent instance this item belongs to.
commitStatus
commitStatus: AgentInstanceHistoryCommitStatusEnum;
The commit status of this history item.
content
content: AgentInstanceMessageContent[];
The content blocks of this history item.
elementInstanceKey
elementInstanceKey: ElementInstanceKey;
The key of the AI Agent Task or ad-hoc sub-process element instance under which this item was produced.
historyItemId
historyItemId: HistoryItemId;
The client-supplied identifier this item was created with. Empty for items that don't carry one. Not unique: a job can be re-activated under a superseded lease any number of times before it completes, so one historyItemId can have zero or more DISCARDED records and at most one COMMITTED record, since only historyItemKey is guaranteed unique. Filter by commitStatus rather than assuming one record per historyItemId.
historyItemKey
historyItemKey: AgentHistoryItemKey;
The unique key for this history item. Stable and sortable by creation order.
jobKey
jobKey: JobKey;
The key of the job activation during which this item was produced.
jobLeaseToken
jobLeaseToken: JobLeaseToken;
The lease token of the activation that produced this item.
limits
limits: AgentInstanceLimits;
The operational limits as of this entry. CONFIGURATION items only; -1 on any field means "no limit configured" for other roles.
loopIteration
loopIteration: LoopIterationId;
The loop iteration this item belongs to.
metrics
metrics:
| AgentInstanceHistoryItemMetrics
| null;
Per-call token and latency metrics. Null when metrics were not provided at creation time.
model
model: string | null;
The LLM model identifier as of this entry. CONFIGURATION items only; null for other roles.
producedAt
producedAt: string;
The agent-side timestamp of when this message was produced.
provider
provider: string | null;
The LLM provider as of this entry. CONFIGURATION items only; null for other roles.
role
role: AgentInstanceHistoryRoleEnum;
The role of this history item in the conversation.
systemPrompt
systemPrompt: AgentInstanceMessageContent[];
The system prompt, as content blocks, as of this entry. CONFIGURATION items only; empty for other roles.
toolCalls
toolCalls: AgentInstanceToolCall[];
Tool calls for this item. Empty for USER items and ASSISTANT items with no tool dispatches. ASSISTANT items: dispatched tool calls. TOOL_RESULT items: single-entry array referencing the originating tool call.
tools
tools: AgentTool[];
The complete list of tools available to the agent as of this entry. CONFIGURATION items only; empty for other roles.