AI agents
A Bonga agent is a non-human identity that owns one inbox address, one sending policy and one budget. It is not a user, a member or a seat. You create it directly, with no invitation, and issue a key that works only for it.
Note. Agents cannot approve themselves. An agent key can read its inbox, reply, send, and check a hold. It can never approve or reject, manage members or keys, or read another inbox. A person always decides a held message.

What an agent gets
| Setting | Meaning |
|---|---|
| Address | The inbound address the agent owns, for example support@yourdomain.com |
| Approval mode | new_recipients, every_email or never |
| History scope | own inbox or the whole workspace's inbound history |
| Daily and minute budgets | Hard send caps, enforced transactionally |
| Watch words and amount threshold | Extra reasons to hold a message |
| Dry run | Evaluate policy without handoff |
| Keys | Reveal-once, scoped, expiring, revocable |
Create an agent
Open Dashboard → Agents → New agent. Choose a name and slug, bind an existing inbox or provision a new address on a verified receiving domain, then set the policy and budgets.
The same operation is available on the dashboard API:
curl -X POST 'https://api.bonga.africa/api/workspace/agents' \
-H "Authorization: Bearer $DASHBOARD_JWT" \
-H 'X-Workspace-ID: workspace:abc123' \
-H 'Content-Type: application/json' \
--data '{
"name": "Support",
"slug": "support",
"approval_mode": "new_recipients",
"inbox": { "provision": true, "domain": "example.com", "local_part": "support" }
}'
Provisioning requires inbound email, a paid workspace and a verified receiving domain. If any condition fails, creation fails and no agent is written.
Issue a key
Keys are shown once. Give each integration its own key and only the scopes it needs:
| Scope | Allows |
|---|---|
inbox.read | Read the agent inbox and threads |
email.send | Send new email |
email.reply | Reply in a captured thread |
approvals.read | Read the agent's own holds |
Create a key from the agent page or POST /api/workspace/agents/{id}/keys. Revoke it at any time; deleting the agent revokes every key and cancels pending holds.
Policy
A send is evaluated in this order:
- Agent paused or budget exhausted → blocked and paused.
- Watch word in the subject or body → hold.
- Amount over the configured threshold → hold.
- Reply address outside the captured thread → hold.
- Explicit approval request → hold.
every_email→ hold every send and reply.new_recipients→ allow a reply to the thread recipient; allow a recipient with trusted inbound history or a prior approved send; otherwise hold.never→ allow, with suppression, blocklists and contact eligibility still applied.- Default → hold.
A hold expires after 72 hours and is never sent. A decision rechecks the agent, inbox, policy, recipient, suppression, contact eligibility, sender blocklist, billing and the exact fingerprint before submission. An approved send is idempotent, and a recorded delivery failure is reported rather than shown as success.
Sending with an agent key
curl -X POST 'https://api.bonga.africa/api/v1/agent/emails' \
-H "Authorization: Bearer $BONGA_AGENT_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: ticket-4821' \
--data '{
"to": "customer@example.com",
"subject": "Re: Your refund",
"text": "We have processed the refund."
}'
A held send returns 202 with status: pending_approval, an approval_id and a held_reason. The message has not been sent. Read it later with GET /api/v1/agent/approvals/{id}.
To reply in a thread, first list the inbox, then post to /api/v1/agent/threads/{thread}/reply.
Connect an assistant
- MCP — connect Claude Code, Codex or Cursor to
/api/mcpwith the agent key. - REST — call the routes above from your own orchestration code. See the agent API guide.
- Dashboard — people review holds in Agents → Approvals.