XunLong Review: AI Content Engine That Writes Reports, Fiction & Decks

10月10日 Published inContent Generation Tools

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.

Key Features

  • Multi-Agent Coordination: LangGraph orchestrates the agents, decomposing complex requests into manageable tasks and running them in parallel to increase efficiency.
  • Three Primary Output Modes: Choose between structured reports, creative fiction, or professional slide decks.
  • Document-Aware Context: Supply .txt, .pdf, or .docx files to provide the model with specific reference material (Note: Image support is not yet available).
  • Autonomous Web Search: The system independently fetches, extracts, and weaves web data into your project.
  • Professional Exporting: Supports standard formats including Markdown, HTML, PDF, DOCX, and PPTX.
  • Iterative Refinement: Edit specific sentences, rewrite entire sections, or overhaul a project. The system maintains state and remembers previous context.
  • Style Presets: Apply specific writing or presentation styles, such as business, academic, creative, or minimal.
  • Full Observability: Integrated LangFuse support allows you to monitor the reasoning and execution at every stage.

System Architecture

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.

Installation

Prerequisites

  • Python 3.10 or newer
  • An API key from OpenAI, Anthropic, or DeepSeek
  • (Optional) A Perplexity API key for enhanced search results

Installation Steps

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)

  • macOS: brew install pango gdk-pixbuf libffi
  • Ubuntu/Debian: sudo apt-get install libpango-1.0-0 libpangoft2-1.0-0 gdk-pixbuf2.0-0

5. 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

How to Use XunLong

Using Documents as Context

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

Basic Generation Commands

Research Reports

python xunlong.py report "2025 AI Industry Trends" --style academic --depth comprehensive --verbose
  • Styles: business (default), academic, technical, consulting
  • Depth: overview (fast), standard, comprehensive (thorough)

Fiction

python xunlong.py fiction "Urban Mystery Thriller" --style mystery --chapters 10 --verbose
  • Styles: romance, scifi, fantasy, mystery, urban

Presentation Decks

python xunlong.py ppt "Company Annual Review" --style business --slides 20 --speech-notes "For the all-hands meeting" --verbose
  • Styles: business, creative, minimal, academic
  • Note: Use --speech-notes to generate a script for each slide.

Iteration and Refinement

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"

Exporting Results

# 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

FAQ

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.