> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orbit.devotel.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Your first AI agent in 20 minutes

> Create a chatbot agent, deploy it to a sandbox SMS number, send a first turn, and add basic cost and tool-loop safeguards.

# Your first AI agent in 20 minutes

This tutorial takes you from an empty workspace to a working chatbot agent. You will create a `chatbot` agent, deploy it to SMS, send one turn, inspect its debug data, and set two limits before you continue.

> [!NOTE]
>
> You need a sandbox API key that starts with `dv_test_sk_` and either one connected channel or a test phone. Use a sandbox number for this tutorial so you can test the flow before connecting a production sender.

## 1. Create a chatbot (5 minutes)

Create an agent with a three-line system prompt. This tutorial does not attach the
`search_knowledge` built-in tool yet: it grounds only in attached knowledge bases,
and without one it has nothing to search.

```bash theme={null}
curl -X POST https://api.orbit.devotel.io/api/v1/agents \
  -H "X-API-Key: dv_test_sk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "FAQ Bot",
    "type": "chatbot",
    "model": "claude-sonnet-4-6",
    "system_prompt": "You are a helpful FAQ bot for Acme Corp.\nAnswer questions about our products and services.\nBe concise and professional."
  }'
```

Save the agent `id` from the response. The same create call is available in the Node SDK:

```typescript theme={null}
import { Devotel } from "@devotel-orbit/node";

const client = new Devotel({ apiKey: process.env.ORBIT_API_KEY });

const agent = await client.agents.create({
  name: "FAQ Bot",
  type: "chatbot",
  model: "claude-sonnet-4-6",
  system_prompt: "You are a helpful FAQ bot for Acme Corp.\nAnswer questions about our products and services.\nBe concise and professional.",
});

console.log(agent.id);
```

## 2. Deploy to your sandbox SMS number (4 minutes)

Bind the agent to one channel with a deploy call. Replace `agent_abc123` with the id you saved and use the sandbox number connected to your workspace:

```bash theme={null}
curl -X POST https://api.orbit.devotel.io/api/v1/agents/agent_abc123/deploy \
  -H "X-API-Key: dv_test_sk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "channel": "sms", "phone_number": "+18005551234" }'
```

The `phone_number` is the sending number that inbound SMS routes to the agent. Deploy calls bind one channel at a time; the `channel` field is not part of the create request.

## 3. Send the first turn (3 minutes)

Send a message to the agent's chat endpoint. This is a real agent turn, so it uses the model, but the chat endpoint is not channel-routed and does not send an outbound message.

```bash theme={null}
curl -X POST https://api.orbit.devotel.io/api/v1/agents/agent_abc123/chat \
  -H "X-API-Key: dv_test_sk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "What products do you support?"
  }'
```

Read the reply in the JSON response. If you send another turn, pass the `conversationId` from the first response to keep the thread going. You can also send the first message from the sandbox phone to exercise the deployed SMS path.

## 4. Read the first-turn debug data (4 minutes)

Open **Agents → your agent → Conversations → a conversation → turn debug**. The turn debug view shows the retrieval and tool details alongside latency and cost. The same surface is described in [Per-turn grounding citations](https://docs.orbit.devotel.io/agents/grounding-citations.md).

Look for:

* **Grounding**: `chunks`, `citations`, and `confidence`. With knowledge search off, a turn has no retrieval to inspect.
* **Latency**: the turn's `latency_ms` telemetry, alongside the work the agent performed.
* **Cost**: compare `actual_cost_usd` (raw provider cost for the tokens consumed) with `billed_cost_usd` (what appears on your Devotel Orbit bill). Use `billed_cost_usd` when reconciling spend.

Reading this block on your first turn gives you a baseline before you add tools or a knowledge base.

## 5. Add a safety net (4 minutes)

Set a per-run cost limit and a tool-loop limit on the agent. The platform default for `max_cost_per_run_cents` is 100 cents (`$1.00`), and the default `tool_loop_limit` is 10. This example starts with the lower per-run value used for a tier-1 support agent and keeps the documented tool-loop default:

```bash theme={null}
curl -X PUT https://api.orbit.devotel.io/api/v1/agents/agent_abc123 \
  -H "X-API-Key: dv_test_sk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "max_cost_per_run_cents": 25,
    "tool_loop_limit": 10
  }'
```

For output terms that must be scrubbed, add `sensitive_words` inside `safety_config`. The [Sensitive words guardrail](https://docs.orbit.devotel.io/agents/sensitive-words-guardrail.md) explains the literal, case-insensitive matching and the `[REDACTED]` replacement.

## Where next?

| If you want to… | Read this next |
| - | - |
| Harden an agent for production | [Creating Agents](https://docs.orbit.devotel.io/agents/creating-agents.md) |
| Tune a voice agent | [Intro to voice AI agents](https://docs.orbit.devotel.io/agents/intro-to-voice-ai-agents.md) and [Voice clones](https://docs.orbit.devotel.io/guides/voice-clones.md) |
| Run evaluations | [Simulation eval suite](https://docs.orbit.devotel.io/agents/simulation-eval-suite.md) |
| Control spend | [Cost controls](https://docs.orbit.devotel.io/agents/cost-controls.md) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.