Overview
The Agents API is the central surface for creating, configuring, running, and managing agents on the Allternit platform. Agents are persistent, user-owned entities that combine a brain (provider + model), a system prompt, a tool policy, a harness configuration, and a set of enabled surfaces. Once created, an agent can be run on demand, instantiated from a template, published to the marketplace, or wired as a subagent under an orchestrator. All agent routes are mounted under/api and require a valid bearer token via the platform auth middleware.
Base URL
Authentication
All requests must include a valid bearer token in theAuthorization header. See Authentication for details.
Agent object
Agent creation checklist
Every creation flow enforces the same validation rules:namemust be at least 3 characters.descriptionmust be at least 10 characters.typeis required.modelandproviderare required.harness_config.modemust be one ofbyok,cloud,local, orsubprocess.enabled_modesmust contain at least one surface.trust_tieris required.
Endpoints
List agents
Query parameters
Example request
Example response
Create an agent
Request body
Example request
Example response
Get an agent
Example request
Example response
Update an agent
COALESCE semantics: omitted fields keep their current values. The same harness-mode and enabled-modes validations apply.
Example request
Example response
Delete an agent
Example response
Subagents
Subagents are agents whosemode is subagent and whose parent_agent_id points to an orchestrator or the primary Companion. They are created through the same checklist as any other agent.
List subagents
Example response
Create a subagent
parent_agent_id to :id and mode to subagent. The parent must exist and belong to the caller.
Example request
Example response
Companion agent
Ensure Companion
Example response (created)
Example response (existing)
Templates
Templates are persisted agent patterns (orchestrator + subagents) stored in theagent_templates table.
List templates
Example response
Instantiate a template
Request body
Example request
Example response
Running agents
Run an agent
input through the Gizzi runtime using the agent’s configured brain and system prompt. The call records a run, persists the outcome, and emits CommRails ledger events.
Request body
Example request
Example response (success)
Example response (brain error)
List agent runs
Example response
Stream agent events
Example curl
Example event
Agent identity
Get agent identity
Example response
Set agent identity
Request body
Example request
Example response
Agent metrics
List metrics
Query parameters
Example response
Test suites
List test suites
Example response
Create a test suite
Request body
Example request
Example response
Run an agent test
messages, or a default connectivity probe.
Request body
Example request
Example response
Agent marketplace
The marketplace lets users publish snapshots of their agents, browse published listings, install copies, and rate them.List listings
Query parameters
Example response
Publish an agent
Request body
Example response
Get a listing
Example response
Unpublish a listing
Example response
Install a listing
mode: primary, no parent).
Example response
Rate a listing
Request body
Example request
Example response
Agents v1 remote compatibility surface
The/api/agents/v1/* surface mirrors the shape of widely-used remote agent APIs so existing client code can point at Allternit with minimal changes.
Status
Example response
List models
Example response
Get a model
Example response
Same shape as an item fromlist models.
List tools
Example response
Search tools
Request body
Example response
Same shape aslist tools.
Activate tools
Request body
Example request
Example response
Get a response
response_id, discovered from conversation message metadata.