Duplicate an agent
agent_duplicateCopy an agent, optionally into a sub-account. Copies the configuration; the duplicate still needs agent_train before its knowledge works. Passing userId to place it in another user's account is accepted only from an account owner. Requires the "Agents" permission on the plan.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Create the copy inside a SUB-ACCOUNT instead of your own account. Accepted only from an agency owner, and only for an account inside your own agency: take the id from `subaccount_list` and never construct or guess one. An id outside that list is refused. This WRITES into that sub-account, so name it to the user and get a yes first. Omit it to copy within your own account. | |
| agentId | Yes | AI agent id, from `agent_list`. |