João Moura's Multi-Agent Framework

Table of content
João Moura's Multi-Agent Framework

João Moura is the founder and CEO of CrewAI, the leading open-source framework for multi-agent orchestration. Before CrewAI, he served as Director of AI Engineering at Clearbit (acquired by HubSpot). His engineering career spans nearly 20 years, including roles at Toptal and Packlane, with education at NYU’s Stern School of Business.

Background

GitHub | Twitter | LinkedIn | Blog

The Crew Model

CrewAI treats AI agents as team members with defined roles, goals, and backstories. Instead of single agents handling complex tasks alone, crews of specialized agents collaborate through structured workflows.

from crewai import Agent, Task, Crew

researcher = Agent(
    role="Research Analyst",
    goal="Find accurate information about the topic",
    backstory="You are a skilled researcher with attention to detail"
)

writer = Agent(
    role="Content Writer",
    goal="Create clear, engaging content from research",
    backstory="You are an experienced writer who simplifies complex topics"
)

research_task = Task(
    description="Research the latest developments in {topic}",
    agent=researcher
)

writing_task = Task(
    description="Write a summary based on the research",
    agent=writer
)

crew = Crew(
    agents=[researcher, writer],
    tasks=[research_task, writing_task]
)

result = crew.kickoff(inputs={"topic": "multi-agent systems"})

The key insight: agents work better when they have clear specializations rather than trying to be generalists.

Role-Playing Agents

Each agent in CrewAI has three core attributes:

AttributePurposeExample
RoleJob title that defines expertise“Senior Data Analyst”
GoalWhat the agent is trying to achieve“Provide accurate data insights”
BackstoryContext that shapes behavior“10 years experience in finance”

This role-playing approach creates more consistent outputs than generic prompting. The backstory anchors the agent’s decisions and communication style.

Sequential vs Hierarchical

CrewAI supports two workflow modes:

Sequential Process:

crew = Crew(
    agents=[researcher, writer, editor],
    tasks=[research_task, write_task, edit_task],
    process=Process.sequential  # Tasks run in order
)

Hierarchical Process:

crew = Crew(
    agents=[researcher, writer, editor],
    tasks=[research_task, write_task, edit_task],
    process=Process.hierarchical,  # Manager coordinates
    manager_llm=ChatOpenAI(model="gpt-4")
)

Sequential works for linear workflows. Hierarchical adds a manager agent that delegates and coordinates, useful for complex tasks requiring dynamic routing.

Key Quotes

From his Insight Partners interview:

“I wanted to automate my life away. I don’t want to replicate the same things over and over.”

“The only moat in this AI age is speed.”

“The genie is not getting back in the bottle.”

From Software Engineering Daily:

“The AI, the LLM that you’re powering this is actually controlling the flow of the application, and by that, it has agency.”

DeepLearning.AI Course

Moura partnered with Andrew Ng to create Multi AI Agent Systems with CrewAI, a free course covering:

Production Architecture

For enterprise deployments, CrewAI introduced the Agent Operations Platform (AOP) with:

FeatureDescription
Crew TemplatesPre-built workflows for common use cases
Agent TestingUnit tests for agent behaviors
ObservabilityTracing and debugging for agent decisions
Access ControlsRole-based permissions for agent actions
Flow BuilderVisual workflow designer

The platform processes over 450 million agents monthly across customers including IBM, PwC, NVIDIA, and Capgemini.

Key Takeaways

PrincipleImplementation
Specialize agentsDefine clear roles instead of generalist prompts
Structure collaborationUse sequential or hierarchical processes
Start with templatesUse existing crew patterns before building custom
Test agent behaviorsWrite assertions for expected outputs
Add guardrails earlyHuman approval for sensitive actions

Next: David Shapiro’s ACE Framework

Topics: agents open-source automation ai-coding