What an agent contains
Every agent is made up of four parts:- Questions — the list of things the agent will ask, in order. Each question has a name (used as the key in the answer object), the exact wording the assistant speaks, and an answer type such as
string,number,boolean, orsingle-select. - Scripts — the exact phrases the assistant uses to open and close the call. The intro script runs before the first question; the outro runs after the last answer is collected.
- Settings — configuration that controls call behaviour: the language the agent speaks, whether the agent speaks first or waits for the caller to start, and what to do when a question receives no answer (skip it, retry, or end the call).
- Branches — conditional follow-up question groups. When an answer matches a trigger value, the agent inserts an additional set of questions before continuing the main sequence.
Draft and published
Every agent starts as a draft:POST /api/v1/agentscreates a new agent in draft state.PUT /api/v1/agents/{agent_id}replaces the agent’s definition and moves it to published state.
status field in listing responses is either draft or published. Drafts are fully callable — conversations can run against them — but they are not considered stable. Treat drafts as works in progress and publish before sending an agent into production.
Publishing an agent by calling
PUT /api/v1/agents/{agent_id} replaces the entire definition. Send the complete agent body each time, not just the fields you want to change.Version history
Every time you publish a save, FormBharo records an immutable version snapshot. Version numbers start at1 and increment with each subsequent publish. Drafts are never versioned — only successful publishes create a new version entry.
Use versions to audit changes, roll back a bad update, or preview what a pending save will affect before you commit it.
1
List all versions of an agent
2
Read a specific version
3
Compare two versions
4
Preview what a save would change
5
Preview a config-only change
diff-preview but scoped to agent configuration fields only. Use this when you want to preview changes to settings without touching the question list.6
Restore an older version
Workspaces
Every agent belongs to exactly one workspace. By default, new agents are placed in your personal workspace. To place an agent in a shared workspace at creation time, includeworkspace_id in the request body of POST /api/v1/agents.
To move an existing agent to a different workspace, call:
workspace_id in the request body. Moving an agent does not affect its conversations or version history.