Agent Execution
Execute agents via the REST API.
Run an Agent
POST https://llm.zihin.ai/api/v3/agent/execute
curl -X POST https://llm.zihin.ai/api/v3/agent/execute \
-H "Authorization: Bearer <jwt-token>" \
-H "x-tenant-id: <uuid>" \
-H "x-agent-id: <uuid>" \
-H "Content-Type: application/json" \
-d '{
"message": "List active contracts expiring this month",
"stream": false
}'
List Agents
GET https://llm.zihin.ai/api/agents
Returns all agents for the authenticated tenant.
Get Agent
GET https://llm.zihin.ai/api/agents/:id
Create Agent
POST https://llm.zihin.ai/api/agents
{
"name": "contract-analyst",
"commercial_name": "Contract Analyst",
"bio": "Analyzes contract data and generates reports",
"type": "data_analyst",
"llm_config": {
"model": "auto",
"temperature": 0.3
}
}
Agent Schema
interface Agent {
id: string;
name: string;
commercial_name: string;
bio: string;
type: "data_analyst" | "customer_support" | "sales" | "general";
status: "draft" | "published" | "archived";
llm_config: {
model: string;
temperature?: number;
max_tokens?: number;
};
visibility: "tenant" | "public";
tags?: string[];
created_at: string;
updated_at: string;
}