Skip to Content
AgentOverview

Agent Overview

The SendAfrica Agent is the core AI-powered service that powers both the dashboard chat widget and the MCP tool server.

Modes of Operation

ModeDescription
autoFully autonomous — executes tools without asking for confirmation
draftDraft mode — prepares actions but requires user approval before execution
offDisabled — agent only answers questions, does not execute tools

Key Capabilities

Knowledge Base

The agent is pre-loaded with comprehensive knowledge about:

  1. SendAfrica Core — Platform app (app.sendafrica.online), REST API (api.sendafrica.online/v1), and API key format (SA-...)
  2. MailAfrica Core — Platform app (app.mailafrica.online), REST API (api.mailafrica.online), and API key format (MA-...)
  3. Pricing & Credits — Pay-as-you-go voucher tiers, mobile money integration via Snippe
  4. Contacts & Campaigns — Contact list grouping, CSV imports, Google Contacts sync
  5. Documentation & SDKs — API docs, code samples for Python, Node.js, PHP, cURL

Tool Calling

The agent uses a multi-turn tool-calling loop (max 5 iterations) to:

  1. Receive a user message
  2. Generate an LLM response with tool calls
  3. Execute the tools (SMS, Email, Documentation)
  4. Feed results back to the LLM
  5. Generate the final response

Safety Guardrails

Before executing certain operations, the agent requires explicit user confirmation:

  • Bulk SMS — Sending to more than 10 recipients
  • Campaigns — Creating scheduled SMS campaigns
  • Mass Email — Sending emails to more than 5 recipients

System Prompt

The agent operates with a detailed system prompt that defines its persona, knowledge, and behavioral rules. Key directives include:

  • Be warm, helpful, and concise
  • Jump straight into technical guides without filler
  • Always execute tools directly when the user asks for an action
  • Never tell the user to log into the dashboard — the agent IS the action-taking assistant

Chat Session Management

Each conversation is tracked in a SQLite database with two tables:

  • agent_sessions — Session tracking (session ID, account ID, user ID)
  • agent_messages — Chat history with tool calls (role, content, tool_calls, tool_id)

Sessions maintain up to 30 messages of context for multi-turn conversations.

Last updated on