About the project
Inspiration
We want to keep ourselves accountable for our habits, and we might have friends who do that too. But as students, uncalled events appear out of thin air: an exam, something urgent. Suddenly you’re juggling daily habits and accountable friends who don’t really understand your situation. You need something that looks across your activity across all goals, keeps track, and steers how much to nudge so you can actually achieve them. You need to win holistically, not just in one domain or one goal.
That’s why we built one AI agent per goal. Each agent stays focused on one goal, so we don’t dump all context into a single agent; we keep context lightweight. Supermemory lets us coordinate multiple agents by sharing memory across them: win-win. We run everything on Modal (APIs, Telegram webhooks, cron jobs, and multiple agents in parallel) and use Groq for LLM calls and the rest of the stack to tie it together.
What we learned
- Lightweight context per agent keeps prompts small and cheap; shared memory (Supermemory) gives agents just enough cross-goal context to nudge wisely instead of spamming.
- Modal made it easy to run cron (30-min heartbeat, 5-min nudge tick), Telegram webhooks, and parallel agent runs without managing servers.
- Two-model Groq (8B for per-goal reasoning, 70B for the coordinator) gave us fast responses and better reasoning for “focus on this first” without GPU or self-hosted inference.
How we built it
Architecture in a nutshell:
- Input: User logs or commands hit either the web app (Next.js →
/api/logs,/api/goals) or the Telegram bot (@hackbitz_bot). Logs are classified to a goal via Groq; if confidence ( < 0.7 ) we ask for confirmation with inline buttons. - Trigger: Each log/command fires a per-user tick on Modal (
trigger_tick_for_useror_tick_for_user). No long-lived processes; everything is serverless. - Agents: We load the user’s active goals from Supabase and run one DynamicAgent per goal in parallel (Modal
.map()). Each agent reads goal metadata, last 7 days of logs (capped), peer agent states (with priority), and Supermemory for cross-goal context, then calls Groq 8B and writesagent_states(and optionalgoal_adjustment). - Coordinator: After all agents finish, the coordinator runs (Groq 70B). It handles four modes: reactive_log (respond to what the user just said), pattern_check (3+ ticks concerned → message; 2+ agents concerned → hackbitz simplifies to one focus), win (celebrate when an agent flips back to “on track”), checkin (structured scorecard for
/checkin). Dedup: at most one proactive message per user per 6 hours. - Delivery: Messages go out via the Telegram Bot API. Each message is attributed to an agent_name (e.g. “Leetcode”, “Sleep”) or to hackbitz for cross-goal advice. We use Exa AI to attach 2–3 relevant links (articles, videos, etc.) when we nudge or escalate; topics are LLM-generated per goal and stored in
config.domain_topics. - Scheduling: A separate 5-minute cron (
scheduled_nudge_tick) uses croniter to evaluate per-goalnudge_scheduleandlogcheck_schedule, and runs the nightly summary at the user’s bedtime (or 10pm default).
Data: Supabase holds goals (with agent_name, personality, priority, config jsonb), user_logs, agent_states (with state_history), interventions, agent_messages, and telegram_user_mapping for multi-user Telegram. Supermemory stores agent observations and coordinator decisions for semantic retrieval.
Challenges we faced
- Coordinator tiebreaking: When multiple agents want to message at once, we had to define a clear priority order (critical > high > normal) and severity (escalate > call > nudge > monitor) so hackbitz consistently picks “the one thing that matters” and doesn’t spam.
- Reactive vs proactive balance: We wanted fast replies when the user logs something (coordinator responds in 3–5s) while agents update in the background. We used fire-and-forget triggers and made the coordinator the single writer of Telegram messages so the user gets one coherent reply.
- Multi-user Telegram: Mapping
chat_id→user_idviatelegram_user_mappingso each conversation gets isolated goals, logs, and state without auth in the bot. - Adaptive difficulty: Letting agents suggest goal adjustments (e.g. “push for 7 problems”) only for quantifiable goals (
target_count/target_unit), and wiring confirm/skip into Telegram callbacks and Supabaseconfigupdates.
Built with
Frontend: Next.js 15, React 19, Tailwind v4, shadcn/ui
Backend & infra: Python 3.12, uv, Modal (cron, serverless functions, parallel execution), Supabase (PostgreSQL), Supermemory (semantic memory / RAG)
APIs & services: Groq API (Llama 3.1 8B instant + Llama 3.3 70B versatile), Exa AI (content search), Telegram Bot API
Libraries: FastAPI, groq, exa-py, requests, croniter, supabase Python client, supermemory SDK
Delivery: Telegram Bot (@hackbitz_bot) for multi-user chat; web app for goals + logs + companion chat (single mock user, no auth)
Built With
- exa
- modal
- nextjs
- supermemory
- telegram
Log in or sign up for Devpost to join the conversation.