Interface: AgentCallRecord
Defined in: packages/agentos/src/api/types.ts:875
A complete record of a single agent invocation within an agency run.
Appended to GenerateTextResult.agentCalls and surfaced in ApprovalRequest.context.
Properties
agent
agent:
string
Defined in: packages/agentos/src/api/types.ts:877
Name of the agent that was invoked.
durationMs
durationMs:
number
Defined in: packages/agentos/src/api/types.ts:930
Wall-clock milliseconds for this agent call.
emergent?
optionalemergent:boolean
Defined in: packages/agentos/src/api/types.ts:940
Whether this agent was synthesised at runtime by the emergent subsystem.
fallback?
optionalfallback:FallbackSignal
Defined in: packages/agentos/src/api/types.ts:938
The seat's failover trail, when its call allowed failover.
finishReason?
optionalfinishReason:string
Defined in: packages/agentos/src/api/types.ts:936
The seat's finish reason, when reported.
guardrailResults?
optionalguardrailResults:object[]
Defined in: packages/agentos/src/api/types.ts:898
Guardrail evaluation results for this agent call.
action
action:
string
Action taken by the guardrail (e.g. "allow", "block", "redact").
id
id:
string
Guardrail identifier.
passed
passed:
boolean
Whether the guardrail check passed.
input
input:
string
Defined in: packages/agentos/src/api/types.ts:883
The text the agent was sent: the input the strategy built for it, with a
beforeAgent approval's modifications.instructions appended when the
approval carried them.
model?
optionalmodel:string
Defined in: packages/agentos/src/api/types.ts:934
Model that answered this call, when reported.
output
output:
string
Defined in: packages/agentos/src/api/types.ts:885
Final text output produced by the agent.
provider?
optionalprovider:string
Defined in: packages/agentos/src/api/types.ts:932
Provider that answered this call, when the seat's result reported one.
toolCalls
toolCalls:
object[]
Defined in: packages/agentos/src/api/types.ts:887
Ordered list of tool invocations made during this call.
args
args:
unknown
Arguments supplied by the model.
error?
optionalerror:string
Error message if the tool failed.
name
name:
string
Tool name.
result?
optionalresult:unknown
Return value from the tool (present on success).
usage
usage:
object
Defined in: packages/agentos/src/api/types.ts:907
Token usage for this individual agent call.
cacheCreationExtendedTokens?
optionalcacheCreationExtendedTokens:number
Of cacheCreationTokens, the tokens written with the provider's longer cache lifetime (Anthropic's 1 hour,
OpenAI's 12 hours), billed at its higher write rate. Undefined when the provider does not split its writes.
cacheCreationTokens?
optionalcacheCreationTokens:number
Tokens written as a new prompt-prefix cache entry for this call. Undefined when the provider does not report cache usage.
cacheReadTokens?
optionalcacheReadTokens:number
Tokens served from the provider's prompt-prefix cache for this call. Undefined when the provider does not report cache usage.
completionTokens
completionTokens:
number
costUSD?
optionalcostUSD:number
Cost in USD for this call, when available.
promptTokens
promptTokens:
number
totalTokens
totalTokens:
number