Skip to main content

Core Types

The Agent User Interaction Protocol SDK is built on a set of core types that represent the fundamental structures used throughout the system. This page documents these types and their properties.

RunAgentInput

Input parameters for running an agent. In the HTTP API, this is the body of the POST request. tools contains tools provided by the client for this run. Backend-defined tools should remain in the backend agent or framework configuration, and may be advertised separately through agent capabilities.
PropertyTypeDescription
threadIdstringID of the conversation thread
runIdstringID of the current run
parentRunIdstring (optional)ID of the run that spawned this run
stateanyCurrent state of the agent
messagesMessage[]Array of messages in the conversation
toolsTool[]Client-provided tools available for this run
contextContext[]Array of context objects provided to the agent
forwardedPropsanyAdditional properties forwarded to the agent

Message Types

The SDK includes several message types that represent different kinds of messages in the system.

Role

Represents the possible roles a message sender can have.

DeveloperMessage

Represents a message from a developer.
PropertyTypeDescription
idstringUnique identifier for the message
role"developer"Role of the message sender, fixed as “developer”
contentstringText content of the message (required)
namestringOptional name of the sender

SystemMessage

Represents a system message.
PropertyTypeDescription
idstringUnique identifier for the message
role"system"Role of the message sender, fixed as “system”
contentstringText content of the message (required)
namestringOptional name of the sender

AssistantMessage

Represents a message from an assistant.
PropertyTypeDescription
idstringUnique identifier for the message
role"assistant"Role of the message sender, fixed as “assistant”
contentstring (optional)Text content of the message
namestring (optional)Name of the sender
toolCallsToolCall[] (optional)Tool calls made in this message

UserMessage

Represents a message from a user.
PropertyTypeDescription
idstringUnique identifier for the message
role"user"Role of the message sender, fixed as “user”
contentstring | InputContent[]Either plain text or an ordered array of multimodal content fragments
namestringOptional name of the sender

InputContent

Union of supported multimodal fragments.

InputContentSource

TextInputContent

ImageInputContent

AudioInputContent

VideoInputContent

DocumentInputContent

ToolMessage

Represents a message from a tool.
PropertyTypeDescription
idstringUnique identifier for the message
contentstringText content of the message
role"tool"Role of the message sender, fixed as “tool”
toolCallIdstringID of the tool call this message responds to
errorstring (optional)Error message if the tool call failed
encryptedValuestring (optional)Optional encrypted value attached via signature

ActivityMessage

Represents structured activity progress emitted between chat messages.
PropertyTypeDescription
idstringUnique identifier for the activity message
role"activity"Fixed discriminator identifying the message as activity
activityTypestringActivity discriminator used for renderer selection
contentRecord<string, any>Structured payload representing the activity state

ReasoningMessage

Represents a reasoning/thinking message from an agent’s internal thought process.
PropertyTypeDescription
idstringUnique identifier for the reasoning message
role"reasoning"Fixed discriminator identifying the reasoning role
contentstringThe reasoning/thinking content
encryptedValuestring (optional)Optional encrypted value attached via signature

Message

A union type representing any type of message in the system.

ToolCall

Represents a tool call made by an agent.
PropertyTypeDescription
idstringUnique identifier for the tool call
type"function"Type of the tool call, always “function”
functionFunctionCallDetails about the function being called
encryptedValuestring (optional)Optional encrypted value attached via signature

FunctionCall

Represents function name and arguments in a tool call.
PropertyTypeDescription
namestringName of the function to call
argumentsstringJSON-encoded string of arguments to the function

Context

Represents a piece of contextual information provided to an agent.
PropertyTypeDescription
descriptionstringDescription of what this context represents
valuestringThe actual context value

Tool

Defines a tool that can be called by an agent.
PropertyTypeDescription
namestringName of the tool
descriptionstringDescription of what the tool does
parametersanyJSON Schema defining the parameters for the tool

State

Represents the state of an agent during execution.
The state type is flexible and can hold any data structure needed by the agent implementation.

AgentCapabilities

Typed capability declaration returned by getCapabilities(). All fields are optional — agents only declare what they support.
PropertyTypeDescription
identityIdentityCapabilitiesAgent identity and metadata
transportTransportCapabilitiesSupported transport mechanisms
toolsToolsCapabilitiesAgent-provided tools and tool calling config
outputOutputCapabilitiesOutput format support
stateStateCapabilitiesState and memory management
multiAgentMultiAgentCapabilitiesMulti-agent coordination
reasoningReasoningCapabilitiesReasoning and thinking support
multimodalMultimodalCapabilitiesMultimodal input/output support
executionExecutionCapabilitiesExecution control and limits
humanInTheLoopHumanInTheLoopCapabilitiesHuman-in-the-loop support
customRecord<string, unknown>Integration-specific capabilities
See Capabilities for the full category type definitions and usage patterns.