Creating Agents
This guide walks you through creating, configuring, and deploying an AI agent on Orbit — from defining its behavior to connecting it to live channels.Step 1: Define the Agent
Create an agent with a name, instructions, and model selection.Step 2: Add Tools
Tools give your agent the ability to take actions — look up orders, create tickets, check inventory, etc. There is no separate “add tool” endpoint. Tools are configured through thetools array on the agent’s create or update body. Each entry is one of:
- A string referencing a built-in or registered tool by id (see
GET /agents/toolsfor the catalog). - A function-call object with
name,description, and a JSON-Schemaparametersobject — the standard function-calling contract the model receives.
tools array is accepted on POST /api/v1/agents at create time. A function-call entry tells the model the tool’s shape but does not, by itself, perform an outbound HTTP call.
Reusable HTTP tools (custom tools)
To register a reusable tool that calls an external HTTP endpoint, use the custom-tools surface. Custom tools are tenant-scoped, SSRF-validated, and can be referenced by name from any agent’stools array.
name in the tools array (e.g. "tools": ["lookup_order"]).
Built-in Tools
Orbit provides several built-in tools that agents can use out of the box. The authoritative list is returned live byGET /api/v1/agents/tools:
| Tool ID | Name | Description |
|---|---|---|
send_sms | Send SMS | Send an SMS message via Devotel |
send_whatsapp | Send WhatsApp | Send a WhatsApp message |
send_email | Send Email | Compose and send email |
lookup_contact | Look up contact | Search contact directory |
check_balance | Check balance | Retrieve account balance |
create_ticket | Create ticket | Open a support ticket |
search_knowledge | Search knowledge base | Semantic search across documents |
transfer_agent | Transfer to human | Escalate to live agent |
tools array when creating an agent
(for example, "tools": ["search_knowledge"]). To ground search_knowledge in
your own content, attach documents via knowledge_base_ids (see Step 3).
Step 3: Connect Knowledge Base
Knowledge lives in a knowledge base (KB) — a reusable container of documents that you create once and then link to one or more agents. There is no per-agent upload endpoint; instead you create a KB, upload documents to it, and attach the KB to the agent by ID.3a. Create a knowledge base
id (e.g. kb_xyz789). Use it in the next two steps.
3b. Upload documents
Upload each document to the KB with a multipart request. Thefile part is required; type is optional and inferred from the file extension when omitted.
3c. Link the knowledge base to the agent
Attach one or more KBs to the agent with theknowledge_base_ids array on create or update. IDs are validated against your tenant — an unknown ID returns 422 INVALID_KNOWLEDGE_BASE_IDS.
Step 4: Configure Guardrails
Set safety boundaries for your agent’s behavior. Guardrails are part of the agent itself — there is no separate guardrails endpoint. Sendsafety_config and
escalation_triggers on the create (POST /agents) or update (PUT /agents/:id)
body.
safety_config accepts: blocked_topics, max_response_length, content_policy,
pii_redaction, pii_detection, harmful_content, prompt_injection,
content_filter, and approval_required. Each escalation_triggers entry is one
of { "type": "keyword", "value": "<string>" },
{ "type": "sentiment_below", "value": <0–1> }, or
{ "type": "turn_count_above", "value": <1–100> } (replacing the old flat
escalation_keywords / max_turns fields).
Step 5: Deploy
Deploying is how you bind an agent to a channel — there is nochannels field on the agent itself, and channels are never assigned on the create or update body. Activate your agent to start handling live conversations. Each deploy call targets one channel, so call the endpoint once per channel you want to go live on.
The request body requires a channel field — one of webhook, sms, whatsapp, voice, or rcs. A bodyless POST is rejected with 422 Unprocessable Entity. Supply phone_number for the phone-backed channels (sms, whatsapp, voice, rcs) and webhook_url for the webhook channel.
Deploy to WhatsApp:
webhook channel (provide webhook_url so Orbit can post agent events to your endpoint — it must be an https:// URL):
Testing
Test your agent before going live without sending real messages or incurring channel/outbound costs. Use the dry-run endpoint to replay a scripted scenario in sandbox mode — mutative tools are short-circuited and no live side effects occur (note: the agent still calls the LLM, so model/token cost applies):expected_tool_calls, must_contain, or must_not_contain
inside scenario to gate the run.
For an interactive single-turn test against the live agent runtime, use the
chat endpoint instead. This is a real turn — it incurs LLM cost — but it is
not channel-routed, so no outbound message is sent: