|
1 | | -<h1 align="center">Pocket Flow Project Template: Agentic Coding</h1> |
| 1 | +# CrawlWise: GEO Agent System |
2 | 2 |
|
3 | | -<p align="center"> |
4 | | - <a href="https://github.com/The-Pocket/PocketFlow" target="_blank"> |
5 | | - <img |
6 | | - src="./assets/banner.png" width="800" |
7 | | - /> |
8 | | - </a> |
9 | | -</p> |
| 3 | +CrawlWise is an end-to-end Generative Engine Optimization (GEO) agent system that audits and improves webpages for SEO and AI-readiness. It combines a FastAPI backend, a modern React/Tailwind frontend, the [PocketFlow](https://github.com/The-Pocket/PocketFlow) agent framework, and the [AlchemystAI LLM Proxy](https://getalchemystai.com) for robust, production-grade content analysis and generation. |
10 | 4 |
|
11 | | -This is a project template for Agentic Coding with [Pocket Flow](https://github.com/The-Pocket/PocketFlow), a 100-line LLM framework, and your editor of choice. |
| 5 | +--- |
12 | 6 |
|
13 | | -- We have included the [.cursorrules](.cursorrules), [.clinerules](.clinerules), and [.windsurfrules](.windsurfrules) files to let Cursor AI (also Cline, or Windsurf) help you build LLM projects. |
14 | | - |
15 | | -- Want to learn how to build LLM projects with Agentic Coding? |
| 7 | +## 🚀 What is CrawlWise? |
| 8 | + |
| 9 | +- **Input:** A user submits a public URL (plus optional keywords and tone). |
| 10 | +- **Process:** |
| 11 | + 1. The backend crawls the page (using [Crawl4AI](https://pypi.org/project/crawl4ai/)), extracts content and metadata. |
| 12 | + 2. PocketFlow orchestrates a multi-step agent pipeline: |
| 13 | + - **Audit Node:** Analyzes structure, SEO/GEO issues, and provides recommendations (via AlchemystAI LLM). |
| 14 | + - **Enhancement Node:** Generates improved intro, meta tags, and FAQ (via AlchemystAI LLM). |
| 15 | + 3. The frontend displays results in a clean, animated UI. |
| 16 | +- **Output:** A structured JSON with audit and improvement suggestions. |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +## 🛠️ Tech Stack |
| 21 | + |
| 22 | +- **Backend:** FastAPI, [PocketFlow](https://github.com/The-Pocket/PocketFlow), [Crawl4AI](https://pypi.org/project/crawl4ai/), [LangChain](https://python.langchain.com/), [AlchemystAI LLM Proxy](https://getalchemystai.com) |
| 23 | +- **Frontend:** React, TailwindCSS |
| 24 | +- **Agent Orchestration:** [PocketFlow](https://github.com/The-Pocket/PocketFlow) |
| 25 | +- **LLM Provider:** [AlchemystAI](https://getalchemystai.com) |
| 26 | + |
| 27 | +--- |
| 28 | + |
| 29 | +## 🏗️ Architecture |
| 30 | + |
| 31 | +```mermaid |
| 32 | +graph TD |
| 33 | + A[User (Frontend)] -->|Submits URL| B[FastAPI Backend] |
| 34 | + B --> C[Crawl4AI Crawler] |
| 35 | + C --> D[Extracted Content & Metadata] |
| 36 | + D --> E[PocketFlow Agent Pipeline] |
| 37 | + E --> F[Audit Node (LLM via AlchemystAI)] |
| 38 | + E --> G[Enhancement Node (LLM via AlchemystAI)] |
| 39 | + F --> H[Audit JSON] |
| 40 | + G --> I[Improvements JSON] |
| 41 | + H & I --> J[API Response] |
| 42 | + J -->|Display Results| A |
| 43 | + F & G --> K[AlchemystAI LLM Proxy] |
| 44 | + K -.->|LLM Calls| F |
| 45 | + K -.->|LLM Calls| G |
| 46 | +``` |
| 47 | + |
| 48 | +--- |
| 49 | + |
| 50 | +## 🌐 Key Links |
| 51 | + |
| 52 | +- **PocketFlow Agent Framework:** [https://github.com/The-Pocket/PocketFlow](https://github.com/The-Pocket/PocketFlow) |
| 53 | +- **AlchemystAI LLM Proxy:** [https://getalchemystai.com](https://getalchemystai.com) |
| 54 | + |
| 55 | +--- |
| 56 | + |
| 57 | +## ⚡ Quickstart |
| 58 | + |
| 59 | +1. **Clone the repo** |
| 60 | + ```bash |
| 61 | + git clone <your-fork-or-this-repo> |
| 62 | + cd CrawlWise |
| 63 | + ``` |
| 64 | +2. **Set up environment** |
| 65 | + - Create a `.env` file in `src/` with your AlchemystAI API key: |
| 66 | + ```env |
| 67 | + ALCHEMYST_API_KEY=sk-... # Get yours at https://getalchemystai.com |
| 68 | + ``` |
| 69 | +3. **Install backend dependencies** |
| 70 | + ```bash |
| 71 | + cd src |
| 72 | + pip install -r requirements.txt |
| 73 | + # or |
| 74 | + pip install . |
| 75 | + ``` |
| 76 | +4. **Run the backend** |
| 77 | + ```bash |
| 78 | + uvicorn main:app --reload |
| 79 | + ``` |
| 80 | +5. **Run the frontend** |
| 81 | + ```bash |
| 82 | + cd frontend |
| 83 | + npm install |
| 84 | + npm run dev |
| 85 | + ``` |
| 86 | + |
| 87 | +--- |
| 88 | + |
| 89 | +## 🔑 Get an AlchemystAI API Key |
| 90 | +- Sign up at [https://getalchemystai.com](https://getalchemystai.com) |
| 91 | +- Copy your API key and add it to your `.env` as `ALCHEMYST_API_KEY` |
| 92 | + |
| 93 | +--- |
| 94 | + |
| 95 | +## 📡 Example API Usage |
| 96 | + |
| 97 | +**Request:** |
| 98 | +```json |
| 99 | +POST /api/v1/audit |
| 100 | +{ |
| 101 | + "agent": "seo", |
| 102 | + "url": "https://example.com/your-blog-post", |
| 103 | + "keywords": ["LLM SEO", "AI search"], |
| 104 | + "tone": "professional" |
| 105 | +} |
| 106 | +``` |
| 107 | + |
| 108 | +**Response:** |
| 109 | +```json |
| 110 | +{ |
| 111 | + "audit": { |
| 112 | + "structure": ["Missing H1", "Too many H3s"], |
| 113 | + "issues": ["No meta title", "No structured FAQ section"], |
| 114 | + "recommendations": ["Add a meta title using keywords", "Use structured data"] |
| 115 | + }, |
| 116 | + "improvements": { |
| 117 | + "intro": "In this article, we explore how to use large language models for modern SEO...", |
| 118 | + "meta": { |
| 119 | + "title": "Mastering SEO for LLMs in 2025", |
| 120 | + "description": "Learn how to optimize your content for AI-driven search engines using LLM strategies." |
| 121 | + }, |
| 122 | + "faqs": [ |
| 123 | + { |
| 124 | + "question": "What is Generative Engine Optimization (GEO)?", |
| 125 | + "answer": "GEO is the practice of optimizing your content for inclusion in AI-generated answers." |
| 126 | + } |
| 127 | + ] |
| 128 | + } |
| 129 | +} |
| 130 | +``` |
| 131 | + |
| 132 | +--- |
| 133 | + |
| 134 | +## 🤖 How It Works (Agent Pipeline) |
| 135 | + |
| 136 | +- **PocketFlow** orchestrates the agent pipeline: |
| 137 | + 1. **CrawlExtractNode:** Fetches and parses the webpage. |
| 138 | + 2. **AuditContentNode:** Audits content/metadata for SEO/GEO (via LLM). |
| 139 | + 3. **GenerateEnhancementsNode:** Generates improved intro, meta, FAQ (via LLM). |
| 140 | +- All LLM calls are routed through the **AlchemystAI Proxy** for reliability and cost efficiency. |
16 | 141 |
|
17 | | - - Check out the [Agentic Coding Guidance](https://the-pocket.github.io/PocketFlow/guide.html) |
18 | | - |
19 | | - - Check out the [YouTube Tutorial](https://www.youtube.com/@ZacharyLLM?sub_confirmation=1) |
|
0 commit comments