Skip to main content

Module types

Module types 

Source
Expand description

Core data types: messages, content blocks, media, citations, tools, stop reasons, snapshots and interrupt responses.

Structs§

AgentMetadata
Read-only view of the invoking agent, passed to a model with each request (AgentMetadata).
AudioBlock
Audio content block (AudioBlock).
CachePointBlock
Marks where prompt caching should occur (CachePointBlock).
Citation
A citation linking generated content to a source location (Citation).
CitationGeneratedContent
Generated content associated with a citation (CitationGeneratedContent).
CitationSourceContent
Source content referenced by a citation (CitationSourceContent).
CitationsBlock
Citations content block (CitationsBlock), wrapped as {"citations": {...}} in a message.
DocumentBlock
Document content block (DocumentBlock).
DocumentCharLocation
Character positions within a document.
DocumentChunkLocation
Chunk positions within a document.
DocumentCitations
Citation configuration of a document block.
DocumentPageLocation
Page positions within a document.
GuardContentImage
An image evaluated by guardrails (GuardContentImage).
GuardContentText
Text evaluated by guardrails (GuardContentText).
GuardImageSource
Image bytes for guard content (GuardImageSource), base64 on the wire.
ImageBlock
Image content block (ImageBlock).
InjectedBlock
Text the app adds to a user turn, kept apart from the user’s own words (InjectedBlock).
InterruptParams
Parameters for raising an interrupt (InterruptParams).
InterruptResponse
A user’s response to an interrupt (InterruptResponse).
InterruptResponseContent
Content that resumes an interrupted agent with a response (InterruptResponseContent).
JsonBlock
Structured JSON content, used in tool results (JsonBlock), {"json": ...}.
Message
A message in a conversation (Message).
MessageMetadata
Metadata attached to a message (MessageMetadata). Persisted with the message, never sent to model providers.
Offloaded
What an offload placeholder stands for (the provenance of an OffloadedBlock).
ReasoningBlock
Model reasoning content (ReasoningBlock). redacted_content is base64 on the wire.
ReasoningProviderData
Provider-native reasoning that only the provider and model that produced it can replay (ReasoningProviderData).
S3Location
An S3 object location for media and document sources (S3Location).
SearchResultLocation
Positions within a search result.
Snapshot
A point-in-time capture of agent or orchestrator state (Snapshot).
SummaryBlock
A summary of earlier conversation history (SummaryBlock).
TextBlock
Plain text content (TextBlock).
ToolReferenceBlock
A tool whose input schema a tool result loads (ToolReferenceBlock), {"toolReference": {"name": ...}}.
ToolResultBlock
The result of a tool execution (ToolResultBlock).
ToolSpec
Describes a tool to the model (ToolSpec).
ToolUse
A tool invocation request (ToolUse).
ToolUseBlock
A tool use request from the model (ToolUseBlock).
UnknownBlock
A content block of a type this version does not recognize (UnknownBlock).
UnknownStopReason
A stop reason string this version does not recognize.
VideoBlock
Video content block (VideoBlock).
WebLocation
A web page.

Enums§

AudioFormat
Audio format (AudioFormat).
AudioSource
Source of an audio block (AudioSource).
CacheType
The cache type of a cache point. Only default is supported.
CitationLocation
Where a citation points (CitationLocation), tagged by type on the wire.
ContentBlock
A block of content within a message (ContentBlock).
DocumentFormat
Document format (DocumentFormat).
DocumentSource
Source of a document block (DocumentSource).
GuardContentBlock
Content for guardrail evaluation (GuardContentBlock): either text or an image.
GuardImageFormat
Image format for guard content (GuardImageFormat).
GuardQualifier
How guardrails evaluate guard content (GuardQualifier).
ImageFormat
Image format (ImageFormat).
ImageSource
Source of an image block (ImageSource).
OffloadMethod
The offload method that replaced content with a placeholder (OffloadMethod).
Role
The role of a message sender (Role).
Scope
The context a snapshot belongs to (Scope).
StopReason
Why the model or the agent loop stopped (StopReason).
SystemContentBlock
A block of a system prompt (SystemContentBlock).
SystemPrompt
The system prompt (SystemPrompt): a string, or blocks for caching and guardrails.
Toggle
Turns a boolean | config option on or off: true.into(), false.into() or a config .into().
ToolChoice
How the model chooses a tool (ToolChoice).
ToolResultContent
Content within a tool result (ToolResultContent).
ToolResultStatus
Outcome of a tool execution (ToolResultStatus).
VideoFormat
Video format (VideoFormat).
VideoSource
Source of a video block (VideoSource).

Constants§

SNAPSHOT_SCHEMA_VERSION
The current snapshot schema version (SNAPSHOT_SCHEMA_VERSION).

Type Aliases§

DocumentContentBlock
A block nested inside a document’s structured content (DocumentContentBlock).
JsonObject
A JSON object with string keys, in insertion order.
JsonSchema
A JSON Schema document kept as raw JSON.
JsonValue
Any JSON value.
ToolResultError
The error behind an error tool result. Shared, so results stay cheap to clone.