Homestead

AGENT · TASK · CREW · PROCESS

Published: 2026.09.12Reading time: about 10 minutesCrewAI / Ollama / WSL

Building a Local Multi-Agent Workflow with CrewAI

Using a Chinese short-article demo—research, writing, and review—to explain how Agent, Task, Crew, and Process.sequential turn a single model call into an observable and verifiable collaboration workflow.

AgentDefines roles and responsibilities
TaskDefines goals and outputs
CrewOrganizes the team and workflow
Process.sequential

Researcher → Writer → Reviewer

Many beginners put research, writing, and quality checks into one long prompt. CrewAI offers a clearer approach: split the goal into roles and tasks, then connect them with an explicit workflow.

This demo runs CrewAI in WSL and uses Ollama’s local model qwen2.5-coder:7b to let three agents collaborate on a Chinese short article.

01 · ResearchSummarize major AI trends for 2026
02 · WritingGenerate a short article from the research
03 · ReviewRewrite the final version and provide feedback
01

CrewAI orchestrates work; it is not the model

CrewAI is a multi-agent orchestration framework, not a language model. Ollama provides the local model service, qwen2.5-coder:7b performs reasoning and generation, and CrewAI manages roles, tasks, ordering, and result handoff.

CrewAI                  Orchestrates roles, tasks, and workflow
Ollama                  Provides the local LLM service
qwen2.5-coder:7b       Generates the actual text
Multiple agents can share one LLM. Their different behaviors come from different role definitions, goals, backgrounds, and task contexts.
02

Workflow in full: from startup to validation

The complete case uses Process.sequential to run the following chain:

Crew startup→Senior researcher
Generates research findings
→Content writer
Generates the Chinese article
→Professional reviewer
Rewrites the final version and gives feedback
→Local post-processor
Checks the final result
CrewAI Ollama demo workflow diagram
Research supports writing, the article supports review, and the final version is passed to a local validator for checks on length, paragraphs, and required content.
03

Agent: defining who does the work

An Agent is a role with a clear responsibility; it is not the model itself. It can be understood as the combination of a model, role definition, goal, background, and execution capabilities.

Senior researcherSummarizes AI trends and supplies information for writing.
Content writerUses the research findings to write the article.
Professional reviewerChecks structure, wording, and factual risk.
Agent(
    role="Senior researcher",
    goal="Produce a careful and clear AI trend summary",
    backstory="You are skilled at organizing research",
    llm=local_llm,
)

role identifies the agent, goal defines the target, and backstory guides its working style.

04

Task: defining what needs to be done

If an Agent is a team member, a Task is the work order assigned to that member. It specifies the objective, input, output format, and acceptance criteria.

research_taskResearch 2026 AI trends and produce three key points.
writing_taskWrite a 180–220 Chinese-character article from the research.
review_taskReview and rewrite the article, then provide review notes.
research_task = Task(
    description="Research the major AI trends in 2026 and list three key points.",
    expected_output="Three clear trend points suitable for the writer.",
    agent=researcher,
)
Agent = who does it  Task = what to do
A precise task makes later validation and error handling much easier.
05

Crew: organizing the team and work orders

A Crew is the container for agents and tasks, and the entry point for executing the workflow. It acts like a lightweight project coordinator.

content_crew = Crew(
    agents=[researcher, writer, reviewer],
    tasks=[research_task, writing_task, review_task],
    process=Process.sequential,
    verbose=True,
)

result = content_crew.kickoff()

This registers the team and tasks, selects the scheduling mode, enables detailed logs, and starts the workflow. Crew connects the components; agents perform the reasoning.

06

Post-processing validation: turning output into an acceptable result

Final Result

Final Optimized Version:
Natural language processing (NLP) and natural language generation (NLG) are expected to continue advancing, especially in understanding and producing human language. The release of pretrained models such as GPT-4 is expected to help AI better understand and respond to different forms of language, including multimodal data. This may support further development of chatbots, virtual assistants, and content-creation tools.

Applications of AI in healthcare are expected to expand, particularly in disease diagnosis, personalized treatment, and drug development. Deep learning and large-scale data analysis may improve disease forecasting and support more tailored treatment plans. AI may also assist doctors with surgical planning and intraoperative navigation.

Intelligent automation and robotics may continue improving efficiency across industries. In manufacturing, AI can help optimize production and reduce human error. In logistics, autonomous navigation and collaborative robots may improve the speed and accuracy of handling and delivery. AI may also support agricultural automation through crop monitoring and precision irrigation.

These trends reflect the expanding use of AI across different fields and its potential to support innovation and efficiency.

Review Notes:
1. Removed overly strong wording such as “deeper technological breakthroughs.”
2. Simplified several sentences for more natural and fluent expression.
3. Replaced “will be able to better understand and respond” with “will help AI better understand and respond” for greater clarity.

During execution, the Crew completes research, writing, and review, then passes the final output to a local post-processor. This step does not call an LLM. It uses deterministic rules to check whether the result satisfies the requirements.

Post-processing validation report:
- [PASS] Final optimized version exists: found.
- [FAIL] Chinese character count 180–220: current count = 389.
- [FAIL] Final version has 3 paragraphs: current count = 4.
- [PASS] Forbidden or overly strong wording check: no issues found.
- [PASS] Review notes exist: found.
- [PASS] Review-note implementation check: all stated changes were applied.

This report shows that the reviewer did rewrite the article and apply its own recommendations, but the final text still failed the length and paragraph constraints. In other words, the content review partially passed, while format acceptance failed.

Why post-processing matters
It converts natural-language requirements into repeatable acceptance rules. A failed check can trigger another rewrite and review cycle, or send the result to a human for confirmation.
07

Summary: from one generation to a workflow

This demo shows the central CrewAI abstraction:

Agent                 Defines role division
Task                  Defines goals and output requirements
Crew                  Organizes agents and tasks
Process.sequential    Passes results in order

CrewAI’s value is not simply making several model calls. It turns an ambiguous generation into a collaboration workflow with roles, tasks, ordering, logs, and validation.