Skip to main content
The Agent API provides endpoints for controlling the agent lifecycle, managing extensions, and interacting with tools.

Start Agent

Create a new agent session.

Request Body

Response

Returns a Session object:

Example

Resume Agent

Resume an existing agent session and load its model/extensions.

Request Body

Response

Example

Stop Agent

Stop a running agent and clean up resources.

Request Body

Example

Restart Agent

Restart an agent, reloading its configuration and extensions.

Request Body

Response

Update Provider

Change the AI model provider for an agent.

Request Body

Example

Update Working Directory

Change the agent’s working directory.

Request Body

List Tools

Get all available tools for a session.

Query Parameters

  • session_id (required): Session identifier
  • extension_name (optional): Filter tools by extension

Response

Example

Call Tool

Directly call a tool (useful for UI integrations).

Request Body

Response

Example

Read Resource

Read a resource from an MCP server.

Request Body

Response

Add Extension

Dynamically add an extension to a running agent.

Request Body

Example

Remove Extension

Remove an extension from a running agent.

Request Body

Example

List Apps

Get available MCP apps from loaded extensions.

Response

Export App

Export an MCP app as HTML.

Response

Returns HTML string of the app.

Import App

Import an MCP app from HTML.

Request Body

Response

Error Responses

All endpoints may return these error codes:

Error Response Format