Duplicate agent to another organization
Changed onDuplicates a SINGLE_PROMPT agent's live active version into a target organization (can also be the same organization). Copies all versioned configuration but strips organization-specific resources: knowledge base tools are removed, default variable values are blanked, and a new avatar is generated. The duplicate starts with a published V1 as its active version.
400 is returned when:
- The source agent is archived ("Cannot duplicate an archived agent")
- The agent has no activeVersionId ("This agent has no active version and cannot be duplicated")
- The active version exists but is not published/active ("This agent has no active published version and cannot be duplicated")
- The agent is not SINGLE_PROMPT workflow type
Request
- Base URLhttps://api.smallest.ai/atoms/v1
- URLhttps://api.smallest.ai/atoms/v1/agent/{id}/duplicate
- AuthHTTP bearer
Path parameters
The ID of the source agent to duplicate
Request body
Example request
{
"targetOrganizationId": "60d0fe4f5311236168a109ca"
}Response
Agent duplicated successfully
Example response
{
"status": true,
"data": {
"_id": "60d0fe4f5311236168a109cb"
}
}Changes
- breaking
added the pattern
^[a-fA-F0-9]{24}$to the request property - warning
removed the optional property
from the response with the status - info
added the media type
application/jsonfor the response with the status - info
added the non-success response with the status
- info
added the optional property
to the response with the status
- breaking
- info
endpoint added
- info