Skip to main content

Agents

The AI agents that process incoming mail: their model, their system prompt, their prompt version history and the catalogue of models available. Eight tools.

See the Agent model and the LlmModel model.


agents_list​

Read · scope inbox/agents · permission agents.list · GET /agents

List agents in the selected workspace.

ParameterTypeDescription
cursorstringOpaque cursor from a previous page.
limitintegerPage size, default 25, max 100.
sortstringSort keys, - prefix for descending.
llm_modelstringFilter by model, as provider/model.
external_idstringFilter by the id in your system.
created_at_gte / created_at_ltestringISO 8601 range on created_at.

agents_get​

Read · scope inbox/agents · permission agents.show · GET /agents/{id}

Fetch one agent by internal id or external_id, including its current version.

ParameterTypeDescription
id requiredstringInternal id or external_id.

agents_create​

Write · scope inbox/agents + write · permission agents.create · POST /agents

Create an agent. Version starts at 1.

ParameterTypeDescription
label requiredstringDisplay name, 1–120 chars.
llm_model requiredstringprovider/model, routed through the Vercel AI Gateway.
system_message requiredstringSystem prompt. Changing it bumps the agent version.
external_idstringId of the record in your system.
skills_repostring | nullGit URL; branch or tag goes in the fragment (...git#branch).
custom_metadataobjectFree-form JSON owned by the caller.
idempotency_keystringReplay guard, 8–255 chars.

agents_upsert​

Write · scope inbox/agents + write · permission agents.create · PUT /agents

Create or update an agent, matched by id then external_id. A different system_message bumps the version.

ParameterTypeDescription
idstring (uuid)Match by internal id first.
external_idstringMatch key in your system.
labelstringDisplay name, 1–120 chars.
llm_modelstringprovider/model.
system_messagestringSystem prompt.
skills_repostring | nullGit URL, branch or tag in the fragment.
custom_metadataobjectFree-form JSON.
idempotency_keystringReplay guard.

agents_update​

Write · scope inbox/agents + write · permission agents.update · PATCH /agents/{id}

Update an agent. Changing system_message snapshots a new immutable version; changing only label, model or skills repo does not.

ParameterTypeDescription
id requiredstringInternal id or external_id.
labelstringDisplay name, 1–120 chars.
external_idstringId in your system.
llm_modelstringprovider/model.
system_messagestringSystem prompt. Changing it bumps the version.
skills_repostring | nullGit URL, branch or tag in the fragment.
custom_metadataobjectFree-form JSON.

agents_delete​

Destructive · scope inbox/agents + write · permission agents.delete · DELETE /agents/{id}

Soft-delete an agent. Inboxes pointing at it stop processing until reassigned.

ParameterTypeDescription
id requiredstringInternal id or external_id.

agents_versions_list​

Read · scope inbox/agents · permission agents.show · GET /agents/{id}/versions

Prompt version history of an agent — each entry is the exact system_message a run executed with.

ParameterTypeDescription
id requiredstringInternal id or external_id.
cursorstringOpaque cursor from a previous page.
limitintegerPage size, default 25, max 100.

models_list​

Read · scope inbox/agents · permission agents.list · GET /models

Catalogue of LLM models available through the AI Gateway, with current prices. Takes no parameters.