HTTP API
AgentInbox exposes a local control-plane HTTP API over either:
- a Unix domain socket
- a loopback TCP port when started with
serve --port
The HTTP surface is now resource-oriented and is intended to remain stable going forward.
Meta
GET /healthzGET /statusGET /openapi.jsonPOST /gc
Hosts
GET /hostsPOST /hostsGET /hosts/{hostId}GET /hosts/{hostId}/schema
POST /hosts accepts the shared provider/runtime host configuration:
{
"hostType": "github",
"hostKey": "uxcAuth:github-default",
"config": {
"uxcAuth": "github-default"
}
}
Streams / Sources
GET /sourcesPOST /sourcesGET /sources/{sourceId}GET /sources/{sourceId}/schemaPATCH /sources/{sourceId}DELETE /sources/{sourceId}POST /sources/{sourceId}/pausePOST /sources/{sourceId}/resumePOST /sources/{sourceId}/pollPOST /sources/{sourceId}/events
The canonical registration shape is host+stream:
{
"hostId": "hst_...",
"streamKind": "repo_events",
"streamKey": "holon-run/agentinbox",
"config": {
"owner": "holon-run",
"repo": "agentinbox"
}
}
POST /sources is the stream-oriented creation endpoint. GET /sources/{sourceId}
and related routes continue to operate on stream/source instances after
registration.
Agents
GET /agentsPOST /agentsGET /agents/{agentId}DELETE /agents/{agentId}
Activation Targets
GET /agents/{agentId}/targetsPOST /agents/{agentId}/targetsDELETE /agents/{agentId}/targets/{targetId}
Timers
GET /timersPOST /timersPOST /timers/{scheduleId}/pausePOST /timers/{scheduleId}/resumeDELETE /timers/{scheduleId}
POST /timers accepts a narrow reminder body:
{
"agentId": "agt_...",
"at": "2026-04-15T08:00:00+08:00",
"message": "Analyze the agentinbox project and prepare today's task plan.",
"sender": "timer"
}
Use exactly one of at, every, or cron. every is an interval in milliseconds. timezone is optional and defaults to the daemon host timezone.
Subscriptions
GET /subscriptionsPOST /subscriptionsGET /subscriptions/{subscriptionId}DELETE /subscriptions/{subscriptionId}POST /subscriptions/{subscriptionId}/pollGET /subscriptions/{subscriptionId}/lagPOST /subscriptions/{subscriptionId}/reset
POST /subscriptions accepts:
{
"agentId": "agt_...",
"sourceId": "src_...",
"filter": {},
"trackedResourceRef": "pr:373",
"cleanupPolicy": {
"mode": "on_terminal_or_at",
"at": "2026-05-01T00:00:00.000Z",
"gracePeriodSecs": 300
}
}
cleanupPolicy defaults to {"mode":"manual"} when omitted.
POST /subscriptions always returns an envelope:
{
"subscriptions": [
{
"subscriptionId": "sub_...",
"agentId": "agt_...",
"sourceId": "src_..."
}
]
}
Non-shortcut creation returns one element. A shortcut may expand into multiple
subscriptions, so callers should always read subscriptions[].
Inbox
GET /agents/{agentId}/inboxGET /agents/{agentId}/inbox/itemsPOST /agents/{agentId}/inbox/itemsGET /agents/{agentId}/inbox/watchPOST /agents/{agentId}/inbox/ackPOST /agents/{agentId}/inbox/compact
POST /agents/{agentId}/inbox/items accepts a narrow direct-text ingress body:
{
"message": "Review PR #51 CI failure and push a fix.",
"sender": "local-script"
}
message is required. sender is optional.
POST /agents/{agentId}/inbox/ack accepts exactly one of:
{ "throughEntryId": "ent_..." }
{ "entryIds": ["ent_..."] }
{ "all": true }
Notes
-
The OpenAPI contract is generated from the same Fastify route schemas used for runtime validation and is served at
GET /openapi.json. -
local_eventis the only source type that supports direct manual append throughPOST /sources/{sourceId}/events. -
remote_sourceis supported and requiresconfig.modulePath(and optionalconfig.moduleConfig) on the stream/source config when registering. -
PATCH /sources/{sourceId}updates persistedconfigand/orconfigRefwithout changing thesourceIdor existing subscriptions. Active/error sources are re-ensured after update; paused sources keep their paused lifecycle state until explicitly resumed. -
POST /sources/{sourceId}/pauseandPOST /sources/{sourceId}/resumeapply only to managed remote sources. Pause stops the managed runtime without deleting its binding or stream state. Resume re-enters the normal ensure path.POST /sources/{sourceId}/polldoes not implicitly resume a paused source. -
GET /sources/{sourceId}may includeidleStatefor managed remote sources that are waiting for auto-pause or were auto-paused after their last subscription was removed.