EchoWrite AI is a sophisticated content repurposing system that transforms any URL (YouTube video or webpage) into multiple content formats using AI agents orchestrated with LangGraph.
Output Formats:
- 📰 Blog Post (800-1200 words)
- 🐦 Twitter Thread (5-8 tweets)
- 💼 LinkedIn Post (150-300 words)
The system uses a multi-agent pipeline with LangGraph:
- Content Extraction Router - Intelligently chooses YouTube or web scraping
- RAG Pipeline - Creates vector embeddings using ChromaDB
- Insights Analyst - Extracts key themes, statistics, and arguments
- Content Generation Suite - Three parallel agents create different formats
pip install -r requirements.txtCreate a .env file in the root directory:
GROQ_API_KEY=your_groq_api_key_here# Development server
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
# Or using Python directly
python -m app.main- API Documentation: http://localhost:8000/docs
- Health Check: http://localhost:8000/health
- Main Endpoint:
POST http://localhost:8000/repurpose
{
"url": "https://www.youtube.com/watch?v=example"
}{
"success": true,
"url": "https://www.youtube.com/watch?v=example",
"extraction_method": "youtube",
"word_count": 1500,
"processing_time": 45.2,
"insights": {
"main_themes": ["AI development", "automation"],
"key_statistics": ["50% increase", "10x faster"],
"main_arguments": ["AI improves productivity"],
"target_audience": "developers",
"content_type": "educational",
"tone": "informative"
},
"content": {
"blog_post": "# How AI is Transforming...",
"twitter_thread": [
"🧵 Thread: AI in development",
"1/ Traditional workflows are evolving..."
],
"linkedin_post": "The future of development is here..."
},
"errors": [],
"current_step": "completed"
}Run the end-to-end test:
python test_system.pyEchoWrite/
├── app/
│ ├── __init__.py
│ ├── main.py # FastAPI application
│ ├── schemas.py # Pydantic models
│ ├── ai_core/
│ │ ├── graph.py # LangGraph workflow
│ │ ├── nodes.py # Pipeline nodes
│ │ └── prompts.py # AI agent prompts
│ └── services/
│ ├── content_extractor.py # Extraction tools
│ └── rag_pipeline.py # ChromaDB integration
├── data/ # ChromaDB storage
├── requirements.txt
├── test_system.py
└── .env # Environment variables
- YouTube:
youtube.com,youtu.be,m.youtube.com - Websites: Any public webpage with readable content
- Blog Post: 800-1200 words
- Twitter Thread: 5-8 tweets (~280 chars each)
- LinkedIn Post: 150-300 words
- Update
ContentStateingraph.py - Add new prompt in
prompts.py - Extend
generate_content_suitenode innodes.py - Update response schemas in
schemas.py
Edit prompts in app/ai_core/prompts.py to change:
- Content tone and style
- Output structure
- Analysis depth
- Import Errors: Install dependencies with
pip install -r requirements.txt - API Key Error: Ensure
GROQ_API_KEYis set in.env - ChromaDB Issues: Check that
data/directory is writable - URL Extraction Fails: Verify URL is publicly accessible
The API returns detailed error information in the errors array:
{
"success": false,
"errors": ["Content extraction failed: Invalid URL"],
"current_step": "extracting_content"
}GROQ_API_KEY=your_production_key
LOG_LEVEL=INFO
CORS_ORIGINS=https://yourdomain.comFROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]- Typical Processing Time: 30-60 seconds
- Memory Usage: ~500MB with ChromaDB
- Concurrent Requests: Limited by Groq API rate limits
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Submit a pull request
This project is available under the MIT License.