A multi-agent AI system, built with crewAI, that turns a single topic into a polished blog post. Three agents — a researcher, a writer, and an editor — work one after another, each handing its output to the next.
The project started from the standard crewai create crew template and was shaped into a 3-agent pipeline:
config/agents.yaml— defines each agent's role, goal, and backstory (Researcher, Writer, Editor)config/tasks.yaml— defines what each agent has to do and what "done" looks likecrew.py— wires agents to tasks and runs them as aProcess.sequentialcrewmain.py— the entry pointcrewai runcalls, with a hardcodedtopicinput- LLM — Google Gemini, configured entirely through
.env(MODEL=gemini/...+GEMINI_API_KEY), no code changes needed
flowchart LR
U["crewai run"] --> M["main.py: run()"]
M --> C["BlogWritingCrew.crew()"]
subgraph Crew["Sequential Process"]
direction LR
R["Researcher Agent"] -->|research brief| W["Writer Agent"]
W -->|draft post| E["Editor Agent"]
end
C --> R
E --> O["output/blog_post.md"]
sequenceDiagram
participant Main as main.py
participant Crew as BlogWritingCrew
participant LLM as Gemini
Main->>Crew: kickoff(inputs={topic, current_year})
Crew->>LLM: research_task (Researcher)
LLM-->>Crew: research brief
Crew->>LLM: writing_task (Writer)
LLM-->>Crew: draft blog post
Crew->>LLM: editing_task (Editor)
LLM-->>Crew: polished post
Crew-->>Main: output/blog_post.md
flowchart TD
root["blog_writing_crew/"] --> src["src/blog_writing_crew/"]
src --> crewpy["crew.py — agents + tasks + crew definition"]
src --> mainpy["main.py — run / train / replay / test entry points"]
src --> config["config/"]
config --> agentsyaml["agents.yaml"]
config --> tasksyaml["tasks.yaml"]
src --> tools["tools/custom_tool.py — example tool (unused)"]
root --> knowledge["knowledge/user_preference.txt — example knowledge source (unused)"]
root --> output["output/blog_post.md — final result"]
Running crewai run executes the researcher → writer → editor pipeline:
...and writes the final result to output/blog_post.md:
Requires Python >=3.10 <3.14. Dependencies are managed with uv.
pip install uv
crewai installAdd to .env:
MODEL=gemini/gemini-flash-lite-latest
GEMINI_API_KEY=your-key-here
- Edit
src/blog_writing_crew/config/agents.yamlto change agent roles/goals - Edit
src/blog_writing_crew/config/tasks.yamlto change what each task asks for - Edit
src/blog_writing_crew/main.pyto change thetopicinput
crewai runThis runs the researcher → writer → editor pipeline and writes the final post to output/blog_post.md.

