ApiAgents
Chat with an agent
Run an agent turn: evaluate rules, retrieve across attached knowledge, run the tool-calling loop, and return the answer with citations and a trace.
Run an agent turn: evaluate rules, retrieve across attached knowledge, run the tool-calling loop, and return the answer with citations and a trace.
Authorization
TokenAuth Authorization<token>
Project API key as Token lb-sk_...
In: header
Path Parameters
name*string
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/agents/string/chat" \ -H "Content-Type: application/json" \ -d '{ "messages": [ { "role": "user", "content": "What is the status of order A123?" } ] }'{ "message": { "role": "user", "content": "string" }, "citations": [ { "text": "string", "score": 0, "document_id": "string", "filename": "string" } ], "ui_actions": [ {} ], "escalated": true, "usage": { "tokens_in": 0, "tokens_out": 0 }, "trace": { "matched_rules": [ { "id": "string", "rule_type": "escalation", "condition": "string", "action": "string", "priority": 0 } ], "retrieved": [ { "text": "string", "score": 0, "document_id": "string", "filename": "string" } ], "available_tools": [ "string" ], "tool_calls": [ { "tool": "string", "arguments": "string", "result": "string", "status": "ok" } ], "plan": [ "string" ], "flow_path": [ "string" ], "input_verdict": {}, "output_verdict": {} }}Empty