Skip to content

aasimmalikin/LLMQuill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸͺΆ LLMQuill

An AI-powered multi-agent content pipeline that autonomously writes and reviews educational content β€” section by section, with full consistency tracking.

Python CrewAI LLM Architecture


🧠 What is LLMQuill?

LLMQuill is a multi-agent LLM pipeline built on CrewAI that generates high-quality, structured educational content using a write β†’ review agentic flow.

Two specialized AI agents collaborate on every section:

Agent Role Responsibility
✍️ Content Writer Educational Content Writer Drafts 500–800 word Markdown sections with examples, structure, and summaries
πŸ” Content Reviewer Content Reviewer & Editor Polishes drafts for grammar, clarity, accuracy, and cross-section consistency

Each section is aware of previously written content, ensuring the final output reads as a cohesive, well-structured guide.


πŸ”„ Agent Flow

Input: section_title + section_description
              β”‚
              β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚   write_section_task  β”‚  ←  Content Writer Agent
   β”‚   (500–800 words,     β”‚
   β”‚    Markdown format)   β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              β”‚  draft_content
              β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚  review_section_task  β”‚  ←  Content Reviewer Agent
   β”‚  (polish, fix, refine)β”‚
   β”‚  context: write_task  β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              β”‚
              β–Ό
       βœ… Final Polished Section
            (saved to output/)

πŸ€– Agents

✍️ Content Writer

role: Educational Content Writer
goal: >
  Create engaging, informative content that thoroughly explains
  the assigned topic and provides valuable insights to the reader
llm: openai/gpt-4o-mini

Specializes in breaking down complex concepts into accessible language. Each section includes:

  • Brief topic introduction
  • Key concepts with examples
  • Practical applications or exercises
  • Summary of key points

πŸ” Content Reviewer

role: Educational Content Reviewer and Editor
goal: >
  Ensure content is accurate, comprehensive, well-structured,
  and maintains consistency with previously written sections
llm: openai/gpt-4o-mini

Acts as a meticulous editor ensuring:

  • Grammar and spelling corrections
  • Improved clarity and readability
  • Factual accuracy and completeness
  • Consistency with prior sections
  • Better structure and flow

πŸš€ Getting Started

Prerequisites

  • Python >=3.13
  • uv for dependency management

1. Clone the Repository

git clone https://github.com/your-username/LLMQuill.git
cd LLMQuill

2. Install uv (if not already installed)

pip install uv

3. Install Dependencies

crewai install

Or directly with uv:

uv sync

4. Configure Environment Variables

Create a .env file in the root directory:

OPENAI_API_KEY=your_openai_api_key_here
MODEL=gpt-4o-mini

⚠️ Never commit your .env file. It is already listed in .gitignore.

5. Run the Flow

crewai run

The output will be saved to output/post.md.


πŸ“ Project Structure

LLMQuill/
β”œβ”€β”€ src/
β”‚   └── creator_flow/
β”‚       β”œβ”€β”€ config/
β”‚       β”‚   β”œβ”€β”€ agents.yaml        # Agent roles, goals & LLM config
β”‚       β”‚   └── tasks.yaml         # Task definitions & context wiring
β”‚       β”œβ”€β”€ crew.py                # Crew assembly logic
β”‚       └── main.py                # Entry points (kickoff, plot, etc.)
β”œβ”€β”€ output/                        # Generated content saved here
β”œβ”€β”€ .env                           # API keys (never commit)
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .python-version                # Python 3.13
β”œβ”€β”€ pyproject.toml                 # Project metadata & dependencies
β”œβ”€β”€ uv.lock                        # Locked dependency versions
└── AGENTS.md                      # CrewAI reference for AI coding assistants

πŸ› οΈ Available Commands

Command Description
crewai run Run the full content generation flow
crewai flow kickoff Alternative flow execution
crewai flow plot Visualize the agent flow as an HTML diagram
crewai test Run crew tests (default: 2 iterations)
crewai train -n 5 Train the crew over N iterations
crewai replay -t <id> Replay from a specific task
crewai reset-memories -a Reset all agent memories

βš™οΈ Configuration

Customizing Agents

Edit src/creator_flow/config/agents.yaml to change agent roles, goals, backstories, or switch LLM models.

Customizing Tasks

Edit src/creator_flow/config/tasks.yaml to change task descriptions, expected outputs, or context dependencies.

Switching LLM Models

Update the llm field in agents.yaml:

content_writer:
  llm: openai/gpt-4o        # Upgrade to GPT-4o
  # llm: anthropic/claude-3-5-sonnet  # Or use Claude

πŸ“¦ Dependencies

requires-python = ">=3.13"
dependencies = [
    "crewai[tools]==1.14.3"
]

🏷️ Topics

llm ai-agents multi-agent crewai content-generation gpt-4o-mini educational-content agentic-ai openai automation python


🀝 Support & Resources



Built with ❀️ using CrewAI and OpenAI's GPT-4o-mini.

About

πŸͺΆ Autonomous content generation with a Writer + Reviewer agent flow, powered by CrewAI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages