Expand description
Core data types: messages, content blocks, media, citations, tools, stop reasons, snapshots and interrupt responses.
Structs§
- Agent
Metadata - Read-only view of the invoking agent, passed to a model with each request (
AgentMetadata). - Audio
Block - Audio content block (
AudioBlock). - Cache
Point Block - Marks where prompt caching should occur (
CachePointBlock). - Citation
- A citation linking generated content to a source location (
Citation). - Citation
Generated Content - Generated content associated with a citation (
CitationGeneratedContent). - Citation
Source Content - Source content referenced by a citation (
CitationSourceContent). - Citations
Block - Citations content block (
CitationsBlock), wrapped as{"citations": {...}}in a message. - Document
Block - Document content block (
DocumentBlock). - Document
Char Location - Character positions within a document.
- Document
Chunk Location - Chunk positions within a document.
- Document
Citations - Citation configuration of a document block.
- Document
Page Location - Page positions within a document.
- Guard
Content Image - An image evaluated by guardrails (
GuardContentImage). - Guard
Content Text - Text evaluated by guardrails (
GuardContentText). - Guard
Image Source - Image bytes for guard content (
GuardImageSource), base64 on the wire. - Image
Block - Image content block (
ImageBlock). - Injected
Block - Text the app adds to a user turn, kept apart from the user’s own words (
InjectedBlock). - Interrupt
Params - Parameters for raising an interrupt (
InterruptParams). - Interrupt
Response - A user’s response to an interrupt (
InterruptResponse). - Interrupt
Response Content - Content that resumes an interrupted agent with a response (
InterruptResponseContent). - Json
Block - Structured JSON content, used in tool results (
JsonBlock),{"json": ...}. - Message
- A message in a conversation (
Message). - Message
Metadata - 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). - Reasoning
Block - Model reasoning content (
ReasoningBlock).redacted_contentis base64 on the wire. - Reasoning
Provider Data - 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). - Search
Result Location - Positions within a search result.
- Snapshot
- A point-in-time capture of agent or orchestrator state (
Snapshot). - Summary
Block - A summary of earlier conversation history (
SummaryBlock). - Text
Block - Plain text content (
TextBlock). - Tool
Reference Block - A tool whose input schema a tool result loads (
ToolReferenceBlock),{"toolReference": {"name": ...}}. - Tool
Result Block - The result of a tool execution (
ToolResultBlock). - Tool
Spec - Describes a tool to the model (
ToolSpec). - ToolUse
- A tool invocation request (
ToolUse). - Tool
UseBlock - A tool use request from the model (
ToolUseBlock). - Unknown
Block - A content block of a type this version does not recognize (
UnknownBlock). - Unknown
Stop Reason - A stop reason string this version does not recognize.
- Video
Block - Video content block (
VideoBlock). - WebLocation
- A web page.
Enums§
- Audio
Format - Audio format (
AudioFormat). - Audio
Source - Source of an audio block (
AudioSource). - Cache
Type - The cache type of a cache point. Only
defaultis supported. - Citation
Location - Where a citation points (
CitationLocation), tagged bytypeon the wire. - Content
Block - A block of content within a message (
ContentBlock). - Document
Format - Document format (
DocumentFormat). - Document
Source - Source of a document block (
DocumentSource). - Guard
Content Block - Content for guardrail evaluation (
GuardContentBlock): either text or an image. - Guard
Image Format - Image format for guard content (
GuardImageFormat). - Guard
Qualifier - How guardrails evaluate guard content (
GuardQualifier). - Image
Format - Image format (
ImageFormat). - Image
Source - Source of an image block (
ImageSource). - Offload
Method - 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). - Stop
Reason - Why the model or the agent loop stopped (
StopReason). - System
Content Block - A block of a system prompt (
SystemContentBlock). - System
Prompt - The system prompt (
SystemPrompt): a string, or blocks for caching and guardrails. - Toggle
- Turns a
boolean | configoption on or off:true.into(),false.into()or a config.into(). - Tool
Choice - How the model chooses a tool (
ToolChoice). - Tool
Result Content - Content within a tool result (
ToolResultContent). - Tool
Result Status - Outcome of a tool execution (
ToolResultStatus). - Video
Format - Video format (
VideoFormat). - Video
Source - Source of a video block (
VideoSource).
Constants§
- SNAPSHOT_
SCHEMA_ VERSION - The current snapshot schema version (
SNAPSHOT_SCHEMA_VERSION).
Type Aliases§
- Document
Content Block - A block nested inside a document’s structured content (
DocumentContentBlock). - Json
Object - A JSON object with string keys, in insertion order.
- Json
Schema - A JSON Schema document kept as raw JSON.
- Json
Value - Any JSON value.
- Tool
Result Error - The error behind an error tool result. Shared, so results stay cheap to clone.