Inspiration

In South Africa's townships, school and community football coaches almost all have a smartphone with WhatsApp, but little mobile data. Web registration forms are slow and hard to use on a small screen, so tournament organisers end up taking registrations by phone calls and messages, then typing them in by hand. It's slow, and mistakes creep in.

We asked a simple question: what if a coach could just talk to register their team, in the app they already use every day?

What it does

SportHub is a tournament assistant that coaches talk to in plain language, on WhatsApp (a South African +27 number) or in a web chat.

  • Registers teams through conversation. The agent asks for the event, team name, school, age group and coach details. It shows a summary, and nothing is saved until the coach replies YES.
  • Handles real conversations. Coaches can ask "Is the women's event still open?", correct themselves ("Wait, the team name is Eagles, not Lions"), or change task ("Cancel that, just show me the fixtures"). If an event is full, it suggests an alternative.
  • Generates and shows fixtures. Round-robin schedules per age group, with pitch allocation and clash detection.
  • Sends confirmation emails through Amazon SES.
  • Remembers each coach between messages.

No forms and no downloads. It works on a basic phone.

How we built it

WhatsApp user → AWS End User Messaging Social → SNS ─┐
Web chat user → CloudFront (S3, React/Vite) ─────────┴→ .NET 8 API
                                                          ↓
                                              AWS Lambda (Python 3.12)
                                                          ↓
                                    Bedrock AgentCore Harness (Claude Sonnet 4.6)
                                                          ↓
                                              AgentCore Gateway (MCP)
                                                          ↓
                                      API tool endpoints → RDS MySQL
  • Amazon Bedrock AgentCore runs the agent: Claude Sonnet 4.6 on the Converse API, harness-managed memory, and an AgentCore Gateway that turns an OpenAPI description of our /api/agent-tools endpoints (create event, get event, register team, generate fixtures) into tools the agent can call.
  • AWS End User Messaging Social connects WhatsApp. Inbound messages go to Amazon SNS and on to our API, and replies are sent with the SendWhatsAppMessage API.
  • A small AWS Lambda function invokes the harness. Each coach gets a session ID built from their phone number, so their conversation history stays separate.
  • Amazon RDS (MySQL) stores events, teams, registrations and fixtures. Amazon SES sends confirmations.
  • The web chat is a React/Vite app hosted on Amazon S3 and delivered through CloudFront.
  • The backend is .NET 8 with Clean Architecture (Domain, Application, Infrastructure, API), deployed on Render.

Challenges we ran into

  • New technology, little documentation. AgentCore Harness is new, so we learned by experimenting. We hit repeated "Invalid session ID" errors before finding the 33-character minimum. We first pointed the Gateway at individual endpoints (/api/Events, /api/Registrations) and only later understood it expects an OpenAPI schema describing the tools. Once we moved to a dedicated /api/agent-tools pattern, it clicked. Our Lambda also failed with 'BedrockAgentCore' object has no attribute 'invoke_harness' until we upgraded boto3, because the method was too new for the bundled version.
  • WhatsApp Business verification. Meta's verification took about three days. While we waited, we built and tested the whole backend, Lambda and agent through the web chat. When End User Messaging was approved, plugging WhatsApp in was quick, because the API didn't care which channel a message came from. We also moved from Twilio to AWS End User Messaging along the way, which changed inbound delivery to an SNS event destination and outbound replies to an API call.
  • Teaching the agent real coaching conversations. Corrections, task switching and vague requests like "register my team" (which event? which age group?) broke our early prompts. We revised the system prompt more than 15 times, adding each failure we found as an example. The breakthrough was to always confirm details before saving and to ask for missing information instead of assuming.
  • WhatsApp message handling. Delivery receipts and read confirmations arrive in the same event stream as real messages, so we had to filter them out. We also learned that free-form replies are only allowed within a 24-hour window, after which approved templates are required.
  • Free hosting. Our backend runs on Render's free tier, which sleeps when idle, so the first request after a pause is slow. We documented it in the README and warm it up before demos.

Accomplishments that we're proud of

  • A coach can register a team end to end, in plain language, in an app they already use.
  • One agent, one memory and one set of tools serve both WhatsApp and the web chat.
  • The agent is flexible in conversation, while the backend stays in charge of what actually gets saved, with a confirmation step before any registration.
  • We combined AgentCore, End User Messaging, SNS and SES with a working web front end on S3 and CloudFront into one multi-channel system.
  • A local +27 number makes the service feel familiar to the coaches it's built for.

What we learned

  • Agents are not scripted chatbots. The hard part isn't the chat, it's giving the agent well-described tools and clear rules for when to confirm and when to ask.
  • Session design decides whether an agent feels smart or forgetful. Scoping sessions per user (by phone number on WhatsApp) gives each person their own context without writing a custom state machine, and the harness's managed memory saved us weeks of work.
  • The Gateway pattern is elegant. Describe the tools once in an OpenAPI schema and the agent can use them.
  • Channel-agnostic design pays off. Clean Architecture let us swap the messaging provider and add a web chat without touching the core services.
  • Meet people where they are. For communities with limited data, the channel matters as much as the technology.

What's next for SportHub

  • Immediately: approved WhatsApp templates for proactive fixture reminders, restricting the agent to only the tools it needs, authentication on the Gateway-to-API calls, and load testing.
  • Next 3 months: coaches text in results ("Eagles 2 Lions 1") and standings update automatically, plus an organiser dashboard for tracking registrations and fixtures live.
  • Next 6 months: support for isiZulu, isiXhosa, Afrikaans and Sesotho, voice-note transcription for coaches who prefer to speak, and a rollout from Gauteng to other provinces.

Built With

Share this project:

Updates

Submission history