Sends a message and returns immediately. The full response will be sent over WebSocket
| message | string The user message text |
| sessionId | string The session to use for this message |
| stream | boolean Set to true to receive streaming chunks over WebSocket |
object Optional image data to include with the message | |
object Optional file data to include with the message |
{- "message": "string",
- "sessionId": "string",
- "stream": true,
- "imageData": {
- "base64": "string",
- "mimeType": "string"
}, - "fileData": {
- "base64": "string",
- "mimeType": "string",
- "filename": "string"
}
}{- "response": "string",
- "sessionId": "string"
}Sends a message and waits for the full response
| message | string The user message text |
| sessionId | string The session to use for this message |
| stream | boolean Set to true to receive streaming chunks over WebSocket |
object Optional image data to include with the message | |
object Optional file data to include with the message |
{- "message": "string",
- "sessionId": "string",
- "stream": true,
- "imageData": {
- "base64": "string",
- "mimeType": "string"
}, - "fileData": {
- "base64": "string",
- "mimeType": "string",
- "filename": "string"
}
}{- "response": "string",
- "sessionId": "string"
}Resets the conversation history for a given session
| sessionId | string The ID of the session to reset |
{- "sessionId": "string"
}{- "status": "string",
- "sessionId": "string"
}Creates a new session
| sessionId | string A custom ID for the new session |
{- "sessionId": "string"
}{- "session": {
- "id": "string",
- "createdAt": 0,
- "lastActivity": 0,
- "messageCount": 0,
- "title": "string"
}
}Updates the title of an existing session
| sessionId required | string Session identifier |
| title required | string [ 1 .. 120 ] characters New title for the session (maximum 120 characters) |
{- "title": "string"
}{- "session": {
- "id": "string",
- "createdAt": 0,
- "lastActivity": 0,
- "messageCount": 0,
- "title": "string"
}
}Retrieves the conversation history for a session
| sessionId required | string Session identifier |
{- "history": [
- {
- "role": "system",
- "timestamp": 0,
- "content": "string",
- "reasoning": "string",
- "tokenUsage": {
- "inputTokens": 0,
- "outputTokens": 0,
- "reasoningTokens": 0,
- "totalTokens": 0
}, - "model": "string",
- "provider": "string",
- "router": "string",
- "toolCalls": [
- {
- "id": "string",
- "type": "function",
- "function": {
- "name": "string",
- "arguments": "string"
}
}
], - "toolCallId": "string",
- "name": "string"
}
]
}Sets a session as the current active session
| sessionId required | string Session identifier |
{ }{- "status": "loaded",
- "sessionId": "string",
- "currentSession": "string"
}Retrieves the current LLM configuration for the agent or a specific session
| sessionId | string Session identifier to retrieve session-specific LLM configuration |
{- "config": {
- "provider": "openai",
- "model": "string",
- "apiKey": "string",
- "maxIterations": 50,
- "router": "vercel",
- "baseURL": "string",
- "maxInputTokens": 0,
- "maxOutputTokens": 0,
- "temperature": 1,
- "allowedMediaTypes": [
- "string"
], - "displayName": "string"
}
}Providers, models, capabilities, and API key status
string or Array of strings Comma-separated list of LLM providers to filter by | |
string or string or string or string Filter by API key presence (true or false) | |
| router | string Enum: "vercel" "in-built" Filter by router type (vercel or in-built) |
| fileType | string Enum: "pdf" "image" "audio" Filter by supported file type (audio, pdf, or image) |
string or string or string or string Include only default models (true or false) | |
| mode | string Default: "grouped" Enum: "grouped" "flat" Response format mode (grouped by provider or flat list) |
{- "models": [
- {
- "name": "string",
- "maxInputTokens": 0,
- "default": true,
- "supportedFileTypes": [
- "audio"
], - "supportedRouters": [
- "vercel"
], - "displayName": "string",
- "pricing": {
- "inputPerM": 0,
- "outputPerM": 0,
- "cacheReadPerM": 0,
- "cacheWritePerM": 0,
- "currency": "USD",
- "unit": "per_million_tokens"
}, - "provider": "string"
}
]
}Stores an API key for a provider in .env and makes it available immediately
| provider required | string Enum: "openai" "openai-compatible" "anthropic" "google" "groq" "xai" "cohere" LLM provider identifier (e.g., openai, anthropic) |
| apiKey required | string non-empty API key for the provider |
{- "provider": "openai",
- "apiKey": "string"
}{- "ok": true,
- "provider": "openai",
- "envVar": "string"
}Switches the LLM configuration for the agent or a specific session
| sessionId | string Session identifier for session-specific LLM configuration |
| provider | string Enum: "openai" "openai-compatible" "anthropic" "google" "groq" "xai" "cohere" LLM provider (e.g., 'openai', 'anthropic', 'google', 'groq') |
| model | string Specific model name for the selected provider |
| apiKey | string API key for provider; can be given directly or via $ENV reference |
| maxIterations | integer > 0 Max iterations for agentic loops |
| router | string Enum: "vercel" "in-built" Router to use (vercel | in-built) |
| baseURL | string Base URL for provider (e.g., https://api.openai.com/v1). Only certain providers support this. |
| maxInputTokens | integer > 0 Max input tokens for history; required for unknown models |
| maxOutputTokens | integer > 0 Max tokens for model output |
| temperature | number or null [ 0 .. 1 ] Randomness: 0 deterministic, 1 creative |
| allowedMediaTypes | Array of strings MIME type patterns for media expansion (e.g., "image/*", "application/pdf"). If omitted, uses model capabilities from registry. Supports wildcards. |
{- "sessionId": "string",
- "provider": "openai",
- "model": "string",
- "apiKey": "string",
- "maxIterations": 0,
- "router": "vercel",
- "baseURL": "string",
- "maxInputTokens": 0,
- "maxOutputTokens": 0,
- "temperature": 1,
- "allowedMediaTypes": [
- "string"
]
}{- "config": {
- "provider": "openai",
- "model": "string",
- "apiKey": "string",
- "maxIterations": 50,
- "router": "vercel",
- "baseURL": "string",
- "maxInputTokens": 0,
- "maxOutputTokens": 0,
- "temperature": 1,
- "allowedMediaTypes": [
- "string"
]
}, - "sessionId": "string"
}Connects a new MCP server dynamically
| name required | string non-empty A unique name for the server |
required | object or object or object The server configuration object |
| persistToAgent | boolean If true, saves the server to agent configuration file |
{- "name": "string",
- "config": {
- "type": "stdio",
- "command": "string",
- "args": [ ],
- "env": { },
- "timeout": 30000,
- "connectionMode": "strict"
}, - "persistToAgent": true
}{- "status": "string",
- "name": "string"
}Retrieves the list of tools available on a specific MCP server
| serverId required | string The ID of the MCP server |
{- "tools": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "inputSchema": {
- "property1": null,
- "property2": null
}
}
]
}Executes a tool on an MCP server directly
| serverId required | string The ID of the MCP server |
| toolName required | string The name of the tool to execute |
| property name* additional property | any or null |
{- "property1": null,
- "property2": null
}{- "success": true,
- "data": null,
- "error": "string"
}Retrieves all resources available from a specific MCP server
| serverId required | string The ID of the MCP server |
{- "success": true,
- "resources": [
- {
- "uri": "string",
- "name": "string",
- "description": "string",
- "mimeType": "string"
}
]
}Reads content from a specific resource on an MCP server. This endpoint automatically constructs the qualified URI format (mcp:serverId:resourceId)
| serverId required | string The ID of the MCP server |
| resourceId required | string non-empty The URI-encoded resource identifier on that server |
{- "success": true,
- "data": {
- "content": null
}
}Registers a new webhook endpoint to receive agent events
| url required | string <uri> The URL to send webhook events to (must be a valid HTTP/HTTPS URL) |
| secret | string A secret key for HMAC signature verification |
| description | string A description of the webhook for reference |
{- "secret": "string",
- "description": "string"
}{- "webhook": {
- "id": "string",
- "description": "string",
- "createdAt": "string"
}
}{- "webhooks": [
]
}Sends a sample event to test webhook connectivity and configuration
| webhookId required | string The webhook identifier |
{- "test": "completed",
- "result": {
- "success": true,
- "statusCode": 0,
- "responseTime": 0,
- "error": "string"
}
}Searches for messages across all sessions or within a specific session
| q required | string non-empty Search query string |
| limit | number [ 1 .. 100 ] Maximum number of results to return (default: 20) |
| offset | number or null >= 0 Number of results to skip for pagination (default: 0) |
| sessionId | string Limit search to a specific session |
| role | string Enum: "user" "assistant" "system" "tool" Filter by message role |
{- "results": [
- {
- "sessionId": "string",
- "message": {
- "role": "system",
- "timestamp": 0,
- "content": "string",
- "reasoning": "string",
- "tokenUsage": {
- "inputTokens": 0,
- "outputTokens": 0,
- "reasoningTokens": 0,
- "totalTokens": 0
}, - "model": "string",
- "provider": "string",
- "router": "string",
- "toolCalls": [
- {
- "id": "string",
- "type": "function",
- "function": {
- "name": "string",
- "arguments": "string"
}
}
], - "toolCallId": "string",
- "name": "string"
}, - "matchedText": "string",
- "context": "string",
- "messageIndex": 0
}
], - "total": 0,
- "hasMore": true,
- "query": "string"
}Searches for sessions that contain the specified query
| q required | string non-empty Search query string |
{- "results": [
- {
- "sessionId": "string",
- "matchCount": 0,
- "firstMatch": {
- "sessionId": "string",
- "message": {
- "role": "system",
- "timestamp": 0,
- "content": "string",
- "reasoning": "string",
- "tokenUsage": {
- "inputTokens": 0,
- "outputTokens": 0,
- "reasoningTokens": 0,
- "totalTokens": 0
}, - "model": "string",
- "provider": "string",
- "router": "string",
- "toolCalls": [
- {
- "id": "string",
- "type": "function",
- "function": {
- "name": "string",
- "arguments": "string"
}
}
], - "toolCallId": "string",
- "name": "string"
}, - "matchedText": "string",
- "context": "string",
- "messageIndex": 0
}, - "metadata": {
- "createdAt": 0,
- "lastActivity": 0,
- "messageCount": 0
}
}
], - "total": 0,
- "hasMore": true,
- "query": "string"
}Creates a new memory
| content required | string [ 1 .. 10000 ] characters The memory content |
| tags | Array of strings <= 10 items [ items [ 1 .. 50 ] characters ] Optional tags |
object Optional metadata |
{- "content": "string",
- "tags": [
- "string"
], - "metadata": {
- "source": "user",
- "pinned": true
}
}{- "ok": true,
- "memory": {
- "id": "string",
- "content": "string",
- "createdAt": 0,
- "updatedAt": 0,
- "tags": [
- "string"
], - "metadata": {
- "source": "user",
- "pinned": true
}
}
}Retrieves a list of all memories with optional filtering
| tags | string Comma-separated list of tags to filter by |
| source | string Enum: "user" "system" Filter by source (user or system) |
| pinned | string Filter by pinned status (true or false) |
| limit | string Maximum number of memories to return |
| offset | string Number of memories to skip |
{- "ok": true,
- "memories": [
- {
- "id": "string",
- "content": "string",
- "createdAt": 0,
- "updatedAt": 0,
- "tags": [
- "string"
], - "metadata": {
- "source": "user",
- "pinned": true
}
}
]
}Retrieves a specific memory by its unique identifier
| id required | string non-empty Memory unique identifier |
{- "ok": true,
- "memory": {
- "id": "string",
- "content": "string",
- "createdAt": 0,
- "updatedAt": 0,
- "tags": [
- "string"
], - "metadata": {
- "source": "user",
- "pinned": true
}
}
}Updates an existing memory. Only provided fields will be updated
| id required | string non-empty Memory unique identifier |
| content | string [ 1 .. 10000 ] characters Updated content |
| tags | Array of strings <= 10 items [ items [ 1 .. 50 ] characters ] Updated tags (replaces existing) |
object Updated metadata (merges with existing) |
{- "content": "string",
- "tags": [
- "string"
], - "metadata": {
- "source": "user",
- "pinned": true
}
}{- "ok": true,
- "memory": {
- "id": "string",
- "content": "string",
- "createdAt": 0,
- "updatedAt": 0,
- "tags": [
- "string"
], - "metadata": {
- "source": "user",
- "pinned": true
}
}
}{- "prompts": [
- {
- "name": "string",
- "title": "string",
- "description": "string",
- "arguments": [
- {
- "name": "string",
- "description": "string",
- "required": true
}
], - "source": "mcp",
- "metadata": {
- "property1": null,
- "property2": null
}
}
]
}Creates a new custom prompt with optional resource attachment. Maximum request size: 10MB
| name required | string non-empty Unique name for the custom prompt |
| title | string Display title for the prompt |
| description | string Description of what the prompt does |
| content required | string non-empty The prompt content text (can include {{argumentName}} placeholders) |
Array of objects Array of argument definitions | |
object Attach a resource to this prompt |
{- "name": "string",
- "title": "string",
- "description": "string",
- "content": "string",
- "arguments": [
- {
- "name": "string",
- "description": "string",
- "required": true
}
], - "resource": {
- "base64": "string",
- "mimeType": "string",
- "filename": "string"
}
}{- "prompt": {
- "name": "string",
- "title": "string",
- "description": "string",
- "arguments": [
- {
- "name": "string",
- "description": "string",
- "required": true
}
], - "source": "mcp",
- "metadata": {
- "property1": null,
- "property2": null
}
}
}Fetches the definition for a specific prompt
| name required | string non-empty The prompt name |
{- "definition": {
- "name": "string",
- "title": "string",
- "description": "string",
- "arguments": [
- {
- "name": "string",
- "description": "string",
- "required": true
}
]
}
}Resolves a prompt template with provided arguments and returns the final text with resources
| name required | string non-empty The prompt name |
| context | string Additional context for prompt resolution |
| args | string Arguments to substitute in the prompt template (pass as a JSON string) |
{- "text": "string",
- "resources": [
- "string"
]
}Reads the content of a specific resource by its URI. The resource ID in the URL must be URI-encoded
| resourceId required | string non-empty The URI-encoded resource identifier |
{- "ok": true,
- "content": {
- "contents": [
- {
- "uri": "string",
- "mimeType": "string",
- "text": "string",
- "blob": "string"
}
], - "_meta": {
- "property1": null,
- "property2": null
}
}
}Saves and applies YAML agent configuration. Creates backup before saving
| yaml required | string non-empty YAML agent configuration content to save |
{- "yaml": "string"
}{- "ok": true,
- "path": "string",
- "reloaded": true,
- "restarted": true,
- "changesApplied": [
- "string"
], - "message": "string"
}Validates YAML agent configuration without saving it
| yaml required | string non-empty YAML agent configuration content to validate |
{- "yaml": "string"
}{- "valid": true,
- "errors": [
- {
- "line": 0,
- "column": 0,
- "path": "string",
- "message": "string",
- "code": "string"
}
], - "warnings": [
- {
- "path": "string",
- "message": "string",
- "code": "string"
}
]
}{- "installed": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "author": "string",
- "tags": [
- "string"
], - "type": "builtin"
}
], - "available": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "author": "string",
- "tags": [
- "string"
], - "type": "builtin"
}
], - "current": {
- "id": "string",
- "name": "string"
}
}Installs an agent from the registry or from a custom source
| id required | string non-empty Unique agent identifier |
| name | string Display name (defaults to derived from id) |
| sourcePath required | string non-empty Path to agent configuration file or directory |
required | object Agent metadata including description, author, and tags |
| injectPreferences | boolean Default: true Whether to inject user preferences into agent config |
{- "id": "string",
- "path": "string"
}{- "installed": true,
- "id": "string",
- "name": "string",
- "type": "builtin"
}Switches to a different agent by ID or file path
| id required | string non-empty Unique agent identifier (e.g., "database-agent") |
| path | string Optional absolute file path for file-based agents (e.g., "/path/to/agent.yml") |
{- "id": "string",
- "path": "string"
}{- "switched": true,
- "id": "string",
- "name": "string"
}Checks if an agent ID conflicts with existing agents
| id required | string non-empty Unique agent identifier (e.g., "database-agent") |
| path | string Optional absolute file path for file-based agents (e.g., "/path/to/agent.yml") |
{- "id": "string",
- "path": "string"
}{- "valid": true,
- "conflict": "string",
- "message": "string"
}Removes an agent from the system. Custom agents are removed from registry; builtin agents can be reinstalled
| id required | string non-empty Unique agent identifier to uninstall |
| force | boolean Default: false Force uninstall even if agent is currently active |
{- "id": "string",
- "force": false
}{- "uninstalled": true,
- "id": "string"
}Creates a new custom agent from scratch via the UI/API
| id required | string non-empty ^[a-z0-9-]+$ Unique agent identifier |
| name required | string non-empty Display name for the agent |
| description required | string non-empty One-line description of the agent |
| author | string Author or organization |
| tags | Array of strings Default: [] Tags for discovery |
required | object LLM configuration |
| systemPrompt required | string non-empty System prompt for the agent |
{- "id": "string",
- "name": "string",
- "description": "string",
- "author": "string",
- "tags": [ ],
- "llm": {
- "provider": "openai",
- "model": "string",
- "apiKey": "string"
}, - "systemPrompt": "string"
}{- "created": true,
- "id": "string",
- "name": "string"
}