DS DevShelfHub Projects · AI tools
Tutorials / AI Agents / Real-World Examples
Build with CrewAI Advanced · 18 min read Page 15 of 29

CrewAI Examples: Five Reference Crews for Production Use Cases

By DevShelfHub

Five complete crews you can fork: research assistant, content factory, code reviewer, sales SDR, support triage.

Series progress15 / 29
CrewAI real world examples tutorial — CrewAI Examples: Five Reference Crews for Production Use Cases

Five Crews You Can Fork Today

Each example is a complete, minimal blueprint — agents, tasks, and the wiring. Adapt them to your domain.

1. Research Assistant

Drop in a topic, get a sourced research brief.

research_assistant.py

PYTHON
from crewai import Agent, Task, Crew, Process
from crewai_tools import SerperDevTool, ScrapeWebsiteTool

search, scrape = SerperDevTool(), ScrapeWebsiteTool()

researcher = Agent(
    role="Senior Research Analyst",
    goal="Find 5 credible sources on {topic} from the past year",
    backstory="You triple-check sources and never cite wikis.",
    tools=[search, scrape], max_iter=8,
)

writer = Agent(
    role="Briefing Writer",
    goal="Turn sources into a 1-page executive brief",
    backstory="You write tight, sourced prose for execs.",
    max_iter=5,
)

t1 = Task(description="Research {topic}", expected_output="5 sources with key claims",  agent=researcher)
t2 = Task(description="Write 1-page brief", expected_output="Markdown brief",            agent=writer, context=[t1])

crew = Crew(agents=[researcher, writer], tasks=[t1, t2], process=Process.sequential)
print(crew.kickoff(inputs={"topic": "AI agent observability"}))

2. Content Factory

Topic → outline → draft → SEO-optimized post.

content_factory.py

PYTHON
outliner = Agent(role="Content Strategist", goal="Outline a 1000-word post on {topic}", backstory="...")
writer   = Agent(role="Long-form Writer",    goal="Draft the post from the outline",      backstory="...")
seo      = Agent(role="SEO Editor",          goal="Optimize headings and meta description",backstory="...")

t1 = Task(description="Outline the post on {topic}",     expected_output="H2/H3 outline",       agent=outliner)
t2 = Task(description="Write the full post",             expected_output="1000-word markdown",  agent=writer, context=[t1])
t3 = Task(description="Optimize for SEO",                expected_output="Final post + meta",   agent=seo,    context=[t2])

crew = Crew(agents=[outliner, writer, seo], tasks=[t1, t2, t3], process=Process.sequential)

3. Code Reviewer Bot

Diff in, structured review out.

code_reviewer.py

PYTHON
reader   = Agent(role="Diff Summarizer",   goal="Summarize what {diff} changes in 5 bullets", backstory="...")
security = Agent(role="Security Reviewer", goal="Flag injection, auth, secret-leak risks",     backstory="...")
style    = Agent(role="Style Reviewer",    goal="Flag PEP8, naming, dead-code issues",         backstory="...")
poster   = Agent(role="Review Composer",   goal="Combine into a single PR comment",            backstory="...")

t1 = Task(description="Summarize diff",     expected_output="5 bullets",   agent=reader)
t2 = Task(description="Security review",    expected_output="Issues list", agent=security, context=[t1], async_execution=True)
t3 = Task(description="Style review",       expected_output="Issues list", agent=style,    context=[t1], async_execution=True)
t4 = Task(description="Compose PR comment", expected_output="Markdown",    agent=poster,   context=[t1, t2, t3])

crew = Crew(agents=[reader, security, style, poster], tasks=[t1, t2, t3, t4], process=Process.sequential)

4. Sales SDR Crew

Lead profile in → personalized outreach + follow-ups out.

sales_sdr.py

