> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cekura.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Agents

> Create, configure, and manage voice AI agents

export const CopyPageButton = () => {
  if (typeof window !== 'undefined') {
    setTimeout(function () {
      if (document.getElementById('ck-tools')) return;
      var anchor = document.getElementById('content-area') || document.querySelector('.mdx-content');
      if (!anchor) return;
      if (!document.getElementById('ck-style')) {
        var s = document.createElement('style');
        s.id = 'ck-style';
        s.textContent = '#ck-tools{position:absolute;top:6px;right:0;z-index:100;font-family:inherit;}' + '.ck-row{display:inline-flex;align-items:stretch;border:1px solid rgba(0,0,0,0.15);border-radius:8px;overflow:hidden;background:#fff;}' + ':root.dark .ck-row{background:rgba(255,255,255,0.06);border-color:rgba(255,255,255,0.12);}' + '.ck-btn{padding:5px 12px;border:none;background:none;cursor:pointer;font-size:13px;font-weight:500;font-family:inherit;color:#374151;}' + ':root.dark .ck-btn{color:#d1d5db;}' + '.ck-btn:hover{background:rgba(0,0,0,0.04);}' + ':root.dark .ck-btn:hover{background:rgba(255,255,255,0.06);}' + '.ck-chevron{padding:5px 8px;border:none;background:none;cursor:pointer;font-size:14px;font-family:inherit;color:#374151;}' + ':root.dark .ck-chevron{color:#d1d5db;}' + '.ck-chevron:hover{background:rgba(0,0,0,0.04);}' + ':root.dark .ck-chevron:hover{background:rgba(255,255,255,0.06);}' + '.ck-divider{width:1px;background:rgba(0,0,0,0.12);flex-shrink:0;}' + ':root.dark .ck-divider{background:rgba(255,255,255,0.12);}' + '.ck-dd{position:absolute;top:calc(100% + 4px);right:0;min-width:180px;background:#fff;border:1px solid rgba(0,0,0,0.12);border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,0.1);padding:4px;display:none;z-index:200;}' + ':root.dark .ck-dd{background:#1f2937;border-color:rgba(255,255,255,0.1);box-shadow:0 4px 16px rgba(0,0,0,0.35);}' + '.ck-item{display:block;width:100%;padding:7px 12px;border:none;background:none;border-radius:6px;cursor:pointer;font-size:13px;font-family:inherit;text-align:left;color:#374151;}' + ':root.dark .ck-item{color:#d1d5db;}' + '.ck-item:hover{background:rgba(0,0,0,0.05);}' + ':root.dark .ck-item:hover{background:rgba(255,255,255,0.07);}';
        document.head.appendChild(s);
      }
      var wrap = document.createElement('div');
      wrap.id = 'ck-tools';
      var row = document.createElement('div');
      row.className = 'ck-row';
      var mainBtn = document.createElement('button');
      mainBtn.className = 'ck-btn';
      mainBtn.textContent = 'Copy page';
      var divider = document.createElement('span');
      divider.className = 'ck-divider';
      var chevron = document.createElement('button');
      chevron.className = 'ck-chevron';
      chevron.textContent = '▾';
      var dd = document.createElement('div');
      dd.className = 'ck-dd';
      function closeDD() {
        dd.style.display = 'none';
      }
      function openDD() {
        dd.style.display = 'block';
      }
      chevron.onclick = function (e) {
        e.stopPropagation();
        if (dd.style.display === 'block') {
          closeDD();
        } else {
          openDD();
        }
      };
      document.addEventListener('click', function (e) {
        if (!e.target.closest('#ck-tools')) {
          closeDD();
        }
      });
      document.addEventListener('keydown', function (e) {
        if (e.key === 'Escape') {
          closeDD();
        }
      });
      function makeItem(label, fn) {
        var b = document.createElement('button');
        b.className = 'ck-item';
        b.textContent = label;
        b.onclick = function () {
          fn();
          closeDD();
        };
        return b;
      }
      function getMarkdown() {
        var walk = function (node) {
          if (!node) return '';
          if (node.nodeType === 3) return node.textContent || '';
          if (node.nodeType !== 1) return '';
          var tag = node.tagName.toLowerCase();
          var skip = ['script', 'style', 'svg', 'noscript', 'button', 'iframe'];
          if (skip.indexOf(tag) !== -1) return '';
          if (node.id === 'ck-tools') return '';
          var ch = Array.from(node.childNodes).map(walk).join('');
          if (tag === 'h1') return '\n# ' + ch.trim() + '\n\n';
          if (tag === 'h2') return '\n## ' + ch.trim() + '\n\n';
          if (tag === 'h3') return '\n### ' + ch.trim() + '\n\n';
          if (tag === 'p') return '\n' + ch.trim() + '\n\n';
          if (tag === 'pre') return '\n```\n' + node.textContent.trim() + '\n```\n\n';
          if (tag === 'li') return '- ' + ch.trim() + '\n';
          if (tag === 'code') return '`' + ch.trim() + '`';
          return ch;
        };
        var content = document.querySelector('.mdx-content') || document.getElementById('content-area') || document.body;
        return walk(content).replace(/\n\n\n+/g, '\n\n').trim();
      }
      function copyMd() {
        var md = getMarkdown();
        navigator.clipboard.writeText(md).then(function () {
          mainBtn.textContent = 'Copied!';
          setTimeout(function () {
            mainBtn.textContent = 'Copy page';
          }, 2000);
        });
      }
      function viewMd() {
        var md = getMarkdown();
        var safe = md.split('&').join('&amp;').split('<').join('&lt;').split('>').join('&gt;');
        var html = '<!DOCTYPE html><html><head><meta charset="utf-8"><style>body{font-family:monospace;max-width:860px;margin:40px auto;padding:0 24px;line-height:1.7;white-space:pre-wrap;word-wrap:break-word}</style></head><body>' + safe + '</body></html>';
        window.open(URL.createObjectURL(new Blob([html], {
          type: 'text/html'
        })), '_blank');
      }
      function openClaude() {
        var prompt = 'Can you read this Cekura docs page ' + window.location.href + ' so I can ask you questions?';
        window.open('https://claude.ai/new?q=' + encodeURIComponent(prompt), '_blank');
      }
      mainBtn.onclick = copyMd;
      dd.appendChild(makeItem('Copy page', copyMd));
      dd.appendChild(makeItem('View as Markdown', viewMd));
      dd.appendChild(makeItem('Open in Claude', openClaude));
      row.appendChild(mainBtn);
      row.appendChild(divider);
      row.appendChild(chevron);
      wrap.appendChild(row);
      wrap.appendChild(dd);
      anchor.style.position = 'relative';
      anchor.insertBefore(wrap, anchor.firstChild);
    }, 50);
  }
  return null;
};

