Agents

Saved agents

A saved agent lives in your product and has an id like agt_xxxx. Create it once, reuse it on any call. Best when the same agent handles many calls.

The body is the agent configuration shape. This page is just the CRUD around it.

Want to send the config per call without saving? See Inline agents.


Create an agent

POST /v1/agents · scope agents:write

curl -X POST https://platform.eurekatechlabs.com/v1/agents \
  -H "Authorization: Bearer ek_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support Agent",
    "config": {
      "model": "nirwana-1-flash",
      "voiceId": "asha",
      "systemPrompt": "You are a friendly support agent for Acme.",
      "firstMessage": "Hi, you've reached Acme — how can I help?"
    }
  }'
const res = await fetch('https://platform.eurekatechlabs.com/v1/agents', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ek_live_YOUR_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'Support Agent',
    config: {
      model: 'nirwana-1-flash',
      voiceId: 'asha',
      systemPrompt: 'You are a friendly support agent for Acme.',
      firstMessage: "Hi, you've reached Acme — how can I help?",
    },
  }),
});
const agent = await res.json();
console.log(agent.id); // agt_xxxx
{
  "id": "agt_xxxxxxxxxxxx",
  "productId": "prd_xxxxxxxxxxxx",
  "name": "Support Agent",
  "config": { "model": { "code": "nirwana-1-flash", "voice_id": "asha" } },
  "currentVersion": 1,
  "updatedAt": "2025-05-27T09:00:00Z"
}
Body field Required What
name yes A name for you to recognize it by.
config yes The agent configuration.

Update an agent

PATCH /v1/agents/{id} · scope agents:write

Send only what you want to change. Each save bumps currentVersion.

curl -X PATCH https://platform.eurekatechlabs.com/v1/agents/agt_xxxxxxxxxxxx \
  -H "Authorization: Bearer ek_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "config": { "model": "nirwana-1-flash", "voiceId": "aanya", "systemPrompt": "..." } }'

config is replaced as a whole, not merged field-by-field. Send the complete config you want.


List agents

GET /v1/agents · scope agents:read

curl https://platform.eurekatechlabs.com/v1/agents -H "Authorization: Bearer ek_live_YOUR_KEY"
[
  {
    "id": "agt_xxxxxxxxxxxx",
    "name": "Support Agent",
    "config": { "model": { "code": "nirwana-1-flash", "voice_id": "asha" } },
    "currentVersion": 3,
    "updatedAt": "2025-05-20T08:00:00Z"
  }
]

Get one agent

GET /v1/agents/{id} · scope agents:read

curl https://platform.eurekatechlabs.com/v1/agents/agt_xxxxxxxxxxxx -H "Authorization: Bearer ek_live_YOUR_KEY"

Delete an agent

DELETE /v1/agents/{id} · scope agents:write · returns 204

curl -X DELETE https://platform.eurekatechlabs.com/v1/agents/agt_xxxxxxxxxxxx \
  -H "Authorization: Bearer ek_live_YOUR_KEY"

Deleting is permanent. If a number used this agent to answer inbound calls, set it a new one — see Inbound.


Use it on a call

Pass the id as agentId when you make a call:

{ "agentId": "agt_xxxxxxxxxxxx", "toNumber": "+919876543210", "fromNumber": "+918008001234" }

Next