Inbound vs outbound
Every agent has atype of either inbound or outbound. The type is fixed at creation time and determines how the agent is used.
| Type | Who starts the call | How numbers are used |
|---|---|---|
outbound | Your code calls POST /v1/calls with the agent id | The agent’s attached numbers are valid caller IDs. The primary number is the default. |
inbound | Someone dials one of the agent’s attached numbers | CallingBox answers the incoming call and runs the agent. |
A phone number can be attached to at most one inbound agent (that’s who answers). The same number can also be used as a caller ID by any number of outbound agents.
What lives on the agent
These fields are set on the agent and inherited by every call it handles:| Field | Description |
|---|---|
name | Human label to identify the agent in the dashboard. |
persona | Identity and policy: who the agent is, how it talks, what it never does. Falls back to a sensible default if omitted. |
instructions | Default task for calls this agent handles. |
voice | TTS voice id. |
language | BCP-47 language code. |
returns | Schema for structured data extraction. |
tools | In-call tools the agent can invoke. |
webhook_url | Default per-call webhook URL for every call this agent handles. |
voicemail_action | hangup or leave_message. |
primary_number_id | Default caller ID for outbound; the number the agent “owns” for inbound. |
What can be overridden per call
Outbound calls can override a small set of agent defaults at dispatch time. Inbound calls always use the agent’s configuration as-is (no per-call override).| Field | Override behavior |
|---|---|
instructions | Replaces the agent’s default instructions for this call. Not merged. |
from_number | Must be another number attached to the same agent. Defaults to the agent’s primary_number_id. |
context | Arbitrary JSON the agent can reference mid-call. |
webhook_url | Overrides the agent’s default for this call only. |
metadata | Arbitrary key/value you can read off the call record later. |
persona, voice, returns, tools, language, voicemail_action) is locked to the agent for that execution.
Create an outbound agent
Create an inbound agent
The shape is identical. Only thetype and how you dispatch it change. An inbound agent with an attached number starts answering the moment it’s created.
Attach or detach numbers later
You can change an agent’s number attachments at any time.Archive an agent
Agents are archived (soft-deleted). Historical calls remain available.Outbound calls
Dispatch a call from an outbound agent.
Inbound calls
Let an inbound agent answer your numbers.
Structured results
Define the
returns schema on your agent.In-call tools
Give your agent mid-call actions.