An agent is assembled from parts: a playbook and the tools it can call, a
function with its branches and variables, an API tool, an MCP server, the
project’s variables, and the documents its knowledge base retrieves from.
All of them can be created and changed from outside Agent studio, which is what
makes generating agents from a template, importing them from another system, or
keeping a set of projects consistent with each other possible.
Endpoints
Agent
Playbook
Function
Function path
Function variable
Variable
MCP server
| Endpoint | Description |
|---|
| GET List MCP tools | List all MCP tools by project ID. |
| GET Get MCP tool | Get an MCP tool by ID. |
| GET Get MCP tool schema | List the arguments an MCP tool takes, as a flat list and as its JSON Schema. |
| POST Execute MCP tool | Call one MCP tool once on its server with the given arguments, without a conversation. |
Secret
Integration
| Endpoint | Description |
|---|
| GET List integrations | List every integration this project can use, along with whether it is currently connected. |
| POST Connect integration | Store credentials for an api-key integration on this project. |
| DELETE Disconnect integration | Clear every stored credential slot this integration owns on the project. |
| GET Get integration tool schemas | List the tools an integration offers, their inputs, and whether each is added to this environment. |
| POST Execute integration tool | Run one integration tool once with the project’s stored connection, without a conversation. |
| POST Add integration tool | Add one catalog tool of an integration to this environment, so it can be attached. |
Knowledge base document
Message
Prompt
Playbook exit path
| Endpoint | Description |
|---|
| GET Get widget | Get the widget configuration stored on the environment’s draft version. |
| PATCH Update widget | Update the widget configuration. |
| GET Get widget snippet | Get the JavaScript snippet that embeds the widget on a website, filled in for this project and environment. |
Workflow
| Endpoint | Description |
|---|
| GET List workflows | List the workflows of an environment, oldest first, at most 50 per page. |
| POST Create workflow | Create a workflow with its first version: blocks, steps, branches, links and the entry block. |
| GET Get workflow | Get a workflow as blocks of steps, at most 50 blocks per page. |
| PATCH Update workflow | Rename a workflow, change its description, or move it to another folder. |
| DELETE Delete workflow | Delete a workflow, its canvas and its comments. |
| GET Get workflow step | Get one step of a workflow with its content and links. |
| PATCH Update workflow step | Change one step’s content. |
| DELETE Delete workflow step | Delete a step the way the canvas does. |
| PUT Link a port | Point one port of a step at a block. |
| DELETE Unlink a port | Clear one port of a step so it leads nowhere. |
| POST Create block | Create a block with its steps; the server places it. |
| PATCH Update block | Change a block’s name or color. |
| DELETE Delete workflow block | Delete a block and all its steps, the way the canvas does. |
| POST Split workflow block | Split a block in two. |
| POST Insert workflow step | Insert one step into a block, after a step of the block or at its start. |
| POST Add workflow branch | Add one branch and its port to a step. |
| PATCH Update workflow branch | Change one branch of a step. |
| DELETE Delete workflow branch | Remove one branch of a step, with its port and link. |
| POST Add port actions | Add actions that run on one exit of a step, before the path reaches its block. |
| PUT Reorder port actions | Put the actions on one exit of a step in a new order. |
| GET Get raw workflow | Get the stored canvas nodes of a workflow, with rich text rendered as strings. |
| POST Duplicate workflow | Copy a workflow under a new name, with its own copies of the messages, prompts and playbooks its steps use. |
| PUT Link a port | Point one port of a step at a block. |
| PUT Link many ports | Point up to 50 ports at blocks in one write. |
| POST Create block | Create a block with its steps; the server places it. |
| POST Add workflow blocks | Create several blocks with their steps and links in one write; the server places them. |
| POST Arrange workflow blocks | Move blocks into columns by their links. |
| PUT Replace port action | Replace one action on an exit with a new action of any kind, in one write. |
Phone number
Knowledge base folder
How the build endpoints are shaped
Every resource follows the same six-verb pattern, so learning one teaches the
rest:
| Verb | Path | Purpose |
|---|
GET | /{resource} | list everything in the project |
POST | /{resource} | create one |
POST | /{resource}/batch | create many in a single call |
GET | /{resource}/{id} | fetch one |
PATCH | /{resource}/{id} | change part of one |
DELETE | /{resource}/{id} | remove one |
The batch variant matters when you are importing. Creating fifty variables
one call at a time is fifty round trips and fifty chances to end up half
migrated; one batch call is atomic from your side.
Scoping every call
Build endpoints act inside one environment of one project, so both are
required query parameters:
Editing main changes what your team sees in the Creator. To stage changes
without touching it, clone an environment first, build against the clone, and
merge when you are satisfied.
How the pieces relate
- A playbook is the unit of agent behaviour. It holds instructions and the
tools it may call.
- Tools are what a playbook can do. An API tool calls an HTTP endpoint;
a function runs your own code; an MCP server contributes a set of
MCP tools discovered from that server.
- Function paths are the branches a function can exit through, and
function variables are its inputs and outputs. Both belong to a function
and are managed separately, so you can add a branch without rewriting the
function.
- Variables are project state that persists across a conversation.
- Knowledge base documents are the corpus the agent retrieves from. Create
them from a URL, from text, or by uploading a table.
Where to go next
Once an agent is built, publish it to make
the changes live, and run a conversation against
it to see how it behaves.