Execute a task using the Lumo AI agent platform. The agent will automatically select and execute the appropriate tools based on the task requirements. Supports both function-calling and code-based agents.
/run endpoint is the primary way to interact with Lumo agents. It accepts a task description and executes it using the specified agent type, automatically managing tool selection, context, and execution flow.
agent_type: "code-agent" to use this agent type.Bearer token authentication. Get your API key from https://lumo.starlight-search.com/dashboard
Task configuration and parameters
The task description that the agent should complete. This can be a question, instruction, or complex multi-step task.
"What is the weather in Berlin?"
The AI model identifier to use for the task. This should match the model format expected by your base_url provider (e.g., OpenAI, Anthropic, etc.).
"gpt-4.1-nano"
The base URL for the chat completions API endpoint. This should point to your model provider's API.
"https://api.openai.com/v1/chat/completions"
Array of tool identifiers available to the agent. The agent will automatically select and use these tools as needed to complete the task.
["ExaSearchTool", "VisitWebsite"]Maximum number of steps the agent can take to complete the task. If not specified, the agent will continue until the task is completed or reaches a timeout.
x >= 13
Type of agent to use. 'function-calling' uses traditional function selection and execution. 'code-agent' uses executable Python code as actions, providing greater flexibility and efficiency for complex tasks. 'mcp' uses Model Context Protocol remote servers to connect to self-hosted toolchains.
function-calling, code-agent, mcp Array of MCP remote server configurations. Required when agent_type is 'mcp'. Each server configuration specifies how to launch and connect to an MCP server.
[
{
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.linear.app/sse",
"--header",
"Authorization: Bearer ${AUTH_TOKEN}"
],
"env": { "AUTH_TOKEN": "YOUR-AUTH_TOKEN" }
}
]Optional conversation history or system messages. If not provided, the task will be treated as a standalone request.