agentc
GitHubagentc-sh/agentc
agentc
GitHubagentc-sh/agentc
›Introduction
Get started›Concepts in 5 minutes›Build your first agent›Add your first tool›Serve and connect
Concepts›Architecture overview›The manifest›The compilation pipeline›Archetypes›The graph›Tools and capabilities›Runtime libraries›Skills›Agents and prompts›Serving and protocols›Observability
Guides›Author a manifest›Write a tool›Give your agent a filesystem›Control network egress›Connect external tools via MCP›Connect agents via A2A›Use the bash tool›Control tool access with capabilities›Write templated prompts›Manage prompts with Langfuse›Pass context from the client›Configure a model provider›Connect a CopilotKit frontend›Deploy a standalone binary›Deploy with Docker and PostgreSQL›Instrument with OpenTelemetry›Extend code generation with blocks
Reference
Manifest
Runtime
ReAct
HTTP
›Sessions›Messages›Runs›Checkpoints
›Prompt templates›State
›Observability

Messages

The native HTTP endpoints for creating, finding, reading, and deleting messages.

Messages are persisted separately from run state, so a client can read conversation history outside of an active run and add messages to a session directly.

Find messages for a session

Find messages for a session with optional filtering and pagination.

GET/v1/sessions/{session_id}/messages

Find messages for a session with optional filtering and pagination.

Path parametersin: path
session_id
string

The session ID.

Query parametersin: query
per_page
integer | nulldefault: 100

Maximum page size.

page
string | null

Opaque cursor for the next page.

ids
string[] | null

Message IDs to filter on.

run_ids
string[] | null

Run IDs to filter on.

checkpoint_ids
string[] | null

Checkpoint IDs to filter on.

roles
string[] | null

Message roles to filter on.

created_before
string | null

Filter by creation time.

created_after
string | null

Filter by creation time.

Responses

Create a new message in a session

Create a new message in a session outside of a run.

POST/v1/sessions/{session_id}/messages

Create a new message in a session outside of a run.

Path parametersin: path
session_id
string

The session ID.

Request bodyin: body
role
string

The message role.

systemusertool
CreateMessageRequest
system
id
string | null

Optional message ID. If omitted, one is generated automatically.

content
string

The system message text.

user
id
string | null

Optional message ID. If omitted, one is generated automatically.

content
UserContent[]

Ordered content blocks. A user message may include text and media.

tool
id
string | null

Optional message ID. If omitted, one is generated automatically.

tool_call_id
string

The tool call this message completes.

parent_message_id
string | null

The assistant message that started the tool call.

content
string | null

Tool output text.

error
string | null

Error text if the tool failed.

Responses

Get a message by ID

Get a message by its ID.

GET/v1/messages/{message_id}

Get a message by its ID.

Path parametersin: path
message_id
string

The message ID.

Responses

Delete a message by ID

Delete a message by its ID.

DELETE/v1/messages/{message_id}

Delete a message by its ID.

Path parametersin: path
message_id
string

The message ID.

Responses

Types

UserContent

A single content block in a user message. A user message carries an ordered array of these blocks, so one message may mix text and media. The block is discriminated by type.

UserContent
text
type
string

Identifies plain text content.

text
value
string

The text content.

image
type
string

Identifies image content.

image
source
MediaSource

The image source.

media_type
string

The MIME type.

audio
type
string

Identifies audio content.

audio
source
MediaSource

The audio source.

media_type
string

The MIME type.

video
type
string

Identifies video content.

video
source
MediaSource

The video source.

media_type
string

The MIME type.

document
type
string

Identifies document content.

document
source
MediaSource

The document source.

media_type
string

The MIME type.

MediaSource

The source of an image, audio, video, or document content block. It is either a URL to fetch or an inline base64 payload, discriminated by type.

MediaSource
url
type
string

Identifies a URL source.

url
value
string

The URL to fetch.

base64
type
string

Identifies inline base64 data.

base64
value
string

The base64-encoded payload.

ToolCall

A tool invocation emitted by the assistant.

ToolCall
id
string

The tool call ID.

name
string

The name of the tool to invoke.

arguments
object

The tool arguments, as a JSON object matching the tool's parameter schema.

← PreviousSessionsNext →Runs

© 2026 pogue.dev. All rights reserved.

Creative CommonsCC BY 4.0
On this pageFind messages for a sessionCreate a new message in a sessionGet a message by IDDelete a message by IDTypesUserContentMediaSourceToolCall

Search docs

Search the agentc documentation