Zod-validated typed object.
Optional transcriptLossless message delta this call appended to the conversation: the request's user turn plus every assistant / tool turn the tool loop recorded, in order, in provider-replayable shape (tool_call ids, parallel results, thinking blocks). Sessions append THIS — never a reconstruction — to their history. Absent only on legacy paths that never seeded a conversation array. The prompt-shim path carries a partial delta (seeded turns only); native providers carry the full trail.
Provider identifier used for the final run.
Resolved model identifier used for the run.
Optional responseProvider-reported model id of the final step (spec batch-1 C1) — can
differ from model across aliases and fallback routing. Undefined on
paths where no provider-reported id was captured. model keeps its
existing meaning (zero-change).
Optional serviceProvider-reported service tier the final step actually ran at (OpenAI
service_tier on the response; spec batch-1 C2). Undefined on
providers/paths without a tier concept.
Optional servingUpstream host that actually served the request when provider is an
aggregator/router (OpenRouter reports e.g. 'Groq' or 'DeepInfra'
per completion). Undefined for direct providers, for aggregators that
omit it, and on the prompt-shim tool path. Latency attribution:
identical model + token counts vary 3-5x in wall-clock by serving
host, so telemetry needs this to interpret durations.
Optional cacheCache-diagnostics verdict from the LAST agentic step (Anthropic beta;
present only when the run opted in via
GenerateTextOptions.cacheDiagnostics). null = the last step's
request matched its predecessor (prefix stable). A populated
cacheMissReason names the earliest divergence. Per-step verdicts are
available on the onAfterGeneration hook.
Optional providerProvider message id (msg_...) of the LAST agentic step; present only
when the run opted in via GenerateTextOptions.cacheDiagnostics.
Persist it and pass it back as the next request's
cacheDiagnostics.previousMessageId to thread the comparison across
turns. null when the provider reported no id.
Final assistant text after all agentic steps have completed.
Aggregated token usage across all steps.
Ordered list of every tool call made during the run.
Reason the model stopped generating.
"stop": natural end of response."length": maxTokens limit reached."tool-calls": loop exhausted maxSteps while still calling tools."error": provider returned an error.Optional agentOrdered records of every sub-agent call made during an agency() run.
undefined for plain generateText / agent() calls.
Optional traceStructured trace events emitted during the run.
Populated by the agency orchestrator; undefined for single-agent calls.
Optional parsedParsed structured output from BaseAgentConfig.output, or from
agent().generate() with responseSchema. Undefined without a schema.
Optional planThe plan produced by the planning phase when planning is enabled.
undefined when planning is disabled or was not requested.
Optional groundingPer-claim citation verdicts attached when agent({ verifyCitations: … })
is configured. undefined when verification was not requested or could
not run for this turn.
VerifyCitationsConfig (exported from @framers/agentos/api) for
the verifyCitations options.
Optional fallbackPer-hop provider fallback trail. fired is true when any non-primary
provider produced — or was tried for — the result, so callers can flag a
degraded run even when the final attempt recovered on the primary.
undefined only on legacy code paths that predate the field.
Result returned by AgentSession.send when
responseSchemais set. Extends GenerateTextResult with a typed Zod-validatedobject.