Project Info
Inspiration
Your head is the loudest exactly when you have the least amount of time to deal with it: finals week, a hackathon, a Sunday night with a flight you haven't packed for. It all comes out as one run-on thought: "Stressed about tests, project due Friday, interview Saturday, flight Sunday -- and I'm not packed." Every note app makes you stop and organize that yourself, which is the last thing you want to do mid-spiral. We wanted the opposite: just talk, and watch it sort itself out into something you can actually act on, not just another empty doc staring back at you.
What it does
Mental Galaxy is a voice-first thought-mapping app. You hold the mic and talk through your day. Your words stream in live, each thought gets classified into a task, emotion, or idea, and drops onto an animated, force-directed galaxy of bubbles with connections drawn between related thoughts. From there, it goes further than a map: Guidance: Tap any bubble and ask, "What should I do?" An agent pulls from your past sessions and suggests one concrete, grounded next step. It only runs when asked, so it never nags. Action: Hit "Execute" on a task bubble, and specialized agents take over -- adding the event to your calendar or drafting an email. The bubble turns green when it's done.
How we built it
We split the work three ways -- one person on the voice pipeline, one on the canvas, one on agents/infra -- and converged at three milestones (the map, the guidance, the action) so we always had a demoable product instead of betting everything on the final hour. Frontend & Voice: React + D3 for the force-directed canvas. Deepgram Nova-2 streams speech-to-text, piping raw PCM audio over a WebSocket using the AudioWorklet API for low latency. Reasoning Orchestration: FastAPI orchestrates the pipeline. Claude (Anthropic) classifies each thought and finds connections, returning the structured JSON that drives the galaxy. Memory: Redis + RedisVL for vector search over past sessions. This ensures the agent actually knows what you said last week, making suggestions feel grounded instead of generic. Agents: Fetch.ai uAgents (registered on Agentverse) route each bubble to the right specialized agent. Google Calendar and Gmail APIs act as the agents' actual hands. Observability: Arize logs every Claude classification decision to watch the model's behavior in real-time, while Sentry monitors the stack for errors.
Challenges we ran into
Getting an LLM to emit reliable, structured JSON under the pressure of messy, real-speech input took massive prompt iteration. For example, getting the model to correctly file "violin" and "cross country" under an existing "hobbies" bubble, rather than inventing three new bubbles, took significant work. We fixed this by reframing existing sections as "containers" rather than "peers," which completely changed how the model reasoned about placement. Other hurdles included handling the backpressure of streaming audio over websockets, maintaining D3 force-simulation performance as the galaxy got crowded, and wiring up OAuth under serious time pressure.
What we learned
Reliable LLM outputs require constant refinement, and observability in a multi-stage AI pipeline isn't a nice-to-have. When something can break at Deepgram, Claude, Redis, or an agent, Arize and Sentry were the only reasons we could find the break fast. But the biggest lesson wasn't technical. The best demo moment wasn't any specific feature we planned; it was the silence right after you stop talking, watching the galaxy automatically build and organize itself.
What's next
Richer connections: Adding causal and temporal links between bubbles, not just "related." More execution agents: Expanding beyond calendar and email integrations. Multiplayer: Shared galaxies so a team can map out a project together out loud. Mobile App: So you can talk through your commute and watch your thoughts organize by the time you get home.
Mental Galaxy π
Voice-first thought mapping. You talk through your day β your stresses, your tasks, your half-formed ideas β and watch them organize themselves into a living constellation. Ask any bubble for guidance and an agent pulls from everything you've said before to suggest a real next step. When you're ready, it can go execute the tasks for you.
Built for UC Berkeley AI Hackathon 2026.
The three milestones
This repo is structured so you can ship at any of three stopping points. Each one is a complete, demoable product on its own.
Milestone 1 β The Map. Speak β live transcription β thoughts classified into task / emotion / idea β animated bubble constellation with connections drawn between related thoughts. Sessions persist. This is the wow moment and it stands alone.
Milestone 2 β The Guidance. Tap any bubble and ask "what should I do?" An agent pulls semantically related moments from your past sessions and suggests a concrete, grounded next step. Only runs when you ask β it never nags.
Milestone 3 β The Action. Task bubbles get an Execute button. Specialized agents add events to your calendar or draft emails. The bubble turns green when done. This is last because it's riskiest; everything above it already wins.
Architecture
βββββββββββββββ
speak βββββββββββΆβ Deepgram β streaming speech-to-text
ββββββββ¬βββββββ
β transcript
ββββββββΌβββββββ
β Claude β classify β {task|emotion|idea}
β (Anthropic) β + find connections
ββββββββ¬βββββββ
β JSON nodes
ββββββββββββββββββββΌβββββββββββββββββββ
β β β
βββββββΌββββββ ββββββββΌβββββββ ββββββββΌβββββββ
β Canvas β β Redis β β Fetch.ai β
β (D3 bubbleβ β vector mem β β agents β
β galaxy) β β + search β β (uAgents) β
βββββββββββββ βββββββββββββββ ββββββββ¬βββββββ
β
βββββββββββββββββΌββββββββββββββββ
βββββββΌββββββ ββββββββΌββββββ ββββββββΌββββββ
β Insight β β Calendar β β Email β
β Agent β β Agent β β Agent β
β (M2) β β (M3) β β (M3) β
βββββββββββββ βββββββ¬βββββββ βββββββ¬βββββββ
Google Cal API Gmail API
Arize logs every Claude classification Β· Sentry watches everything
Tech stack & who does what
| Layer | Tool | Role | Milestone |
|---|---|---|---|
| Voice | Deepgram | streaming STT, words appear as you speak | 1 |
| Reasoning | Claude (Anthropic) | classify thoughts, find connections, suggestions | 1, 2 |
| Canvas | React + D3 | force-directed bubble galaxy | 1 |
| Memory | Redis | vector search over past sessions, agent memory | 2 |
| Orchestration | Fetch.ai (uAgents) | route bubbles to the right agent, run in parallel | 2, 3 |
| Execution | Google Calendar + Gmail | the agents' actual hands | 3 |
| Observability | Arize | dashboard of every classification decision | 1 |
| Reliability | Sentry | error monitoring across the stack | 1 |
Repo layout
thought-galaxy/
βββ backend/ FastAPI β orchestrates Deepgram, Claude, Redis, agents
β βββ app/
β β βββ main.py entry + WebSocket for live transcription
β β βββ deepgram_stream.py voice β text
β β βββ classify.py Claude: transcript β bubble JSON
β β βββ suggest.py Claude + Redis: bubble β suggestion (M2)
β β βββ memory.py Redis vector store + search (M2)
β β βββ observability.py Arize + Sentry setup
β β βββ schemas.py shared data shapes
β βββ requirements.txt
βββ agents/ Fetch.ai uAgents
β βββ insight_agent.py suggestions from past context (M2)
β βββ calendar_agent.py Google Calendar (M3)
β βββ email_agent.py Gmail (M3)
β βββ requirements.txt
βββ frontend/ React + D3 bubble canvas
β βββ src/
β βββ App.jsx
β βββ Galaxy.jsx the D3 force-directed map
β βββ useRecorder.js mic capture β backend WebSocket
β βββ api.js
βββ .env.example every key you need, in one place
Quick start
# 1. Backend
cd backend
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
cp ../.env.example .env # fill in your keys
uvicorn app.main:app --reload
# 2. Agents (separate terminal, Milestone 2+)
cd agents
pip install -r requirements.txt
python insight_agent.py
# 3. Frontend (separate terminal)
cd frontend
npm install
npm run dev
Division of labor (3 people)
- Person A β Pipeline:
deepgram_stream.py,classify.py, the WebSocket inmain.py. Owns voiceβnodes. - Person B β Canvas: all of
frontend/. Owns the visual wow. - Person C β Agents + infra:
agents/,memory.py,observability.py. Owns Redis, Fetch.ai, Arize, Sentry.
A and B merge at Milestone 1. Then everyone converges on Milestone 2 before touching Milestone 3.
Analysis
View
Metric
- 21
- 20
- 11
- 3
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- AnthropicIn code
- CSSIn code
- FastAPIIn code
- HTMLIn code
- JavaScriptIn code
- PythonIn code
- ReactIn code
- RedisIn code
8 of 8 appear in the indexed code.
AI coding agents
- Claude CodeCommits
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
296 KB
Source files
29
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
gargi-ramacharan/mentalgalaxy
38 files Β· 436 KB Β· @ 4cd3cbb
Structure
Interface
13 files Β· 34%Screens, components and styles rendered to the user.
Application logic
14 files Β· 37%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here β open the file browser to check anything the diagram implies.
Languages
- HTML64%
- Python25%
- Markdown5%
- JavaScript5%
- CSS1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
backend/requirements.txt
pypi Β· 18- anthropic
- arize
- deepgram-sdk
- fastapi
- google-api-python-client
- google-auth-httplib2
- google-auth-oauthlib
- httpx
- numpy
- pandas
- pydantic
- python-dotenv
- redis
- redisvl
- sentence-transformers
- sentry-sdk
- uvicorn[standard]
- websockets
agents/requirements.txt
pypi Β· 5- anthropic
- google-api-python-client
- google-auth
- google-auth-oauthlib
- uagents
frontend/package.json
npm Β· 5- d3
- react
- react-dom
- +2 more
Declared in the repositoryβs manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This projectβs features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.