Skip to Content
AgentSetup & Configuration

Setup & Configuration

Prerequisites

  • Python 3.11+
  • uv  package manager
  • SendAfrica API key (SA-...)
  • MailAfrica API key (MA-...)
  • Ngamia AI API key (ngm_...)

Environment Configuration

cp .env.example .env

Required Variables

SENDAFRICA_API_BASE=https://api.sendafrica.online/v1 SENDAFRICA_API_KEY=SA-your-key-here MAILAFRICA_API_BASE=https://api.mailafrica.online MAILAFRICA_API_KEY=MA-your-key-here NGAMIA_BASE_URL=https://api.ngamia.cc/v1 NGAMIA_API_KEY=ngm_your_key_here NGAMIA_MODEL=openai/gpt-4o-mini

Optional Variables

AGENT_WEBHOOK_SECRET=your-hmac-secret AGENT_DB_PATH=agent.db AGENT_HOST=0.0.0.0 AGENT_PORT=8000 AGENT_DEFAULT_MODE=off

Running the Service

Webhook Server

uv run sendafrica-agent serve
EndpointMethodDescription
/v1/agent/chatPOSTDashboard chat endpoint
/webhooks/sendafricaPOSTInbound SMS webhook
/healthGETHealth check
/sseGETMCP SSE server

Stdio MCP Server

uv run sendafrica-agent mcp

Docker Deployment

docker compose up -d curl -f http://localhost:8099/health
Last updated on