Community-Driven Code Automation with AI Consensus
How It Works β’ Features β’ Tech Stack β’ Quick Start β’ User Guide β’ Contributing
Echo Agent is an autonomous platform that bridges the gap between community sentiment and codebase evolution. It listens to your users wherever they speak β GitHub, Reddit, Product Hunt β analyzes their feedback using a fully local LLM, and automatically proposes code changes through Pull Requests. No cloud AI costs. No data leaving your machine.
Echo Agent follows a closed-loop pipeline: Listen β Analyze β Synthesize β Act.
graph LR
A["π’ Community Feedback<br/>(Reddit, Product Hunt, GitHub)"] --> B["π Scrapers<br/>(Puppeteer)"]
B --> C["π§ Local LLM<br/>(Qwen 2.5 Coder 7B)"]
C --> D["π Sentiment & Priority<br/>Analysis"]
D --> E["π Vector Embeddings<br/>(pgVector + MiniLM)"]
E --> F{"βοΈ Consensus<br/>Engine"}
F -- "Actionable" --> G["π» Code Generation<br/>(Local LLM)"]
F -- "Noise" --> H["ποΈ Filtered"]
G --> I["π Pull Request<br/>(GitHub API)"]
I --> J["π Human Review"]
| Step | What Happens |
|---|---|
| 1. Listen | Scrapers pull comments from Reddit threads, Product Hunt pages, and GitHub discussions into Supabase. Real-time listeners auto-trigger on new data. |
| 2. Analyze | The local Qwen 2.5 Coder 7B LLM classifies each comment: sentiment score (-1 to +1), category (bug / feature / question), priority, actionable summary, and keywords. |
| 3. Synthesize | Sentence-transformer embeddings (all-MiniLM-L6-v2) are stored in pgVector. Semantic search clusters similar feedback to surface true community consensus. |
| 4. Act | When the agent detects actionable feedback, it clones the target repo, generates code patches using the LLM, creates a branch, and opens a Pull Request β all automatically. |
| Feature | Description |
|---|---|
| π― Semantic Signal Detection | Goes beyond keywords β identifies intent, frustration levels, and priority from raw feedback. |
| π€ Autonomous Code Agent | Watches for high-priority signals, generates code patches, and opens PRs β zero manual intervention. |
| π¬ Multi-Platform Scrapers | Ingest feedback from Reddit, Product Hunt, and GitHub with one click. |
| π Semantic Search | Natural language queries like "What are users complaining about in the login flow?" powered by vector similarity. |
| π AI Insights Dashboard | Real-time sentiment trends, community intelligence reports, and priority-ranked action items. |
| π₯οΈ Live Agent Terminal | Watch the AI agent work in real-time through a streaming terminal and execution trace view. |
| π‘οΈ Human-in-the-Loop | No code reaches production without your approval β every PR gets human review. |
| π 100% Local Intelligence | Powered entirely by Qwen 2.5 via llama-cpp-python β zero cloud LLM costs, zero data leaks. |
| Feature | Description |
|---|---|
| π Business Analytics Portal | Track developer reach, community sentiment, and engagement metrics. |
| π Google OAuth Login | Separate business login flow with Google, tailored for non-developer stakeholders. |
| π Campaign & Sentiment Tracking | Monitor developer sentiment across campaigns and product launches. |
- Brutalist Design Language β Bold, high-contrast interface with thick borders, hard shadows, and uppercase typography.
- Fully Responsive β Works on desktop and mobile.
- Dark Mode Login β Dual-mode login page with developer (GitHub) and business (Google) toggles.
graph TB
subgraph Frontend["Frontend (Next.js 14)"]
LP[Landing Page]
DA[Dashboard]
BP[Business Portal]
LG[Login / Auth]
end
subgraph Dashboard
CF[Community Feed]
AI[AI Insights]
EA[Echo Agent]
RD[Reddit Scraper]
PH[Product Hunt Scraper]
PR[Profile]
SB[Subscription]
end
subgraph Backend["Python Backend (FastAPI)"]
LLM["Qwen 2.5 Coder 7B<br/>(llama-cpp-python)"]
EMB["Sentence Transformers<br/>(all-MiniLM-L6-v2)"]
RL[Realtime Listener]
CG[Code Generator]
end
subgraph Data["Data Layer"]
SU[(Supabase / PostgreSQL)]
PG["pgVector<br/>(384-dim embeddings)"]
RD2["Upstash Redis<br/>(Rate Limiting)"]
end
subgraph External["External Services"]
GH[GitHub API]
PP[Puppeteer]
end
Frontend --> Backend
Frontend --> Data
Backend --> Data
CG --> GH
DA --> Dashboard
| Layer | Technology | Purpose |
|---|---|---|
| Framework | Next.js 14 (App Router) | Server components, server actions, SSR |
| Styling | Tailwind CSS + Shadcn/ui + Radix UI | Brutalist component system |
| Charts | Recharts | Dashboard analytics visualizations |
| Auth | Supabase Auth (GitHub OAuth + Google OAuth) | Dual-mode authentication |
| Database | Supabase (PostgreSQL) | Posts, comments, profiles, agent tasks, tokens |
| Vector Search | pgVector (384-dim) | Semantic similarity search for feedback clustering |
| Embeddings | Sentence Transformers (all-MiniLM-L6-v2) | Local text-to-vector conversion |
| LLM | Qwen 2.5 Coder 7B Instruct (GGUF, Q5_K_M) | Comment analysis, report generation, code generation |
| LLM Runtime | llama-cpp-python | CPU/GPU inference for GGUF models |
| Rate Limiting | Upstash Redis | API rate limiting and throttling |
| Scraping | Puppeteer | Headless browser scraping for Reddit & Product Hunt |
| Backend API | FastAPI + Uvicorn | LLM inference, embedding generation, realtime processing |
| VCS Integration | GitHub REST API | Repo tree access, branch creation, PR automation |
| Requirement | Version | Notes |
|---|---|---|
| Node.js | 18+ | Required for Next.js frontend |
| Python | 3.10+ | Required for FastAPI backend |
| Supabase Account | β | Free tier works. Sign up here |
| Upstash Redis | β | Free tier works. Sign up here |
| GitHub OAuth App | β | For developer login. Create one here |
| Google OAuth | β | For business login. Google Cloud Console |
| GPU (Optional) | 6GB+ VRAM | Dramatically speeds up LLM inference |
git clone https://github.com/VaradSinghal/echo-v2.git
cd echo-v2npm installCreate a .env.local file in the project root:
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# Local Backend
LOCAL_EMBEDDING_URL=http://localhost:8000/embed
# Upstash Redis (Rate Limiting)
UPSTASH_REDIS_REST_URL=your_upstash_redis_url
UPSTASH_REDIS_REST_TOKEN=your_upstash_redis_tokenCreate a .env file inside python_backend/:
SUPABASE_URL=your_supabase_project_url
SUPABASE_KEY=your_supabase_service_role_key
FRONTEND_URL=http://localhost:3000Apply all migration files from supabase/migrations/ to your Supabase project in order. These create the schema for:
| Table | Purpose |
|---|---|
profiles |
User profiles synced from OAuth |
github_tokens |
GitHub access tokens (per user) |
posts |
Scraped threads / topics |
comments |
Individual feedback entries |
comment_analysis |
LLM sentiment/priority analysis results |
agent_tasks |
Code generation task tracking |
comment_embeddings |
pgVector embeddings (384-dim) |
Tip
You can paste each .sql file into the Supabase SQL Editor in your project dashboard, or use the Supabase CLI:
supabase db pushcd python_backend
# Create and activate a virtual environment
python -m venv venv
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txtpython download_model.pyThis downloads Qwen 2.5 Coder 7B Instruct (Q5_K_M quantization, ~5GB) from Hugging Face into the python_backend/models/ directory.
Note
First download may take 10-30 minutes depending on your connection. The model file is approximately 5GB.
python main.pyThe FastAPI server starts on http://localhost:8000. It will:
- Load the Qwen 2.5 model into memory
- Load the sentence-transformer embedding model
- Connect to Supabase and start listening for real-time events
Open a new terminal in the project root:
npm run devThe Next.js app starts on http://localhost:3000.
echo-v2/
βββ app/ # Next.js App Router
β βββ page.tsx # Landing page
β βββ login/ # Dual-mode login (GitHub / Google)
β βββ auth/ # OAuth callback handlers
β βββ dashboard/ # Protected dashboard routes
β β βββ feed/ # Community feed viewer
β β βββ insights/ # AI-powered analytics
β β βββ agent/ # Echo Agent control center
β β βββ reddit/ # Reddit scraper interface
β β βββ product-hunt/ # Product Hunt scraper
β β βββ profile/ # User profile
β β βββ subscription/ # Plans & marketplace
β βββ business/ # Business analytics portal
β βββ actions/ # Server actions
β β βββ agent.ts # Agent triggers, monitoring, search
β β βββ scraper.ts # Reddit & PH scraping actions
β β βββ feed.ts # Feed data actions
β βββ api/ # API routes (GitHub callback, agent)
β
βββ components/ # React components
β βββ agent/ # Agent terminal, monitoring, search
β βββ dashboard/ # Sidebar, local insights
β βββ landing/ # Hero, features, nav, footer
β βββ feed/ # Community feed components
β βββ reddit/ # Reddit scraper UI
β βββ product-hunt/ # Product Hunt scraper UI
β βββ ui/ # Shadcn/Radix primitives
β
βββ lib/ # Shared libraries
β βββ github.ts # GitHubService (tree, PR creation)
β βββ redis.ts # Upstash rate limiter
β βββ scraper/ # Reddit & PH scraping logic
β
βββ python_backend/ # FastAPI backend
β βββ main.py # API server + realtime listener
β βββ llm_service.py # Qwen 2.5 LLM wrapper
β βββ download_model.py # Model downloader script
β βββ requirements.txt # Python dependencies
β βββ models/ # Downloaded GGUF models
β
βββ supabase/
β βββ migrations/ # 16 SQL migration files
β
βββ utils/ # Supabase client utilities
β βββ supabase/ # Server, client, middleware helpers
β
βββ public/ # Static assets (logos, SVGs)
The FastAPI backend exposes these endpoints on http://localhost:8000:
| Method | Endpoint | Description |
|---|---|---|
GET |
/health |
Health check β confirms LLM and embeddings are loaded |
POST |
/embed |
Generate 384-dim embedding for a text string |
POST |
/analyze/{comment_id} |
Trigger sentiment analysis for a specific comment |
POST |
/report |
Generate a community intelligence report from comment IDs |
POST |
/top-comment |
Get the highest-priority comment from a set |
POST |
/generate |
Clone a repo, generate code patches, and optionally create a PR |
POST |
/reinitialize-llm |
Force-reload the LLM model |
GET |
/logs |
Fetch the last 100 lines of backend logs |
POST |
/v1/chat/completions |
OpenAI-compatible chat completions endpoint |
We welcome contributions! Here's how to get started:
- Fork the repository
- Create your feature branch
git checkout -b feature/amazing-feature
- Commit your changes
git commit -m "feat: add amazing feature" - Push to your branch
git push origin feature/amazing-feature
- Open a Pull Request
- Run
npm run lintto check for linting errors - The backend auto-reloads on file changes with
uvicorn --reload - Use the
/healthendpoint to verify the backend is running correctly
Distributed under the MIT License. See LICENSE for more information.
Built with β€οΈ by Varad Singhal