Guides
Test mode
Build and test an integration without a phone number, a carrier or credit — and without ever ringing anybody.
A test key (ag_test_…) works like a live one against your real agents, with three differences:
its calls ring nobody, it sees only test data, and its events go only to test receivers.
Test numbers
A test key calls only these numbers, and each one plays out a fixed ending over about ten seconds — with the agent's real greeting and your values, the same events a real call sends, and, where the call is answered, its analysis and a short sample recording.
| Number | What it plays | Analysis checks |
|---|---|---|
+12025550100 |
Answered, talked, and somebody hung up | pass |
+12025550101 |
Answered, talked, and somebody hung up | fail |
+12025550102 |
The line was busy | — |
+12025550103 |
It rang and nobody answered | — |
+12025550104 |
The person rejected the call | — |
+12025550105 |
An answering machine answered, and the agent left its message | — |
+12025550106 |
An answering machine answered, and no message was left | — |
+12025550107 |
The carrier would not put the call through | — |
Any other number is refused with 422 test_number_required. Nothing is dialled and nothing is
charged.
Calls to your agents
A test key can also make a call to one of your inbound agents, from a test number — the only way to try an agent's context lookup without a phone:
#!/bin/sh
# Make a test call to an agent. Test keys only. It asks the agent's test lookup and plays a scripted call.
curl -sS --fail-with-body -X POST "https://api.aigently.ai/v1/test/inbound-calls" \
-H "Authorization: Bearer $AIGENTLY_API_KEY" \
--json '{
"agent_id": "3c7d9e1f-5a2b-4c6d-8e0f-1a3b5c7d9e2f",
"from_number": "+12025550100"
}'
The agent's test address is asked, or its sample answer used, and never its live address. The answer says what the lookup made of it, and the call then plays out like any test call.
Chats
A chat with a test key uses the agent's real model, because the reply is the point of testing it, and is charged like any chat. It is marked as a test-key chat on the organization's transactions.
What stays apart
- A test key reads only test-key conversations. A real conversation asked for with a test key is
404, and a live key never sees test-key conversations. - Test-key conversations go only to test webhook receivers, and never count in the console's results or dashboards. The console's call list shows them when Mode is set to Test key.
- They are deleted after 30 days.
- A test key makes at most ten test calls a minute.
Moving to live
The same code works with a live key. See Going live for what changes.