Drop a PDF, paste a link, upload an image, or record your meeting.
Get a short, clear summary β powered by the right AI model at the right cost.
π Quick Start Β· π LLM Router Β· π₯ Inputs Β· ποΈ Modes Β· ποΈ Architecture Β· πΊοΈ Roadmap
Most people don't have time to read everything thrown at them β long PDFs, hour-long YouTube videos, dense articles, meeting recordings.
Grasp solves that. Point it at any content and get back what matters in plain English.
You give Grasp β A YouTube link A PDF report A photo of notes A meeting recording
Grasp gives you β Clear summary Key findings Extracted content Action items
No reading required. No manual highlighting. No copy-paste into ChatGPT.
git clone https://github.com/harshitboots/grasp-ai.git
cd grasp-aipython -m venv venv
# Mac / Linux
source venv/bin/activate
# Windows
venv\Scripts\activatepip install -r requirements.txtcp .env.example .env
# Edit .env and add your keysANTHROPIC_API_KEY=sk-ant-...
GEMINI_API_KEY=AIza...
OPENAI_API_KEY=sk-... # only needed for meeting transcriptionstreamlit run app.pyYou can also paste API keys directly in the sidebar β no
.envfile needed.
| Input | What you give it | How it works |
|---|---|---|
| π URL | Any web article, blog, or docs page | BeautifulSoup scrapes and cleans the text |
| Any YouTube link | youtube-transcript-api extracts the transcript |
|
| π PDF | Upload any PDF file | PyMuPDF extracts all text and metadata |
| πΌοΈ Image | Photo, screenshot, diagram, handwritten notes | Gemini Flash Vision reads and extracts content |
| ποΈ Meeting | MP3, MP4, WAV, M4A, WEBM recording | OpenAI Whisper transcribes the audio |
| Mode | What it gives you | Model |
|---|---|---|
| Summary | TL;DR + key bullet points in plain English | Routed (Flash / Haiku) |
| Analysis | Findings, risks, action items, key data | Claude Sonnet |
| Q&A | Chat with the content, full history kept in context | Claude Haiku |
| Flashcards | Revision cards generated from the content | Gemini Flash |
| Teaching (coming soon) | AI tutor that asks you questions and gives feedback | Claude Sonnet |
The router picks the cheapest model that can do the job β no manual selection, no wasted spend.
Input content + mode
β
ββββββββββββββββββββββββββββββββββββββββββββββββββ
β Router Decision β
β β
β image? β Gemini Flash (vision) β
β audio? β Whisper β Claude Haiku β
β analysis mode? β Claude Sonnet β
β words < 2,000? β Gemini Flash β
β words < 8,000? β Claude Haiku β
β words > 8,000? β Claude Haiku + chunking β
ββββββββββββββββββββββββββββββββββββββββββββββββββ
| Content | Model | Estimated cost |
|---|---|---|
| Short article summary | Gemini Flash | ~Β£0.0001 |
| Long PDF summary | Claude Haiku | ~Β£0.0005 |
| Deep document analysis | Claude Sonnet | ~Β£0.003 |
| Meeting transcription + summary | Whisper + Haiku | ~Β£0.006/min |
Cost is shown after every run in the UI.
User input (URL / PDF / Image / Audio)
β
βββββββββββββββββ
β URL Detector β β youtube or web?
βββββββββ¬ββββββββ
β
ββββββββββββββββββββββββ
β Parsers β
β web Β· youtube Β· pdf β
β image Β· audio β
ββββββββββββ¬ββββββββββββ
β
ββββββββββββββββββββββββ
β LLM Router β β Flash / Haiku / Sonnet
ββββββββββββ¬ββββββββββββ
β
ββββββββββββββββββββββββ
β Mode Engine β
β summary Β· analysis β
β qa Β· teaching Β· cardsβ
ββββββββββββ¬ββββββββββββ
β
Output + cost shown
grasp-ai/
βββ app.py β Streamlit web UI
βββ agent/
β βββ router.py β YouTube vs web detection
β βββ llm_router.py β model selection (Flash / Haiku / Sonnet)
β βββ parsers/
β β βββ web_parser.py β BeautifulSoup scraper
β β βββ youtube_parser.py β transcript extraction
β β βββ pdf_parser.py β PyMuPDF text extraction
β β βββ image_parser.py β Gemini Vision
β β βββ audio_parser.py β OpenAI Whisper
β βββ modes/
β β βββ summary.py β TL;DR + key points
β β βββ analysis.py β deep analysis (Claude Sonnet)
β β βββ qa.py β chat with content
β β βββ teaching.py β Socratic tutor
β β βββ flashcards.py β revision cards
β βββ llms/
β βββ claude.py β Anthropic SDK wrapper
β βββ gemini.py β Google Gemini SDK wrapper
β βββ openai.py β OpenAI SDK wrapper
βββ api/
β βββ main.py β FastAPI backend (in progress)
β βββ routers/ β upload / agent / auth / payments
β βββ services/ β blob storage / SQL
βββ auth/
β βββ google_oauth.py
β βββ usage_tracker.py
β βββ stripe_webhook.py
βββ databricks/notebooks/ β ingest / embed / vector index / agent
βββ .streamlit/config.toml β dark purple theme
βββ .env.example
βββ Dockerfile
βββ requirements.txt
| Layer | Technology |
|---|---|
| Web UI | Streamlit |
| Backend API | FastAPI |
| LLM β Analysis / Teaching | Claude Sonnet (claude-sonnet-4-6) |
| LLM β Summary / Q&A | Claude Haiku (claude-haiku-4-5) |
| LLM β Flashcards / Images | Gemini Flash (gemini-1.5-flash) |
| Meeting Transcription | OpenAI Whisper (whisper-1) |
| Embeddings | Azure OpenAI text-embedding-3-small |
| Vector Store | Databricks Vector Search |
| Document Storage | Azure Blob Storage |
| Metadata | Delta Lake (Unity Catalog) |
| Auth | Google OAuth |
| Payments | Stripe |
| PDF Parsing | PyMuPDF |
| Web Scraping | BeautifulSoup + requests |
| Language | Python 3.10+ |
| Hosting | Azure Container Apps |
| CI/CD | GitHub Actions |
- URL scraping (articles, blogs, docs)
- YouTube transcript extraction
- PDF parsing
- Image reading (Gemini Vision)
- Meeting / audio transcription (Whisper)
- Summary mode
- Deep analysis mode
- Multi-model router (Flash / Haiku / Sonnet)
- Q&A mode β chat with any content
- Flashcards mode β revision cards from any content
- Teaching mode β Socratic AI tutor
- Google OAuth + usage tracking
- Free tier (3 uploads/month) + Pro (Β£5/month)
- Streamlit Cloud deployment
- Expo / React Native app
- FastAPI backend
- Stripe payments
- App Store + Google Play
| Variable | Required for |
|---|---|
ANTHROPIC_API_KEY |
Summary, analysis, teaching, Q&A |
GEMINI_API_KEY |
Images, flashcards, short summaries |
OPENAI_API_KEY |
Meeting / audio transcription (Whisper) |
AZURE_OPENAI_KEY |
Embeddings (Q&A mode) |
AZURE_STORAGE_CONNECTION_STRING |
Document storage |
AZURE_SQL_CONNECTION_STRING |
Usage tracking |
DATABRICKS_HOST |
Vector search |
DATABRICKS_TOKEN |
Vector search |
STRIPE_SECRET_KEY |
Payments |
GOOGLE_CLIENT_ID |
Auth |
See .env.example for the full list.
git clone https://github.com/harshitboots/grasp-ai.git
cd grasp-ai
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
git checkout -b feature/your-feature
# make changes
streamlit run app.py # test locally
git push origin feature/your-feature
# open a PRGood first contributions:
- New parser β Word docs, PowerPoint, audio from URLs
- Teaching mode β
agent/modes/teaching.py, Socratic-style prompting on top of Claude Sonnet - Vector search for Q&A β swap the in-context approach in
agent/modes/qa.pyfor chunking + retrieval once documents get long - New connector β Notion, Google Drive, Confluence
MIT β free to use, modify and distribute.