---
title: "Copy Agent"
method: POST
path: "/agents/{agent_id}/copy"
tags: ["/agents"]
---

# Copy Agent

`POST /agents/{agent_id}/copy`

Copy an existing agent with all its configurations and datastore associations. The copied agent will have "[COPY]" appended to its name.

## Path parameters

- `agent_id` string, uuid, required — ID of the agent to copy

## Response `200`

Successful Response

- CreateAgentOutput — Response to POST /agents request
  - `id` string, uuid, required — ID of the agent
  - `datastore_ids` string[], required — IDs of the datastores associated with the agent. If no datastore was provided as part of the request, this is a singleton list containing the ID of the automatically created datastore.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/contextualai/apis/endpoints.md) · [All operations](https://skmtc.net/contextualai/apis/endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/contextualai/endpoints/versions/ca7f807eec8b/schema)
