Skip to main content
POST
/
api
/
agent
/
invoke
curl --request POST \
  --url https://zeus-api.agentspro.cn/api/agent/invoke \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "message": "Analyze the data trends in sales.csv",
    "llm_config": {
      "baseUrl": "https://api.openai.com/v1",
      "apiKey": "sk-...",
      "modelName": "gpt-4o",
      "temperature": 0.7
    },
    "session_id": "sess_456",
    "mode": "agent",
    "enable_sandbox": true,
    "knowledge_base_ids": ["kb_789"],
    "enable_memory": true,
    "tools": [
      {
        "type": "mcp",
        "name": "tavily",
        "base_url": "https://mcp.tavily.com/mcp",
        "api_key": "tvly-..."
      }
    ]
  }'
data: {"type": "message_chunk", "content": "Let me help you analyze"}
data: {"type": "message_chunk", "content": " the data trends in sales.csv"}
data: {"type": "tool_call", "tool_name": "sandbox_exec", "tool_args": {...}}
data: {"type": "tool_result", "tool_name": "sandbox_exec", "result": "..."}
data: {"type": "message_chunk", "content": "Based on the analysis..."}
data: {"type": "done", "session_id": "sess_456"}
The core entry point for Zeus. Starts an Agent conversation with full capabilities including MCP/OAuth tools, knowledge base RAG, memory, sandbox code execution, Skills, HITL approval, and more. Returns an SSE streaming response. See Streaming for message format details.
Authorization
string
required
Bearer JWT Token (user_id is automatically extracted for store isolation)

Core Parameters

message
string
required
User message content
llm_config
object
required
LLM model configuration (sourced from the frontend localStorage)
session_id
string
Session ID for Checkpointer persistence. Auto-generated if not provided
mode
string
default:"agent"
Conversation mode:
  • agent — Full capability mode (default)
  • ask — Read-only Q&A mode, write tools disabled
  • plan — Interactive planning mode

Tool Configuration

tools
array
default:"[]"
Unified tool list. Each tool is distinguished by its type field
enable_sandbox
boolean
default:"true"
Whether to enable the sandbox code execution tool (E2B)
Whether to enable the Web Search Tool (Tavily + DuckDuckGo)

RAG & Memory

knowledge_base_ids
array
default:"[]"
List of knowledge base IDs. When provided, the search_knowledge_base tool is automatically registered
enable_memory
boolean
default:"false"
Whether to enable the Memory Tool (long-term memory read/write)

Skills

skills
object
Skills activation configuration

Context

chat_history
array
default:"[]"
List of historical conversation messages [{ role, content, timestamp? }]
resource_files
array
default:"[]"
List of resource files [{ name, content, type }] (e.g. Markdown prompts)
sandbox_files
array
default:"[]"
Files uploaded to the sandbox [{ name, path, type, size? }]
chat_attachments
array
default:"[]"
User-added chat attachments [{ id, name, size, type, content }]

HITL Approval

tool_interrupt_config
object
Tool interrupt configuration (Human-in-the-Loop)
curl --request POST \
  --url https://zeus-api.agentspro.cn/api/agent/invoke \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "message": "Analyze the data trends in sales.csv",
    "llm_config": {
      "baseUrl": "https://api.openai.com/v1",
      "apiKey": "sk-...",
      "modelName": "gpt-4o",
      "temperature": 0.7
    },
    "session_id": "sess_456",
    "mode": "agent",
    "enable_sandbox": true,
    "knowledge_base_ids": ["kb_789"],
    "enable_memory": true,
    "tools": [
      {
        "type": "mcp",
        "name": "tavily",
        "base_url": "https://mcp.tavily.com/mcp",
        "api_key": "tvly-..."
      }
    ]
  }'
data: {"type": "message_chunk", "content": "Let me help you analyze"}
data: {"type": "message_chunk", "content": " the data trends in sales.csv"}
data: {"type": "tool_call", "tool_name": "sandbox_exec", "tool_args": {...}}
data: {"type": "tool_result", "tool_name": "sandbox_exec", "result": "..."}
data: {"type": "message_chunk", "content": "Based on the analysis..."}
data: {"type": "done", "session_id": "sess_456"}