Agents
Base URL: https://app.neureus.ai
Auth: Authorization: Bearer <api_key>
Endpoints
| Method | Path | Description |
|---|---|---|
POST | /agents | Create an agent |
GET | /agents | List agents |
GET | /agents/:id | Get agent |
PUT | /agents/:id | Update agent |
DELETE | /agents/:id | Delete agent |
POST | /agents/:id/run | Execute the agent (ReAct loop) |
GET | /agents/:id/runs/:runId | Get run audit log |
POST /agents
Request body:
{ name: string; description?: string; model: string; systemPrompt: string; tools?: Array<{ type: string; config?: object }>; maxIterations?: number; // default: 10}Response: { agentId, name, status: "active" }
POST /agents/:id/run
Request body:
{ input: string; sessionId?: string; // correlate runs for the same user session context?: object; // additional context passed to tools}Response:
{ output: string; steps: number; runId: string; tokensUsed: number;}GET /agents/:id/runs/:runId
Returns full ReAct trace — each step includes thought, action, actionInput, observation.
{ "runId": "run_xyz789", "steps": [ { "thought": "I should search the knowledge base for refund policy.", "action": "rag_query", "actionInput": { "query": "refund policy" }, "observation": "Customers may return items within 30 days..." } ], "finalOutput": "Our refund policy allows returns within 30 days..."}