<CopyPageButton />

<Note>
  Setup steps and authentication are in the [Overview](/cli-sdk/overview). This page focuses on the agent resource itself.
</Note>

An **agent** is the AI voice assistant under test. It links to a provider (Vapi, Retell, ElevenLabs, LiveKit, Pipecat, or a custom integration), a system prompt, mock tools, a knowledge base, and a set of personalities. Most evaluation workflows start by creating or selecting an agent.

## Create

<Tabs>
  <Tab title="CLI">
    ```bash theme={null}
    cekura agents create \
      --project-id 742 \
      --name "Support Bot" \
      --description "Inbound customer support agent" \
      --provider vapi \
      --vapi-assistant-id asst_abc123
    ```

    For complex configs, write a JSON file and pass it:

    ```bash theme={null}
    cekura agents create --from-file agent.json
    ```
  </Tab>

  <Tab title="SDK">
    ```python theme={null}
    from cekura import Cekura

    client = Cekura()

    agent = client.agents.create(
        project=742,
        agent_name="Support Bot",
        description="Inbound customer support agent",
        provider="vapi",
        vapi_assistant_id="asst_abc123",
    )
    ```
  </Tab>
</Tabs>

## List, get, update

<Tabs>
  <Tab title="CLI">
    ```bash theme={null}
    # List agents in a project
    cekura agents list --project-id 742

    # Inspect one
    cekura agents get 123

    # Patch fields inline
    cekura agents update 123 --json '{"description": "v2 prompt rolled out"}'

    # Or from a file
    cekura agents update 123 --from-file patch.json
    ```
  </Tab>

  <Tab title="SDK">
    ```python theme={null}
    # List
    agents = client.agents.list(project_id=742)

    # Fetch one
    detail = client.agents.get(agent_id=123)

    # Partial update
    client.agents.update(
        agent_id=123,
        description="v2 prompt rolled out",
    )
    ```

    `replace()` performs a full PUT instead of a PATCH — use it when you want to overwrite the entire agent definition.
  </Tab>
</Tabs>

## Mock tools

Mock tools let evaluations run without hitting your real backend.

