---
title: "Clone an AI Agent (v2)"
method: POST
path: "/v2/agents/{idOrAddress}/clone"
tags: ["Agents"]
---

# Clone an AI Agent (v2)

`POST /v2/agents/{idOrAddress}/clone`

## Request

- Base URL: `https://api.chat.ethora.com`
- URL: `https://api.chat.ethora.com/v2/agents/{idOrAddress}/clone`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Creates a copy owned by the caller, with a fresh address. The copy
takes the source's configuration (prompt, model, response settings,
categories, Memory, heartbeat, flows) and always starts `private`.
This is how tenants customise a platform-owned agent such as the
Support Agent template.

Any agent that is not `private` can be cloned; a private one only by
its owner. Supports `User JWT` and `B2B Server JWT`. Requires the
account's agents capability.

With `includeKnowledge: true` the source's knowledge (Web Index and
Docs Index rows carrying the source's id, and their embeddings) is
copied into the clone's home App under the clone's id. The clone is
created either way; `knowledge` says what was copied.

## Path parameters

- `idOrAddress` string, required

## Request body

- object
  - `displayName` string: Name of the copy. Default is the source's name plus " (copy)".
  - `ownerAppId` string: Home App of the copy. Must be an App the caller manages. Default is the caller's App.
  - `includeKnowledge` boolean: Also copy the source's web/doc knowledge and embeddings.

## Response `201`

```
{
  ok: true,
  agent: Agent,
  // only when includeKnowledge was true:
  knowledge?: { copied: true, sites: number, docs: number, chunks: number|null }
            | { copied: false, reason: string }
}
```

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: `FORBIDDEN` (private agent of another owner), `OWNER_APP_FORBIDDEN` (ownerAppId is not an App the caller manages), or `AGENTS_DISABLED`.
- `404`: ``` { error: 'Agent not found', code: 'AGENT_NOT_FOUND' } ```
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/ethora/apis/platform-api.md) · [All operations](https://skmtc.dev/ethora/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ethora/apis/platform-api/revisions/01b6e64378ee?raw)
