API Reference
Agent API
Endpoints for managing AI agents within Lelu. Register new agents and retrieve their reputation scores.
Register an Agent
POST/api/v1/agents
// Request Body
{
"name": "Customer Support Bot",
"description": "Handles tier 1 support tickets",
"model": "gpt-4" // Optional
}
// Response (201 Created)
{
"id": "agent_abc123",
"name": "Customer Support Bot",
"api_key": "sk_live_...", // Only shown once!
"created_at": "2023-10-27T10:00:00Z"
}Get Agent Reputation
Retrieve an agent's current reputation score, which is calculated based on its history of approved vs. denied requests.
GET/api/v1/agents/:id/reputation
// Response (200 OK)
{
"agent_id": "agent_abc123",
"reputation_score": 0.92,
"total_requests": 150,
"approved_requests": 138,
"denied_requests": 12
}Previous: Queue API
End of Documentation