Create or update an AI agent
agent_upsertCreate an AI agent, or update one by passing agentId. A CHAT agent will reply to real prospects once it is active and attached to a campaign — set isActive: false while iterating on its instructions. The behaviour comes from personality (who it is), intent (what it is trying to achieve) and instructions (how it should write). This creates or edits the agent and nothing else. It does not attach it to a campaign (campaign_update), give it source material (kb_upsert then kb_attach), or build its embeddings (agent_train, which must run after any knowledge change). Test with agent_query before it touches a real conversation. There is no tool to delete an agent. Requires the "Agents" permission on the plan.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| faqs | No | Canned answers the agent should use verbatim. | |
| name | Yes | Internal name. | |
| type | No | CHAT for inbox replies, CONTENT for post drafting. | |
| action | No | Enable calendar booking. | |
| intent | No | The outcome it is steering the conversation toward. | |
| notify | No | Notify you when the agent replies. | |
| prompt | No | Raw system prompt override. Usually leave unset. | |
| topics | No | Subjects the agent is allowed to discuss. | |
| agentId | No | Omit to create a new agent. | |
| userIds | No | Share this agent with these sub-accounts. | |
| channels | No | Where the agent operates, e.g. ["linkedin","email"]. | |
| isActive | No | Whether the agent runs. Keep false while drafting. | |
| language | No | Language code, e.g. "en", "fr", "de", "it", "pt", "ja". | |
| provider | No | Primary model provider. Must be connected. | |
| waitTime | No | Minutes to wait before replying, so it reads as human. | |
| followups | No | Follow-up messages sent when a lead goes quiet. | |
| maxMessages | No | Cap on agent messages per conversation. | |
| personality | No | Who the agent is and how it carries itself. | |
| businessName | No | Company the agent represents; injected into its prompt. | |
| instructions | No | Concrete writing rules: tone, length, what to avoid. | |
| stopScenarios | No | Situations in which the agent stops replying. | |
| actionSettings | No | Booking settings. Used when `action` is "APPOINTMENT". | |
| prohabitedWords | No | Words the agent must never use. Field name is spelled this way in the schema. | |
| fallbackProvider | No | Used when the primary provider errors. | |
| pauseBotOnManualMessage | No | Stand down as soon as a human replies in the thread. |