Unispec Docs
SDK ReferenceInterfaces

AgentChatResult

Interface: AgentChatResult

Defined in: packages/sdk/src/backend/agents.ts:147

Properties

citations

citations: RetrievedChunk[]

Defined in: packages/sdk/src/backend/agents.ts:149


conversation_id?

optional conversation_id?: string

Defined in: packages/sdk/src/backend/agents.ts:154

Echoed when the request threaded the turn into a conversation.


escalated

escalated: boolean

Defined in: packages/sdk/src/backend/agents.ts:152


message

message: ChatMessage

Defined in: packages/sdk/src/backend/agents.ts:148


records_extracted?

optional records_extracted?: object[]

Defined in: packages/sdk/src/backend/agents.ts:159

Typed records extracted this turn (when memory.extract was set and the conversation contained usable values).

created_at

created_at: string

id

id: string

record

record: Record<string, unknown>

schema

schema: string

schema_version

schema_version: number

user_id?

optional user_id?: string


trace

trace: object

Defined in: packages/sdk/src/backend/agents.ts:167

available_tools?

optional available_tools?: string[]

claimed_citations?

optional claimed_citations?: object[]

Citations the model claimed to use (by id), before grounding checks.

matched_rules

matched_rules: AgentRule[]

plan?

optional plan?: string[]

Internal reasoning steps from the typed response (not shown to the user).

retrieved

retrieved: RetrievedChunk[]

tool_calls?

optional tool_calls?: object[]

Tools the agent actually invoked this turn (function-calling loop).


ui_actions

ui_actions: UiAction[]

Defined in: packages/sdk/src/backend/agents.ts:151

UI actions the model proposed and the backend allowed (M0).


usage?

optional usage?: object

Defined in: packages/sdk/src/backend/agents.ts:156

Real provider token usage for the whole turn (guards + main + tools).

tokens_in

tokens_in: number

tokens_out

tokens_out: number

On this page