# Agent

An agent: a model with standing instructions, a one-line summary and the tools it may use. An agent does nothing on its own; an interaction puts it to work.

**Kind:** an object, used in responses.

## Fields

Every field is present in a response; empty ones are `null`.

| Field | Type | Description |
|---|---|---|
| `name` | `string` | The agent's name, unique within its namespace. |
| `versions` | [`AgentVersion`](https://docs.maitento.com/reference/types/agent-version.md)`[]` | Every version of the agent. Interactions name the version they use. |
| `userCreatedById` | `uuid` | The id of the user who created it. A call made with an API key is recorded as the key's user. |
| `namespaceId` | `uuid` | The id of the namespace it belongs to. |
| `tenantId` | `uuid` | The id of the tenant it belongs to. |
| `id` | `uuid` | The unique id. Use it in `by-id` routes and wherever another object refers to this one. |
| `dateCreated` | `datetime` | When it was created, in UTC. |
| `dateUpdated` | `datetime` | When it was last changed, in UTC. |

## Example

```json
{
  "name": "...",
  "versions": [
    {
      "aiModelId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
      "systemPrompt": "...",
      "summaryForOtherAgents": "...",
      "externalOperationReferences": [],
      "routedSubAgents": [],
      "allowSwarm": false,
      "allowWebSearch": false,
      "allowWebFetch": false,
      "version": 0,
      "date": "2026-10-26T12:00:00.0000000Z",
      "isDisabled": false
    }
  ],
  "userCreatedById": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "namespaceId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "tenantId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "id": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "dateCreated": "2026-10-26T12:00:00.0000000Z",
  "dateUpdated": "2026-10-26T12:00:00.0000000Z"
}
```

## Where it's used

- [`agents.create`](https://docs.maitento.com/reference/api/agents.md) (`POST /namespaces/{namespaceName}/agents`)
- [`agents.getByName`](https://docs.maitento.com/reference/api/agents.md) (`GET /namespaces/{namespaceName}/agents/by-name/{name}`)
- [`agents.get`](https://docs.maitento.com/reference/api/agents.md) (`GET /agents/by-id/{id}`)
- [`agents.list`](https://docs.maitento.com/reference/api/agents.md) (`GET /agents`)
- [`agents.list`](https://docs.maitento.com/reference/api/agents.md) (`GET /namespaces/{namespaceName}/agents`)
- [`agents.update`](https://docs.maitento.com/reference/api/agents.md) (`PUT /agents/by-id/{id}`)
- Inside [`BuildEntityOfAgent`](https://docs.maitento.com/reference/types/build-entity-of-agent.md)
