Inspiration

Every semester, 20 million college students generate thousands of files: lecture notes, code repos, research papers, project reports. But when they need help, they open ChatGPT and start from zero. Re-upload the same files. Re-explain their context. Get generic answers that could've been given to anyone.

We asked: what if your AI actually knew you?

What it does

Kairos is a persistent knowledge operating system for students. It connects to your local files via a CLI, extracts concepts using AST parsing and Gemini, builds a 3D knowledge graph, and deploys AI agents that reason from multiple perspectives grounded in your actual work.

  • CLI Bridge: pip install kairos && kairos connect ~/my-classes syncs your files automatically
  • Knowledge Graph Pipeline: tree-sitter for code structure + Gemini for semantic meaning, with Leiden community detection
  • 3D Galaxy Visualization: Your knowledge as an interactive universe. Planets are clusters, stars are concepts
  • Multi-Agent Reasoning: 3+ AI agents (Mentor, Critic, Explorer) analyze questions from different angles, grounded in your files
  • Persistent Memory: 4-layer memory stack that gets smarter the longer you use it
  • Multimodal Search: Images and text in the same embedding space via Gemini Embedding 2

How we built it

Backend: FastAPI + PostgreSQL + pgvector. Graph pipeline uses tree-sitter (Python/JS/TS/Java), Gemini 2.5 Flash, NetworkX, and Leiden clustering. Hybrid search with Reciprocal Rank Fusion.

Frontend: Next.js 14 + react-force-graph-3d (Three.js). Custom planet textures, bloom effects, glassmorphism UI. Real-time WebSocket streaming.

CLI: Python Click with WebSocket sync. SHA-256 deduplication, 64KB chunked streaming.

AI: Gemini 2.5 Flash for multi-agent reasoning. Gemini Embedding 2 Preview for multimodal embeddings (768-dim).

Challenges we ran into

  • School WiFi blocking PostgreSQL ports to Supabase. Built local PostgreSQL fallback.
  • asyncpg returns JSONB as strings, not dicts. Hours of debugging.
  • Rendering 1000+ 3D nodes without lag. Optimized geometry, tuned d3-force physics.
  • Duplicate WebSocket connections from React StrictMode. Fixed with ref-based management.

Accomplishments we're proud of

  • Full end-to-end pipeline: install CLI, connect folder, graph builds, galaxy renders, agents reason from your code
  • 1000+ nodes indexed from real student files
  • The 3D galaxy creates a genuine "aha" moment
  • Multi-perspective AI grounded in actual work, not generic responses

What we learned

  • pgvector + hybrid search (RRF) is powerful for knowledge retrieval
  • Gemini's multimodal embeddings open up cross-modal search
  • D3-force-3d physics tuning is an art
  • Building real-time systems with WebSockets requires careful state management

What's next

  • GitHub OAuth for one-click repo connection
  • Collaborative galaxies between classmates
  • University partnerships for advisor analytics
  • Mobile app with 2D fallback

Built With

Share this project:

Updates