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.
List agents
Section titled “List agents”curl https://app.airfone.app/v1/agents \ -H "Authorization: Bearer $AIRFONE_KEY"The response is { "data": [...], "has_more": false }.
Create an agent
Section titled “Create an agent”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.
Update an agent
Section titled “Update an agent”Send only the fields that change.
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." }'What an agent returns
Section titled “What an agent returns”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.