PYTHON
profiler = Agent(role="Account Researcher", goal="Build a 1-paragraph profile of {company}", backstory="...", tools=[search])
copywriter = Agent(role="B2B Copywriter",    goal="Draft 3 personalized cold emails",          backstory="...")
seq_planner = Agent(role="Sequence Planner", goal="Schedule 5-touch outreach sequence",        backstory="...")

t1 = Task(description="Profile {company}",         expected_output="Company profile + ICP fit", agent=profiler)
t2 = Task(description="Draft 3 personalized emails", expected_output="3 emails with subjects",  agent=copywriter, context=[t1])
t3 = Task(description="Plan a 5-touch sequence",     expected_output="Day-by-day schedule",      agent=seq_planner, context=[t1, t2])

crew = Crew(agents=[profiler, copywriter, seq_planner], tasks=[t1, t2, t3], process=Process.sequential)

5. Support Triage Crew

Incoming ticket → classified, answered, or escalated.

support_triage.py

PYTHON
classifier = Agent(role="Ticket Classifier", goal="Tag {ticket} as bug | how-to | billing | other", backstory="...", llm=cheap_llm)
kb_search  = Agent(role="KB Search Agent",   goal="Find the top 3 KB articles for the ticket",         backstory="...", tools=[kb_tool])
drafter    = Agent(role="Support Drafter",   goal="Compose a friendly answer citing KB",               backstory="...")
escalator  = Agent(role="Escalation Lead",   goal="Decide if a human is needed",                       backstory="...", llm=smart_llm)

t1 = Task(description="Classify the ticket",                expected_output="One label",       agent=classifier)
t2 = Task(description="Search KB for relevant articles",    expected_output="3 article titles",agent=kb_search,  context=[t1])
t3 = Task(description="Draft a customer reply",             expected_output="Plain-text email",agent=drafter,    context=[t1, t2])
t4 = Task(description="Decide escalate / send",             expected_output="ESCALATE or SEND",agent=escalator,  context=[t1, t2, t3])

crew = Crew(agents=[classifier, kb_search, drafter, escalator], tasks=[t1, t2, t3, t4], process=Process.sequential)

You're Ready

You now have the full picture: concepts, building blocks, coordination patterns, production wiring, and concrete blueprints. The fastest path forward: take whichever example above is closest to your problem, fork it, and replace one task at a time with your real domain.

Next steps: Wire it behind FastAPI (Page 12), add Langfuse tracing (Page 13), set up an eval harness (Page 14), and ship.

Notes

Fork, then delete what you do not own

Reference crews include opinionated prompts and tools. Strip unused paths to reduce attack surface and surprise tool calls in production.

Token budgets dominate feasibility

Examples assume modest context sizes. Measure real documents and emails before promising SLAs; retrieval and summarization steps may become mandatory.

Outbound sales and support flows touch regulated data

Add retention policies, consent checks, and CRM field minimization before enabling automation for customer records.

Reuse patterns, not proprietary content

If an example ingests third-party text, confirm licensing and robots terms before pointing it at live crawlers.

CrewAI examples FAQ

What crews are covered in the real-world examples lesson?

The lesson walks through representative patterns such as research assistants, content pipelines, code reviewers, outbound SDR workflows, and support triage crews.

Can I reuse these CrewAI examples in production?

Use them as architectural templates: replace tools, tighten policies, add guardrails, and connect your own data sources before shipping to users.

Which example is best for B2B sales teams?

The SDR-style pattern shows prospect research plus outreach drafting, but you must add compliance review and CRM-specific integrations for real pipelines.

Which example helps customer support?

The support triage pattern combines classification, knowledge retrieval, and suggested replies—pair it with human review until accuracy is proven.

Where should I read after these examples?

Move to Flows, observability, and production tutorials if you are hardening for deployment, or open the cookbook for more composite patterns.

See also: DevShelfHub's CrewAI tool review for a product-level comparison, pricing notes, and links back into this tutorial series.

Quick jump: API Reference