Project Info
What's next
for Compressgram Two frustrations collided into one project. First, AI course generators have a retention problem nobody is solving. The whole market races to generate courses faster — "courses in seconds," "11x faster content." But a course you forget in a week is a fast way to waste time. Speed became table stakes; learning got left behind. We kept coming back to the Feynman technique — learn by explaining simply and answering questions until the gaps close — a proven, retention-first method that's barely used in schools and almost absent from AI course tools. That became our product: an agent that builds courses designed to stick, grounded in the learner's own material. Second, grounding courses in real source material (via RAG) means feeding large amounts of retrieved text to an LLM on every generation — which is slow and expensive, and at scale, that cost is the business. When we saw The Token Company's compression challenge, the two problems clicked together: the bloated, retrieval-heavy context our product produces is exactly what compression is built to shrink. One build could serve both. 🧠 What we learned The biggest lesson was conceptual: token reduction and downstream quality are a pair, never a single number. Anyone can delete tokens — delete them all and you've "compressed" 100% and destroyed the output. The real bar, and the one The Token Company's challenge actually sets, is reduce tokens while preserving the quality of what the model produces. That reframed our entire benchmark. We also went deep on the prompt-compression literature and learned there's a clean taxonomy behind it: Selective-Context — the ancestor: score each unit by informativeness, drop the least informative. Simple, but one-directional and prone to dropping things that matter. LLMLingua — adds a budget controller (different compression budgets for different parts of the prompt) and iterative, dependency-aware compression. Up to ~20×\times × compression with little loss. LongLLMLingua — makes compression question-aware (keep what's relevant to the query) and reorders key content to fight the "lost in the middle" effect. Crucially, it showed compression can improve downstream performance, not just preserve it. LLMLingua-2 — reframes compression as a token classification task (preserve/discard), trained on GPT-4-distilled labels — fast and task-agnostic. SCOPE — a generative approach (rewrite/summarize rather than delete). The mechanism that ties it together — and that we leaned on — is signal-to-noise: stripping redundant filler makes the tokens that matter a larger fraction of what the model sees, so a shorter prompt can be easier for the model to use, not harder. The system has two halves. One teammate built the RAG course agent — retrieval, agent orchestration, and discoverability via ASI:One (so the agent is reachable with an @ mention). The other built the compression layer that sits between retrieval and generation. This is that layer: Our own compression algorithm. Instead of merely calling a compression API, we wrote our own query-aware extractive compressor, synthesized from the research above. For each piece of retrieved material it: splits text into sentences, scores each sentence by relevance to the course topic / the learner's current question (embedding similarity — the LongLLMLingua question-aware idea), boosts sentences containing definitions, facts, entities, and numbers, removes near-duplicate sentences, keeps the highest-scoring sentences within a token budget (the keep/discard framing from LLMLingua-2), moves high-value sentences toward the front (anti "lost in the middle"), and deletes without ever rewriting — so facts and numbers stay exact (a deliberate choice against SCOPE-style generative rewriting, which could alter a figure and corrupt course accuracy). Roughly, each sentence ss score(s)=w1⋅rel(s,q)+w2⋅info(s)−w3⋅dup(s) info(s) rewards definitions/entities/numbers, and dup(s)\text{dup}(s) dup(s) penalizes redundancy. We keep top-scoring sentences until the token budget is met. Domain-aware split logic. Our layer knows it's compressing course material. It decides what is safe to compress (retrieved chunks, prior Q&A, carried context) versus what must stay exact (system prompt, course schema, the learner's current question). A generic compression API has no idea about these boundaries — send it the whole prompt and it may corrupt what should stay precise. Our layer protects them by design. Domain-aware split logic. Our layer knows it's compressing course material. It decides what is safe to compress (retrieved chunks, prior Q&A, carried context) versus what must stay exact (system prompt, course schema, the learner's current question). A generic compression API has no idea about these boundaries — send it the whole prompt and it may corrupt what should stay precise. Our layer protects them by design. A three-mode framework. Everything runs behind one interface with three swappable modes: none (baseline), local (our own algorithm), and token-company (the commercial API). This means we are not locked to any vendor — we can run entirely on our own compressor with zero external calls — and it lets us benchmark all three head-to-head. A three-mode framework. Everything runs behind one interface with three swappable modes: none (baseline), local (our own algorithm), and token-company (the commercial API). This means we are not locked to any vendor — we can run entirely on our own compressor with zero external calls — and it lets us benchmark all three head-to-head. Resilience. The layer never throws and never blocks generation. If compression fails (API slow/down), it falls back to the original full context and flags it; if retrieval returns nothing, it returns cleanly without a wasted call. The product never breaks because of a compression hiccup. Resilience. The layer never throws and never blocks generation. If compression fails (API slow/down), it falls back to the original full context and flags it; if retrieval returns nothing, it returns cleanly without a wasted call. The product never breaks because of a compression hiccup. The benchmark harness. To prove "quality held," we run paired generations of the same course — once with compressed context, once without — at temperature 0 so compression is the only variable. A blind LLM-as-judge then scores both outputs on accuracy, coverage, and question quality without knowing which is which. We sweep the compression aggressiveness to find the point where quality starts to drop — the safe operating point. The benchmark harness. To prove "quality held," we run paired generations of the same course — once with compressed context, once without — at temperature 0 so compression is the only variable. A blind LLM-as-judge then scores both outputs on accuracy, coverage, and question quality without knowing which is which. We sweep the compression aggressiveness to find the point where quality starts to drop — the safe operating point. A live telemetry dashboard. Tokens before/after, % saved, quality-held as a pair, savings broken down by source, the protected-content panel, and the fallback state — making the otherwise-invisible compression visible in real time. A live telemetry dashboard. Tokens before/after, % saved, quality-held as a pair, savings broken down by source, the protected-content panel, and the fallback state — making the otherwise-invisible compression visible in real time.
Diagram Drawing Coach
Learn technical diagrams by drawing — circuits, neural networks, flowcharts — with a vision AI coach, shadow reference overlay, and voice guidance.
ASI:One agent: deploy agent/drawing_agent.py on Agentverse (handle @diagram-coach).
Architecture
ASI:One → Agentverse (drawing_agent.py)
→ POST /api/drawing/session (creates canvas link)
User → /draw/[sessionId] (canvas + vision coach)
→ POST /api/drawing/coach (vision feedback)
→ POST /api/drawing/reference (upload hidden reference)
Local dev
cp .env.example .env.local # if you have one
npm install
npm run dev
Open http://localhost:3000 — you land on the canvas to upload a reference and start drawing.
Required env vars
| Variable | Purpose |
|---|---|
NEXT_PUBLIC_APP_URL | Canvas links (e.g. http://localhost:3000) |
AGENT_API_SECRET | Auth for Agentverse → API calls |
VISION_API_KEY | Vision coach (or OPENAI_API_KEY) |
DEEPGRAM_API_KEY | Optional — Deepgram voice (STT + TTS); falls back to browser speech if unset |
Optional: Supabase for reference image storage (NEXT_PUBLIC_SUPABASE_URL, keys).
Agentverse deploy
See AGENTVERSE_DEPLOY.md and agent/DRAWING_ASI_ONE_SETUP.md.
Agent secrets:
| Secret | Value |
|---|---|
DRAWING_APP_URL | https://your-app.vercel.app |
AGENT_API_SECRET | same as Vercel |
Script: agent/drawing_agent.py
Profile README: paste agent/DRAWING_AGENT_README.md in Agentverse agent description / overview (there is no separate README tab on all plans — use the agent profile Description or Overview field).
API
| Route | Auth | Purpose |
|---|---|---|
GET /api/drawing/health | none | Health check for agent ping |
POST /api/drawing/session | agent key or user session | Create canvas session |
POST /api/drawing/coach | none (session id) | Vision coaching |
POST /api/drawing/reference | none | Upload reference image |
GET /api/drawing/ghost | none | Shadow reference image |
Agent auth header: X-Agent-Api-Key: <AGENT_API_SECRET>
Analysis
View
Metric
- 9
- 5
- 5
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
- CSSIn code
- Next.jsIn code
- PythonIn code
- ReactIn code
- SQLIn code
- SupabaseIn code
- Tailwind CSSIn code
- TypeScriptIn code
8 of 8 appear in the indexed code.
AI coding agents
- Claude CodeCommits
- CursorCommits
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
245 KB
Source files
77
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
vighanesh2/HackBerkley2026
92 files · 621 KB · @ ac09676
Structure
Interface
16 files · 17%Screens, components and styles rendered to the user.
API & routing
9 files · 10%Request entry points: routes, handlers and controllers.
Application logic
36 files · 39%Domain rules, services and shared utilities.
+1 moreData & schema
8 files · 9%Schema definitions, migrations and data access.
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
- TypeScript87%
- Python5%
- Markdown4%
- CSS3%
- SQL1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 16- @supabase/ssr
- @supabase/supabase-js
- next
- react
- react-dom
- the-token-company
- tldraw
- zod
- +8 more
agent/requirements.txt
pypi · 2- requests
- uagents-core
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.