Skip to main content

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.
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.
Save the agent id from the response. The same create call is available in the Node SDK:

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:
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.
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. 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:
For output terms that must be scrubbed, add sensitive_words inside safety_config. The Sensitive words guardrail explains the literal, case-insensitive matching and the [REDACTED] replacement.

Where next?