Built for the Hindsight AI Agents Hackathon (PS3) Powered by Google ADK + Gemini 2.5 Flash + Hindsight Memory
Kodnex is an AI-powered coding practice platform that remembers your mistakes across sessions and adapts to your weaknesses. Unlike static problem sets, Kodnex uses three specialized AI agents — a Bug Predictor, a Code Generator, and a Code Explainer — all backed by Hindsight long-term memory that tracks your patterns over time.
The more you practice, the smarter Kodnex gets about your specific blind spots.
link - https://youtu.be/fxnSuQnz0hg?si=qxI1YgFfF5VyWjdz
| Screen | Description |
|---|---|
| Practice Library | Browse 8000+ real Codeforces problems with live filtering |
| Problem Editor | Monaco-style code editor with language switching |
| Bug Predictor Agent | AI reviews your code and flags errors with severity |
| Code Generator Agent | Generates optimal solution with complexity analysis |
| Code Explainer Agent | Explains approach, logic, and patterns step by step |
| Submit Feedback | Detailed post-submission analysis with memory timeline |
| Community | Forum with posts, comments, likes, and topic filtering |
| Academy | Structured learning paths with progress tracking |
| Dashboard | Memory card showing your weak areas and patterns |
| History | Session-by-session breakdown with accuracy rings |
| Progress | Analytics with topic mastery and error velocity |
- Next.js 14 — App Router, TypeScript
- Inline styles — No Tailwind dependency issues
- JetBrains Mono — Monospace aesthetic throughout
- FastAPI — REST API with async endpoints
- Google ADK — Agent orchestration framework
- Gemini 2.5 Flash — Powers all three AI agents
- Hindsight — Long-term memory via
retain()andrecall() - Codeforces API — 8000+ live coding problems
root_agent (ParallelAgent)
├── memory_agent → Hindsight recall() — checks past mistakes
└── main_agent → Routes to correct specialist
├── code_reviewer_agent → Bug Predictor
├── code_writer_agent → Code Generator
└── code_explainer_agent → Code Explainer
AI Coding Practice Mentor/
├── backend/
│ └── coding_agent/
│ ├── agent.py ← ADK agents (reviewer, writer, explainer)
│ ├── hindsight_api.py ← store_memory() and recall_memory()
│ ├── main.py ← FastAPI server with all endpoints
│ ├── runner.py ← ADK session runner
│ ├── requirements.txt
│ └── .env ← API keys (never commit this)
│
└── kodnex/ ← Next.js frontend
└── src/
├── app/
│ ├── api/
│ │ ├── agent/
│ │ │ ├── bug/route.ts ← Proxy → /agent/bug
│ │ │ ├── generate/route.ts ← Proxy → /agent/generate
│ │ │ └── explain/route.ts ← Proxy → /agent/explain
│ │ └── memory/
│ │ └── store/route.ts ← Proxy → /memory/store
│ ├── academy/page.tsx
│ ├── auth/page.tsx
│ ├── community/page.tsx
│ ├── dashboard/page.tsx
│ ├── history/page.tsx
│ ├── notifications/page.tsx
│ ├── practice/page.tsx
│ ├── progress/page.tsx
│ └── settings/page.tsx
└── screens/
├── 00-landing.tsx
├── 01-auth.tsx
├── 02-dashboard.tsx
├── 03-settings.tsx
├── 04-notifications.tsx
├── 05-progress.tsx
├── 06-history.tsx
├── 07-practice.tsx ← Main practice screen with 3 agents
├── 08-community.tsx
└── 09-academy.tsx
- Node.js 18+
- Python 3.11+
- A Google API key (Gemini) — free at aistudio.google.com
- A Hindsight account — hindsight.vectorize.io
git clone https://github.com/LakshuCodes/AI-Coding-Practice-Mentor
cd AI-Coding-Practice-Mentorcd backend/coding_agent
# Install dependencies
pip install google-adk fastapi uvicorn python-dotenv hindsight-clientCreate your .env file:
# backend/coding_agent/.env
GOOGLE_API_KEY=AIzaSy...your_key_here...
HINDSIGHT_BASE_URL=https://...
HINDSIGHT_API_KEY=...
HINDSIGHT_BANK_ID=...Start the backend:
uvicorn main:app --reload --port 8000Verify it's running:
http://127.0.0.1:8000/health
→ {"status":"ok","google_api_key_set":true,"hindsight_set":true}
cd kodnex
# Install dependencies
npm install
# Start dev server
npm run devYou need two terminals open simultaneously:
| Terminal | Command |
|---|---|
| Terminal 1 — Backend | cd backend/coding_agent && uvicorn main:app --reload --port 8000 |
| Terminal 2 — Frontend | cd kodnex && npm run dev |
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Health check + API key status |
| POST | /agent/bug |
Bug Predictor Agent |
| POST | /agent/generate |
Code Generator Agent |
| POST | /agent/explain |
Code Explainer Agent |
| POST | /memory/store |
Store mistake to Hindsight |
| GET | /memory/{user_id} |
Recall memories for user |
{
"code": "your code here",
"language": "C++17",
"problem_title": "Two Sum",
"problem_description": "Find two numbers that add to target",
"user_id": "user_001"
}Interactive API docs: http://127.0.0.1:8000/docs
Every time you submit a solution, Kodnex calls store_memory() to save your mistake pattern to Hindsight:
store_memory("User made 'off-by-one error' on 'Binary Search' in C++17 session 7")On your next session, the memory_agent runs recall_memory() in parallel with the main agent. If you're making the same mistake again, the Bug Predictor will specifically flag it:
"This is your 4th time making this exact mistake — Hindsight has escalated its priority."
| Route | Screen |
|---|---|
/ |
Landing page |
/auth |
Sign in / Sign up |
/dashboard |
Memory card + stats + recent activity |
/practice |
Problem library + code editor + 3 AI agents |
/history |
Session history with accuracy rings |
/progress |
Analytics + topic mastery + error velocity |
/community |
Forum with posts, comments, filtering |
/academy |
Course library with progress tracking |
/notifications |
System alerts and achievements |
/settings |
Profile + language preferences + memory wipe |
| Variable | Description | Where to get |
|---|---|---|
GOOGLE_API_KEY |
Gemini API key | aistudio.google.com |
HINDSIGHT_BASE_URL |
Hindsight API base URL | hindsight.vectorize.io |
HINDSIGHT_API_KEY |
Hindsight API key | Hindsight dashboard |
HINDSIGHT_BANK_ID |
Memory bank ID | Hindsight dashboard |
Event: Hindsight AI Agents Hackathon — Problem Statement 3
Core idea: Most coding practice tools give you problems and solutions. Kodnex gives you a mentor that remembers — it tracks what you struggle with across sessions and specifically targets those weaknesses.
Hindsight integration:
retain()— called after every submission to store mistake patternsrecall()— called before every agent response to check past patterns- The
memory_agentruns in parallel with the main agent using ADK'sParallelAgent
Links:
- Hindsight SDK: github.com/vectorize-io/hindsight
- Hindsight dashboard: hindsight.vectorize.io
- Vectorize features: vectorize.io/features/agent-memory