Agent Overview
The SendAfrica Agent — an in-app AI assistant and FastMCP tool server that answers questions and executes SMS/email actions with confirm-before-send guardrails.
The SendAfrica Agent (SendAfrica-Agent) is an in-app multi-channel AI assistant and FastMCP server for SendAfrica (SMS) and MailAfrica (transactional email). It ships in two modes:
- In-app dashboard assistant (
POST /v1/agent/chat) — embedded in the SendAfrica web dashboard chat widget. Acts as a knowledgeable support bot (pricing, API keys, top-ups, contacts, delivery rules) *and* as an action-taking agent executing tools on behalf of authenticated business users. - FastMCP tool server (
sendafrica-agent mcp) — exposes MCP tools to any AI assistant: Claude, Cursor, Gemini, or your own agents.
#Architecture
┌────────────────────────────────────────────────────────┐
│ SendAfrica Web Dashboard │
│ (In-app Chat Widget in the Dashboard) │
└──────────────────────────┬─────────────────────────────┘
│ POST /v1/agent/chat
▼
┌────────────────────────────────────────────────────────┐
│ SendAfrica Go Core API │
│ (https://api.sendafrica.online) │
└──────────────────────────┬─────────────────────────────┘
│ Proxy to AGENT_SERVICE_URL
▼
┌────────────────────────────────────────────────────────┐
│ SendAfrica Agent Service │
│ - Session History (agent_sessions / agent_messages) │
│ - Knowledge Base System Prompt Resource │
│ - Tool-Calling Loop with Ngamia LLM Gateway │
│ - Safety Guardrail (Confirm-Before-Send) │
└──────────────┬───────────────────┬─────────────────────┘
│ │
FastMCP Tool Execution Ngamia Chat Completions
▼ ▼
┌─────────────────────────────┐ ┌─────────────────────┐
│ FastMCP Server Tools │ │ Ngamia AI Gateway │
│ (SendAfrica & MailAfrica) │ │ api.ngamia.cc/v1 │
└──────────┬──────────────────┘ └─────────────────────┘
┌─────┴──────┐
▼ ▼
┌──────────┐ ┌──────────┐
│SendAfrica│ │MailAfrica│
│ Go Core │ │ API │
└──────────┘ └──────────┘#Safety guardrails
Confirm-before-send
The agent requires explicit user confirmation before executing bulk SMS campaigns or mass email dispatches. A draft action returns a confirmation request instead of executing; only after the user confirms (user_confirmation) does the tool run. This prevents unintended blasts from misinterpreted chat instructions.
#Embedded knowledge base
The agent's system prompt resource is pre-loaded with platform knowledge, so it answers accurately without retrieval:
- SendAfrica core — app (
app.sendafrica.online), REST API (api.sendafrica.online/v1), API key format (SA-...). - MailAfrica core — app (
app.mailafrica.online), REST API (api.mailafrica.online), key format (MA-...). - Voucher rates (TZS) — Tier 1: 35 TZS/credit · Tier 2: 32 · Tier 3: 30.
- Mobile money top-ups — USSD-prompt payments.
- Phonebook & sync — contact grouping, CSV imports, Google Contacts one-way sync.
Docs tools power this site
The agent also exposes search_documentation and get_documentation_topic — the same content that powers this documentation site — so any MCP client can ask "how do I import contacts?" and get grounded answers.