This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend
What I Built
Spar with a Friend is a local practice partner for Sobaan, my debate classmate.
Sobaan knows the motion. He still locks up when a group discussion or a viva turns toward him. The words show up later, on the walk out of the room, which is the wrong time. A cloud chatbot makes that worse: every half-finished point leaves his laptop, and the reply is usually a tidy essay he cannot use while someone is waiting for him to speak.
Spar is a rehearsal room on his own machine.
He picks a campus topic (placements vs CGPA, mandatory attendance, a viva where he defends one design choice), chooses a tone (patient, firm, or rapid-fire) and a difficulty (beginner or intermediate), then walks Opening, Rebuttal, and Closing against an open-weight model. Before the round, a practice card gives him three moves for the freeze, including "My point is X because Y." After Closing, he gets a short report: what landed, three things to try next, and a note on filler words. Past rounds stay in a local SQLite file, so he can reread them with the wifi off.
Success for him is small and specific: finish a ten-minute round and leave with feedback he would actually read between classes.
This is built on DebateBot, which already had the debate shape (stages, Live Arena, scoring). The weekend change was to make the open model the thing that runs the product, and to aim that product at Sobaan.
Demo
There is no hosted URL on purpose. The demo is a local round: no API key, and no internet after the model is pulled.
ollama pull llama3.2:3b
cp .env.example .env
cd backend
python -m venv venv
pip install -r requirements.txt
python -m uvicorn main:app --reload --port 8000
In a second terminal:
cd frontend
npm install
npm run dev
Open http://localhost:5173. The navbar badge should say Local · Ollama. Start friend practice, pick a campus topic, and run Opening, Rebuttal, and Closing in Live Arena. Finish round & get report writes a short coaching note and saves the round in local SQLite.
If Ollama is not running, the setup screen shows an install checklist. It does not call Groq.
Repo: https://github.com/aryan-dani/debate-bot
Code
https://github.com/aryan-dani/debate-bot
DebateBot → Spar with a Friend
DebateBot is the base project. The hackathon product is Spar with a Friend: a local, open-weight practice partner so a friend can rehearse debates and GDs without sending speech to a cloud chat app.
Open-source AI at the core:
-
Open-weight model via Ollama (default
llama3.2:3b) - Open agent harness via LangGraph (Opening → Rebuttal → Closing + Live Arena)
- Optional Groq cloud fallback only — never required to run the demo
Friend story (fill before handoff)
| Field | Value |
|---|---|
| Name | Sobaan |
| Relation | debate classmate |
| Problem | Freezes in group discussions; needs patient GD/viva practice |
| Constraints | Weak laptop, no paid APIs, no cloud transcripts |
| Success | Finish a 10-min practice round and get kind, specific feedback |
Friend profile lives in backend/coaching.py.
Key Features
- Friend Practice setup: one screen for provider status, tone, difficulty, campus presets, practice card
- Live Arena: user vs local AI through…
The pieces that matter:
-
backend/llm_provider.py— Ollama by default, Groq only if you opt in -
backend/graph.py— LangGraph nodes for the dual-AI debate, Live Arena counter, and end-of-round report -
backend/coaching.py— Sobaan's profile, campus presets, tone, difficulty, practice card -
backend/history.py— local SQLite sessions -
frontend/src/components/PracticeSetup.jsx— one-screen start
How I Built It
The open pieces are the runtime, not a sticker on a closed API.
Open-weight model, local inference. The default provider is Ollama with llama3.2:3b (about 2 GB, so it fits an 8 GB laptop). LLM_PROVIDER=ollama is the default in .env.example. GROQ_API_KEY is optional and unused in the demo. If Ollama is stopped, /api/live-counter returns 503 with a checklist. It does not fall back to Groq.
Open agent harness. LangGraph still owns the flow. A full debate is a graph: proposition opening, opposition opening, both rebuttals, both closings. Live Arena is a counter node. The report is its own node. Prompts live in graph.py. Coaching tone lives in coaching.py, so the agent's behavior changes without rewriting the app.
App around that core. FastAPI exposes the graphs. React (Vite) is the practice screen, Live Arena, and scoring view. History is SQLite on disk. There is no analytics SDK. With Ollama selected, transcripts are not sent to a third-party chat API.
Stack: Python, FastAPI, LangGraph, LangChain's Ollama chat client, React. Run it with uvicorn and npm run dev. No cloud host is required.
Why Does Open Innovation Matter?
A closed chat app can generate a counterargument. It cannot do the thing Sobaan actually needs.
He is shy about logging practice speech. A cloud model means the freeze, the filler words, and the half-finished point all leave the laptop. Local Ollama means the rehearsal stays on the machine. After ollama pull, the round still works with the wifi off.
He also does not have a budget for API tokens, and a debate-class laptop is not a 70B box. llama3.2:3b is small enough to run and open enough to swap (llama3.2:1b if RAM is tighter) without asking a vendor for permission.
The coach itself had to be editable. Patient versus rapid-fire, beginner versus intermediate, and a practice card aimed at freezing are prompt and graph changes, not a fine-tune and not a closed assistant we cannot inspect. LangGraph keeps those stages as nodes we can read and change.
Open innovation here is not a license badge. It is the difference between a private practice room and a chatbot that bills you and keeps the transcript.
What they said
We prep in the same debate class. Sobaan knows the motion and still goes quiet once the discussion turns to him. He does not want those practice rounds sitting in a cloud chat. The useful version of feedback, for him, is short: what landed, what to try next, and whether the fillers took over. That is the report at the end of Closing.
My Agent Session
I built this in Cursor, turning an existing Groq-backed DebateBot into the local coach above. I don't have a DevRelay export for this session.
Prize Categories
Entering the main Weekend Challenge only. The project runs on local Ollama and LangGraph, not on a partner runtime, so I am not submitting for the partner prize categories.
Top comments (0)