API

Actions

The actions API covers direct invocation, custom action management, and the response contract for project-owned HTTP actions.

Use a loop action step when the call belongs to a durable process. Use direct invocation to test credentials or call an action outside a loop.

Inspect and invoke actions

The catalog describes actions available to the current project:

GET /v1/projects/{project}/catalog/actions
GET /v1/projects/{project}/catalog/actions/{action_name}

Invoke one action with:

POST /v1/projects/{project}/actions/{action_name}/invoke

Supply a stable Idempotency-Key header when the action can cause an external side effect. Mobius can deduplicate the request, but it cannot roll back a message, charge, or provider update that already succeeded.

Return context from a custom HTTP action

A signed project-owned HTTP action can return a tool result and named application state in one response. Opt in with this exact media type:

HTTP/1.1 200 OK
Content-Type: application/vnd.mobius.action+json
 
{
  "output": {
    "ok": true,
    "shortlisted": "Northstar"
  },
  "context": [
    {
      "name": "naming-board",
      "content": "Current naming board:\nChosen: none\nShortlisted: Northstar"
    }
  ]
}

output becomes the ordinary tool result. Each changed context item is recorded after that result as caller-owned application context. Returning the same byte-identical value again is safe; Mobius skips it while it remains in the active model window.

The SDK names are:

SDKMedia type constantEnvelope type
TypeScriptMOBIUS_ACTION_CONTENT_TYPEActionResponseEnvelope
PythonMOBIUS_ACTION_CONTENT_TYPEActionResponseEnvelope
GoActionResponseContentTypeActionResponseEnvelope

Context limits

  • At most 8 context items and 16 KiB of context content per response.
  • Names must match ^[a-z][a-z0-9-]*$ and be at most 64 characters.
  • Content must be non-empty UTF-8 and at most 8 KiB per item.
  • One turn records at most 64 KiB of action-returned context in total.

Mobius drops an invalid context item and reports it in action-result metadata while preserving valid items and output. A non-object body using the Mobius media type fails the action call. An HTTP status of 400 or higher fails before the body is interpreted.

Only signed customer-defined HTTP actions can return context. Integration, MCP, built-in, and worker actions cannot use this channel. A loop action step also ignores context because it has no active agent turn.

Any other response content type keeps the ordinary action contract. For application/json, the entire body is the tool result, even when it contains keys named output or context.

Next