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.

Bonga agents directory with agent identities, status, sending budgets and approval modes

What an agent gets

SettingMeaning
AddressThe inbound address the agent owns, for example support@yourdomain.com
Approval modenew_recipients, every_email or never
History scopeown inbox or the whole workspace's inbound history
Daily and minute budgetsHard send caps, enforced transactionally
Watch words and amount thresholdExtra reasons to hold a message
Dry runEvaluate policy without handoff
KeysReveal-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:

ScopeAllows
inbox.readRead the agent inbox and threads
email.sendSend new email
email.replyReply in a captured thread
approvals.readRead 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:

  1. Agent paused or budget exhausted → blocked and paused.
  2. Watch word in the subject or body → hold.
  3. Amount over the configured threshold → hold.
  4. Reply address outside the captured thread → hold.
  5. Explicit approval request → hold.
  6. every_email → hold every send and reply.
  7. new_recipients → allow a reply to the thread recipient; allow a recipient with trusted inbound history or a prior approved send; otherwise hold.
  8. never → allow, with suppression, blocklists and contact eligibility still applied.
  9. 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/mcp with 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.

Next