Logo
Search
API Docs

Duplicating an Assistant

Core Assistant Configuration

Duplicating an Assistant

Overview

There's no single "clone" button for assistants, but duplicating one is a straightforward two-step pattern using the existing API: fetch the source assistant's full configuration, strip the fields the server manages for you, and create a new assistant from what's left. This page covers that general approach, a worked example in two formats, what carries over automatically, and the manual dashboard-based alternative. For the underlying PATCH and DELETE mechanics referenced here, see Assistant Delete & Update (PATCH) API; if you'd rather start from a ready-made configuration instead of duplicating an existing assistant, see Prebuilt Templates & Example Use Cases.


The General Approach

  1. Fetch the existing assistant's full configuration by its ID
  2. Strip server-managed fields that can't be set manually on creation — id, createdAt, updatedAt, and orgId
  3. Optionally rename the assistant so it's distinguishable from the original (e.g., appending "(Copy)" to the name)
  4. Create a new assistant by posting that modified configuration

The new assistant is stored as an entirely separate resource with its own ID, and shows up in the dashboard alongside the original.


Worked Example: Request/Response

Step 1 — fetch the existing configuration:

curl -X GET "https://api.sulus.ai/assistant/{assistantId}" \
  -H "Authorization: Bearer $SULUS_API_KEY"

This returns the full JSON configuration for that assistant, including its model, voice, transcriber, tools, and hooks.

Step 2 — remove the server-managed fields, optionally rename, and create:

curl -X POST "https://api.sulus.ai/assistant" \
  -H "Authorization: Bearer $SULUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Assistant (Copy)",
    "model": { "...": "..." },
    "voice": { "...": "..." },
    "firstMessage": "..."
  }'

The response is the new assistant object, with its own id, createdAt, and updatedAt values.


Worked Example: Scripted Clone

You can script the fetch-strip-create sequence end to end. This example uses a shell script with jq to process the JSON:

# 1. Fetch the existing assistant
ASSISTANT=$(curl -s -X GET "https://api.sulus.ai/assistant/YOUR_ASSISTANT_ID" \
  -H "Authorization: Bearer $SULUS_API_KEY")

# 2. Strip server-managed fields, rename, then create
echo "$ASSISTANT" | jq 'del(.id, .createdAt, .updatedAt, .orgId) | .name = "My Assistant (Copy)"' | \
  curl -s -X POST "https://api.sulus.ai/assistant" \
    -H "Authorization: Bearer $SULUS_API_KEY" \
    -H "Content-Type: application/json" \
    -d @-

This same pattern can be adapted into any scripting or CI environment — the core logic is always fetch, strip four fields, optionally rename, and POST.


Tool & Knowledge Base References Carry Over Automatically

When you duplicate an assistant this way, any toolIds or knowledge base file references in its configuration carry over automatically, because the new assistant points at the same shared resources rather than copying them. The clone and the original both reference the same underlying tool and file records — nothing is duplicated on the tool or knowledge base side. This means updating a shared tool later affects every assistant that references it, including any clones, which is usually what you want but worth keeping in mind if you intended the clone to diverge from the original over time.


Manual Alternative via the Dashboard

Teams who prefer a UI-driven workflow over the API can replicate an assistant manually:

  1. Open the source assistant in the dashboard to view its full configuration — system prompt, model, voice, transcriber, tools, and hooks
  2. Create a new assistant from a blank template
  3. Manually re-enter each setting to match the source assistant, referencing the same tools and knowledge base files where applicable

This is slower and more error-prone than the API approach for larger configurations, but avoids needing to touch the API directly for a one-off duplicate. For a faster starting point than a blank template, consider starting from one of the options in Prebuilt Templates & Example Use Cases instead, and adjusting from there.