Generates a single reply without maintaining session history. Accepts plain text or multimodal content (text + image parts).
User prompt as text string or MessageContent array.
Optional opts: Partial<GenerateTextOptions>Optional overrides merged on top of the agent's base options.
The complete generation result.
Streams a single reply without maintaining session history. Accepts plain text or multimodal content (text + image parts).
User prompt as text string or MessageContent array.
Optional opts: Partial<GenerateTextOptions>Optional overrides merged on top of the agent's base options.
Returns (or creates) a named AgentSession with its own conversation history.
Optional id: stringOptional session ID. A unique ID is generated when omitted.
Optional options: AgentSessionOptionsThe session's user; see AgentSessionOptions.
The session object for this ID.
Returns persisted usage totals for the whole agent or a single session.
Optional sessionId: stringExports the agent's configuration as a portable object. Secrets are
redacted unless options.redactSecrets is false.
Optional metadata: { Optional human-readable metadata to attach.
Optional name?: stringOptional description?: stringOptional author?: stringOptional tags?: string[]Optional options: ExportAgentConfigOptionsRedaction options.
A portable AgentExportConfig object.
Exports the agent's configuration as a pretty-printed JSON string. Secrets
are redacted unless options.redactSecrets is false.
Optional metadata: { Optional human-readable metadata to attach.
Optional name?: stringOptional description?: stringOptional author?: stringOptional tags?: string[]Optional options: ExportAgentConfigOptionsRedaction options.
JSON string.
Optional voiceOptional learningThe agent's learning layer as its host reads it. Set only with runtime: 'gmi' and learning on.
A stateful agent instance returned by agent.