> For the complete documentation index, see [llms.txt](https://docs.amigo.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amigo.ai/developer-guide/platform-api/workspaces/agents.md).

# Agents

Agents define the AI persona: identity, voice, background knowledge, behavioral guidelines, and communication style. Each agent supports immutable versioning. Creating a new version auto-increments the version number, and existing versions stay untouched.

{% hint style="info" %}
**Classic API vs Platform API**: The Classic API also has agent endpoints. The Platform API agents are workspace-scoped and support richer configuration. Use the Platform API for agent setup; the Classic API resolves agents at conversation runtime.
{% endhint %}

## Key Concepts

* **Agent**: A named container with a description. Holds multiple versions.
* **Agent Version**: An immutable snapshot of the agent's full configuration, including identity, voice, background, behaviors, and communication patterns.
* **Identity**: The agent's persona name, role, developer attribution, default language, and relationship-to-developer settings (ownership, conversation/thought visibility).
* **Voice Config**: Links the agent to a specific voice for text-to-speech.

## Endpoints

### Create an agent

{% openapi src="<https://api.platform.amigo.ai/v1/openapi.json>" path="/v1/{workspace\_id}/agents" method="post" %}
<https://api.platform.amigo.ai/v1/openapi.json>
{% endopenapi %}

### List agents

Paginated and searchable.

{% openapi src="<https://api.platform.amigo.ai/v1/openapi.json>" path="/v1/{workspace\_id}/agents" method="get" %}
<https://api.platform.amigo.ai/v1/openapi.json>
{% endopenapi %}

### Get an agent

{% openapi src="<https://api.platform.amigo.ai/v1/openapi.json>" path="/v1/{workspace\_id}/agents/{agent\_id}" method="get" %}
<https://api.platform.amigo.ai/v1/openapi.json>
{% endopenapi %}

### Update agent name/description

{% openapi src="<https://api.platform.amigo.ai/v1/openapi.json>" path="/v1/{workspace\_id}/agents/{agent\_id}" method="put" %}
<https://api.platform.amigo.ai/v1/openapi.json>
{% endopenapi %}

### Delete an agent

Deletion returns `409 Conflict` while one or more services reference the agent. Update or delete those services before retrying.

{% openapi src="<https://api.platform.amigo.ai/v1/openapi.json>" path="/v1/{workspace\_id}/agents/{agent\_id}" method="delete" %}
<https://api.platform.amigo.ai/v1/openapi.json>
{% endopenapi %}

### Create a new version

{% openapi src="<https://api.platform.amigo.ai/v1/openapi.json>" path="/v1/{workspace\_id}/agents/{agent\_id}/versions" method="post" %}
<https://api.platform.amigo.ai/v1/openapi.json>
{% endopenapi %}

### List versions

Paginated.

{% openapi src="<https://api.platform.amigo.ai/v1/openapi.json>" path="/v1/{workspace\_id}/agents/{agent\_id}/versions" method="get" %}
<https://api.platform.amigo.ai/v1/openapi.json>
{% endopenapi %}

### Get a specific version

Use the version number or `latest` to retrieve the most recent version.

{% openapi src="<https://api.platform.amigo.ai/v1/openapi.json>" path="/v1/{workspace\_id}/agents/{agent\_id}/versions/{version}" method="get" %}
<https://api.platform.amigo.ai/v1/openapi.json>
{% endopenapi %}

## Versioning Workflow

1. Create an agent (name + description)
2. Create version 1 with full identity, background, and behaviors
3. Iterate by creating new versions. Each gets an auto-incremented number.
4. Pin specific versions in [Services](/developer-guide/platform-api/workspaces/services.md) via version sets

Use `latest` as the version parameter to retrieve the most recent version without knowing its number.

Deleting an agent removes its metadata but keeps all versions for audit. Services continue to function with their pinned versions.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.amigo.ai/developer-guide/platform-api/workspaces/agents.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
