Agents
Run an autonomous task with the Kriya agent. The agent plans, calls the tools you allow, and returns the full step trace plus a final result.
POST https://api.setu.dwet.ai/v1/agents/run
Request body
| Field | Type | Description |
|---|---|---|
model | string | Agent model ID, e.g. kriya-v1. |
task | string | The objective for the agent to accomplish. |
tools | string[] | Allowed tool ids: web_search, browser, code_runner, file_io, http_request. |
Example request
bash
curl https://api.setu.dwet.ai/v1/agents/run \
-H "Authorization: Bearer $SETU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kriya-v1",
"task": "Research the top 3 UPI providers and summarize their fees",
"tools": ["web_search", "code_runner"]
}'Example response
json
{
"id": "run-abc123",
"object": "agent.run",
"created": 1782033025,
"model": "kriya-v1",
"status": "completed",
"steps": [
{ "index": 0, "kind": "plan", "title": "Plan", "detail": "..." },
{ "index": 1, "kind": "tool", "title": "Call Web Search", "tool": "web_search", "detail": "..." },
{ "index": 2, "kind": "observation", "title": "Observation", "detail": "..." },
{ "index": 3, "kind": "final", "title": "Final answer", "detail": "..." }
],
"output": "Task complete...",
"usage": { "prompt_tokens": 18, "completion_tokens": 120, "total_tokens": 138 }
}Each step has a kind of plan, tool, observation or final. Runs are billed by tokens against the project that owns the key. See Models for agent model IDs.