Duplicate AI Agent

Create a disabled copy of an existing AI agent in the same pipe, keeping its full configuration

Before You Begin

Prerequisites

  • You must have admin permission on the pipe or table where the source agent lives.
  • The organization must have the AI Agents feature enabled.
  • You need the UUID of the agent you want to duplicate. See AI Agent query to look it up.

Duplicate an AI Agent

duplicateAiAgent creates a copy of an existing agent in the same pipe or table. The copy preserves the original configuration:

  • Agent-level instruction and dataSourceIds (knowledge bases).
  • Every behavior — trigger event and params, instruction, actions, capabilities, condition, and response schema.

Two things are intentionally different on the copy:

  • Name: the original name with a (copy) suffix (e.g. Support AgentSupport Agent (copy)). If that name is already taken in the pipe, an index is appended (Support Agent (copy 2)).
  • Status: the copy is always created disabled, so you can review it before it runs. Enable it afterwards with Update AI Agent Status.

Inputs

  • agentUuid: UUID of the agent to duplicate (required).
mutation {
  duplicateAiAgent(input: {
    agentUuid: "bfcf25c0-afcf-40db-8a63-04094620c1e8"
  }) {
    agent {
      uuid
      name
      instruction
      repoUuid
      dataSourceIds
      disabledAt
      behaviors {
        id
        name
        active
        event_id
        action_id
      }
    }
  }
}

Response:

{
  "data": {
    "duplicateAiAgent": {
      "agent": {
        "uuid": "7a1f0c4e-2b9d-4e8a-9c11-5f0b2d6a8e34",
        "name": "Customer Support Agent (copy)",
        "instruction": "You help customers with their inquiries. Be concise and accurate.",
        "repoUuid": "1cc2bce3-1ea3-4af0-8fe9-0b899c73ae84",
        "dataSourceIds": ["93779687-19d5-42dd-8b8a-e8b75e1c12dd"],
        "disabledAt": "2026-06-12T18:30:00Z",
        "behaviors": [
          {
            "id": "984512",
            "name": "Summarize comments when card moves",
            "active": false,
            "event_id": "card_moved",
            "action_id": "ai_behavior"
          }
        ]
      }
    }
  }
}

Response explained

  • agent.uuid: Unique identifier of the newly created copy (different from the source).
  • agent.name: The source name with the (copy) suffix.
  • agent.instruction / dataSourceIds: Copied from the source agent.
  • agent.disabledAt: A timestamp — the copy is always created disabled.
  • agent.behaviors: The duplicated behaviors. They are brand-new behaviors (new ids) that mirror the source's configuration, and are created inactive together with the disabled agent.

Key Notes

  • Same pipe only: the copy is always created in the same pipe or table as the source. Duplicating into a different pipe is not supported.
  • Disabled by design: review the copy and enable it (and its behaviors) when you are ready. See Update AI Agent Status and Update AI Agent.
  • Independent copy: duplicating provisions a new service account and new behaviors for the copy. Editing or deleting the copy never affects the source agent, and vice versa.
  • Error handling: on failure, agent is null and an errors[].message describes the problem (for example, when the source agent UUID does not exist or you lack permission to manage AI agents).

See also