Chama Agent
Chama Agent is an AI operations copilot built for Kenyan savings groups ("chamas"). It combines financial records, group conversations, and mobile payments to help officials run their groups with less manual work and better accountability.
Built for OpenAI Build Week 2026 – Work & Productivity, the project demonstrates how GPT-5.6 can move beyond chat and become part of an operational workflow.
Inspiration
Across Kenya, thousands of community groups coordinate savings, investments, welfare funds, weddings, funerals, and small businesses through WhatsApp conversations, spreadsheets, and M-PESA payments.
The problem isn't collecting information—it's turning scattered conversations into actions.
Officials spend hours answering questions like:
- Who hasn't contributed this month?
- What decisions were actually made during the last meeting?
- Who volunteered to do what?
- Which reminders need to be sent?
- Which members need statements?
Those answers already exist somewhere across chats and spreadsheets, but finding them is tedious and error-prone.
We wanted to build an AI assistant that could understand both the financial records and the group's conversations, then turn that information into actionable operations.
What it does
Chama Agent combines three normally separate workflows into one application:
- AI-generated chama health reports based on real contribution history
- AI analysis of exported group conversations to identify decisions, commitments, reminders, unresolved issues, and meeting agendas
- Mobile contribution collection through M-PESA Daraja STK Push
Officials can immediately see:
- contribution health
- members in arrears
- suggested follow-up actions
- meeting agendas
- contribution commitments mentioned in chat
- downloadable member statements
When a member pays through M-PESA, the contribution is recorded automatically and the dashboard updates live using Turbo Streams.
How we built it
The application is built with Ruby on Rails 8.1 using Hotwire for a fast server-rendered experience.
GPT-5.6 powers two specialized services instead of acting as a general chatbot.
The Agent Report Service analyzes structured contribution data and produces:
- health score
- arrears analysis
- operational recommendations
- meeting agenda
The Chat Analysis Service analyzes exported WhatsApp conversations and extracts:
- discussion topics
- decisions actually made
- action items
- contribution promises
- unresolved issues
- reminders
- meeting agenda
The prompts explicitly instruct GPT-5.6 not to invent decisions, owners, dates, or payment amounts. Responses are returned as structured JSON that Rails stores and renders throughout the application.
For payments, the application integrates with Safaricom's Daraja APIs to initiate STK Push requests and process callbacks, creating contributions automatically and broadcasting updates to connected users via Turbo Streams.
To keep demonstrations reproducible, the project ships with deterministic seed data so every demo starts from the same state.
Challenges we ran into
The biggest challenge was working with the Safaricom Daraja sandbox.
Sandbox callbacks occasionally fail even when the integration is implemented correctly, making live demonstrations unreliable. We built a clearly disclosed demo fallback that follows the same processing path while keeping production behavior unchanged.
Prompt engineering was another major challenge. We wanted GPT-5.6 to summarize conversations without hallucinating decisions or assigning actions that never happened. We refined the prompts to require evidence-based extraction and structured JSON responses instead of free-form summaries.
Finally, making the AI outputs feel operational rather than conversational required careful design. Every response had to become something the application could act on instead of simply displaying generated text.
What we learned
This project reinforced that AI becomes significantly more valuable when grounded in structured business data rather than operating as a standalone chatbot.
We also learned that combining deterministic backend workflows with LLM reasoning creates systems that remain both reliable and genuinely useful.
Working with GPT-5.6's structured outputs made it possible to integrate AI directly into Rails services while keeping the application predictable and testable.
What's next
The current version analyzes exported WhatsApp conversations pasted into the application.
A production version could securely connect to messaging platforms used by community organizations (subject to platform permissions and member consent), allowing conversations, reminders, and payment workflows to stay synchronized automatically.
Beyond chamas, the same operational model could support:
- welfare groups
- SACCO committees
- alumni associations
- church groups
- funeral committees
- investment clubs
- event organizing committees
Anywhere communities coordinate money and decisions together, Chama Agent can help turn conversations into accountable action.
Built With
- codex
- gpt-5.6
- hotwire
- ruby
- ruby-on-rails
- safaricom-daraja-api
Log in or sign up for Devpost to join the conversation.