<Tabs>
  <Tab title="CLI">
    ```bash theme={null}
    # List existing tools
    cekura agents tools-list 123

    # Add a tool
    cekura agents tool-create 123 --from-file booking_tool.json

    # Update / remove
    cekura agents tool-update 123 book_appointment --from-file new.json
    cekura agents tool-destroy 123 book_appointment
    ```
  </Tab>

  <Tab title="SDK">
    ```python theme={null}
    # List
    tools = client.agents.tools_list(123)

    # Create
    client.agents.tools_create(
        agent_id=123,
        name="book_appointment",
        description="Books an appointment for the caller",
        parameters={"date": "string", "time": "string"},
        mock_response={"confirmation_id": "ABC123"},
    )

    # Update by tool name
    client.agents.tool_update(
        123, tool_name="book_appointment", mock_response={...},
    )

    # Remove
    client.agents.tool_destroy(123, tool_name="book_appointment")
    ```
  </Tab>
</Tabs>

## Knowledge base

<Tabs>
  <Tab title="CLI">
    ```bash theme={null}
    cekura agents upload-knowledge-base 123 --file ./policies.pdf
    cekura agents get-knowledge-base 123
    ```
  </Tab>

  <Tab title="SDK">
    ```python theme={null}
    with open("policies.pdf", "rb") as f:
        client.agents.upload_knowledge_base(123, file=f)

    kb = client.agents.get_knowledge_base(123)
    ```
  </Tab>
</Tabs>

## Personalities

Personalities apply across an agent's evaluation runs (e.g. "interruptive", "soft-spoken").

<Tabs>
  <Tab title="CLI">
    ```bash theme={null}
    cekura personalities enable-for-project 742 --personalities 3,29
    cekura personalities disable-for-project 742 --personalities 3
    ```
  </Tab>

  <Tab title="SDK">
    ```python theme={null}
    client.agents.enable_personalities(123, personalities=[3, 29])
    client.agents.disable_personalities(123, personalities=[3])
    ```
  </Tab>
</Tabs>

## Duplicate

Quickly fork an agent for A/B testing or a new prompt variant:

<Tabs>
  <Tab title="CLI">
    ```bash theme={null}
    cekura agents duplicate 123
    ```
  </Tab>

  <Tab title="SDK">
    ```python theme={null}
    client.agents.duplicate(agent_id=123)
    ```
  </Tab>
</Tabs>

## Dynamic variables

Dynamic variables let you inject runtime values into an agent's description using `{{ variable_name }}` syntax. You define the variables on the agent and supply their values when sending call data to the observability endpoint.

### List

```bash theme={null}
GET /test_framework/v1/aiagents/{agent_id}/dynamic-variables/
```

Returns all variable definitions for the agent, ordered by name.

**Response**

```json theme={null}
[
  { "id": 1, "name": "prompt", "description": "Full system prompt for this call", "created_at": "...", "updated_at": "..." },
  { "id": 2, "name": "agent_type", "description": "Role of the agent (sales, support, ...)", "created_at": "...", "updated_at": "..." }
]
```

### Create / update

```bash theme={null}
POST /test_framework/v1/aiagents/{agent_id}/dynamic-variables/
```

Accepts a **list** of `{ name, description }` objects. Each entry is upserted by name — existing variables are updated, new ones are created. Returns the full list of definitions after the operation.

```json theme={null}
[
  { "name": "prompt", "description": "Full system prompt override" },
  { "name": "agent_type", "description": "Agent role for this session" }
]
```

### Update one

```bash theme={null}
PATCH /test_framework/v1/aiagents/{agent_id}/dynamic-variable/{id}/
```

Updates a single variable definition (partial update).

```json theme={null}
{ "description": "Updated description" }
```

### Delete

```bash theme={null}
DELETE /test_framework/v1/aiagents/{agent_id}/dynamic-variable/{id}/
```

Returns `204 No Content`.

***

See [Dynamic Agent Description](/documentation/guides/observability/dynamic-prompting) for how to use these variables at call time.

## See also

<CardGroup cols={2}>
  <Card title="Evaluators" icon="vial" href="/cli-sdk/evaluators">
    Scenarios, test profiles, personalities — the test inputs that run against an agent.
  </Card>

  <Card title="Runs & Results" icon="play" href="/cli-sdk/runs">
    Trigger an evaluation against the agent and inspect the outcome.
  </Card>

  <Card title="Agents API" icon="book" href="/api-reference">
    Full field reference for agent payloads.
  </Card>

  <Card title="Agent setup guide" icon="robot" href="/documentation/key-concepts/agents/Agent_Setup_Guide">
    Concepts, provider integrations, and best practices.
  </Card>
</CardGroup>
