XunLong is a multimodal content engine powered by large language models and orchestrated via a LangGraph multi-agent setup. By providing simple instructions, the system handles the entire workflow—from scoping requirements to the final export. It produces research reports, narrative fiction, and presentation decks autonomously, requiring minimal oversight.
The system supports external files (PDF, Word, and plain text) as high-priority context. It searches the web to extract and synthesize relevant information into its output. Users can refine results by tweaking the tone or revising specific sections before exporting to Markdown, HTML, PDF, DOCX, or PPTX. For developers, LangFuse integration provides end-to-end observability, and the entire platform is managed through a command-line interface.
.txt, .pdf, or .docx files to provide the model with specific reference material (Note: Image support is not yet available).XunLong is organized into five functional layers:
| Layer | Components | Description |
|---|---|---|
| LLM Service | LLM Manager, Observability | Interfaces with OpenAI, Anthropic, DeepSeek, and others. Monitors performance via LangFuse. |
| Support Services | HTML Converter, Export/Storage Managers | Converts Markdown to HTML; manages PDF, DOCX, and PPTX exports; organizes project files. |
| Core Agent | Search, Report, Fiction, PPT, & Iteration Agents | Specialized agents for web crawling, specific content generation (academic, romance, etc.), and applying revisions. |
| Orchestration | Coordinator | Manages task breakdown and directs the workflow between agents. |
| User Interface | CLI | The primary interface for command-based interaction. |
1. Clone the repository
git clone https://github.com/jaguarliu/xunlong.git
cd XunLong
2. Set up a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
3. Install dependencies
pip install -r requirements.txt
4. Install system packages (Required for PDF export)
brew install pango gdk-pixbuf libffisudo apt-get install libpango-1.0-0 libpangoft2-1.0-0 gdk-pixbuf2.0-05. Install browser for web search
playwright install chromium
6. Configure environment variables Copy the example file and add your API keys:
cp .env.example .env
Inside .env, configure your preferred provider:
# Main LLM Provider (Example: OpenAI)
OPENAI_API_KEY=your_openai_key
OPENAI_BASE_URL=https://api.openai.com/v1
OPENAI_MODEL=gpt-4o
# Search and Observability (Optional)
PERPLEXITY_API_KEY=your_perplexity_key
LANGFUSE_PUBLIC_KEY=your_public_key
LANGFUSE_SECRET_KEY=your_secret_key
LANGFUSE_HOST=https://cloud.langfuse.com
Every generation command supports the --input-file flag. Point it at a .txt, .pdf, or .docx file, and XunLong will summarize the content to use as primary context for the project.
# Generate a report based on a PDF overview
python xunlong.py report "AI Startup Business Plan" --input-file ./docs/overview.pdf
# Write a sci-fi story using world-building notes
python xunlong.py fiction "Interstellar Drifter" --genre scifi --input-file ./docs/notes.txt
Research Reports
python xunlong.py report "2025 AI Industry Trends" --style academic --depth comprehensive --verbose
business (default), academic, technical, consultingoverview (fast), standard, comprehensive (thorough)Fiction
python xunlong.py fiction "Urban Mystery Thriller" --style mystery --chapters 10 --verbose
romance, scifi, fantasy, mystery, urbanPresentation Decks
python xunlong.py ppt "Company Annual Review" --style business --slides 20 --speech-notes "For the all-hands meeting" --verbose
business, creative, minimal, academic--speech-notes to generate a script for each slide.To modify an existing project, use the iterate command with the project_id (found in the storage/ folder).
# Revise a specific chapter
python xunlong.py iterate <project_id> "Add more case studies to chapter two"
# Update a specific slide
python xunlong.py iterate <project_id> "Change the chart on slide 5 to a pie chart"
# Export to PDF
python xunlong.py export <project_id> pdf
# Export to DOCX
python xunlong.py export <project_id> docx
# Export to PPTX (for slide projects)
python xunlong.py export <project_id> pptx
Q: Which LLMs are supported? A: OpenAI, Anthropic, and DeepSeek are natively supported. Since the system uses LangChain, any OpenAI-compatible endpoint should work.
Q: How long does it take to generate a report? A: It depends on the depth. A standard report typically takes 5–10 minutes, while a comprehensive search-heavy report may take up to 20 minutes.
Q: Does it work offline? A: No. The system requires an active internet connection to access LLM APIs and perform web searches.
Q: Can I use the output for commercial purposes? A: The tool itself is under the MIT license. However, you must comply with the terms of service of your chosen LLM provider and verify the accuracy of the generated content.
Q: How can I improve the output quality? A: Use high-tier models like GPT-4o or Claude 3.5 Sonnet. For better data synthesis, add a Perplexity API key to enhance the search capabilities.
Tencent HunyuanVideo-1.5: 8.3B Video Model Runs on 14GB GPUs
HiChunk Review: Smarter Chunking for RAG Pipelines
Open English Dictionary: 25,000+ LLM-Refined Word Entries for Deeper Chinese Understanding
LightlyStudio: Reduce Annotation Costs Through Intelligent Data Curation
Octo: A Zero-Telemetry Coding Assistant with Smart Auto-Repair
CloudRocket VPN Promo Code: 10% Discount + Upgraded 400GB/Month Plan
Coze Studio: Build and Deploy AI Agents with Golang and React
ZeroGraph TS: A 300-Line TypeScript Framework for AI Agent Coding
Firecrawl API: Converting Any Website Into Clean Markdown for LLMs
TensorZero: Optimize LLM Applications with Production Feedback
ConEmu: A Highly Customizable Windows Terminal with Tabs and Split Panes
How to Add Missing Games to Shendeng VPN’s Library