Skip to content

Agents

An agent is an AI assistant. It has a name, instructions, the languages it speaks and a voice. Every agent in a workspace answers from the same knowledge base.

Scopes: agents:read to list and get, agents:write to create and update. Changing agents needs an admin.

Terminal window
curl https://app.airfone.app/v1/agents \
-H "Authorization: Bearer $AIRFONE_KEY"

The response is { "data": [...], "has_more": false }.

Terminal window
curl https://app.airfone.app/v1/agents \
-H "Authorization: Bearer $AIRFONE_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Front desk",
"instructions": "You answer for a dental clinic. Book visits and share opening hours.",
"languages": ["ne", "en"],
"voice": "Aoede"
}'

If your plan has no free agent seat, the call fails with 409.

Send only the fields that change.

Terminal window
curl -X PATCH https://app.airfone.app/v1/agents/AGENT_ID \
-H "Authorization: Bearer $AIRFONE_KEY" \
-H "Content-Type: application/json" \
-d '{ "instructions": "Always confirm the caller name first." }'

id, name, instructions, languages, voice, knowledge_base_id, created_at and updated_at. knowledge_base_id is null until you add a knowledge source.

To send a number’s calls to an assistant, see Lines and numbers.