home / skills / vadimcomanescu / codex-skills / agents-crewai

This skill helps orchestrate autonomous agent teams with role-based collaboration and memory for complex tasks.

npx playbooks add skill vadimcomanescu/codex-skills --skill agents-crewai

Review the files below or copy the command above to add this skill to your agents.

Files (6)
SKILL.md
1.6 KB
---
name: agents-crewai
description: Multi-agent orchestration framework for autonomous AI collaboration. Use when building teams of specialized agents working together on complex tasks, when you need role-based agent collaboration with memory, or for production workflows requiring sequential/hierarchical execution. Built without LangChain dependencies for lean, fast execution.
---

# CrewAI

Design and run role-based agent teams using CrewAI.

## Quick Start
1) Define agents with clear roles and goals.
2) Define tasks with explicit expected outputs.
3) Choose a process (sequential vs. hierarchical).
4) Run the crew and inspect outputs.

## Minimal Example
```python
from crewai import Agent, Task, Crew, Process

researcher = Agent(role="Researcher", goal="Find 5 key trends")
writer = Agent(role="Writer", goal="Summarize findings")

research = Task(description="Research AI agents", expected_output="5 bullets", agent=researcher)
write = Task(description="Write a summary", expected_output="Short memo", agent=writer, context=[research])

crew = Crew(agents=[researcher, writer], tasks=[research, write], process=Process.sequential)
result = crew.kickoff(inputs={"topic": "AI agents"})
print(result.raw)
```

## Design Guidance
- Keep roles narrow and outputs explicit.
- Use context chaining to pass outputs between tasks.
- Prefer sequential for reliability; hierarchical for delegation-heavy workflows.

## Use Alternatives When
- You need complex graph cycles → consider LangGraph.
- You’re focused on document retrieval → consider LlamaIndex.

## References
- Extended examples: `references/examples.md`

Overview

This skill is a multi-agent orchestration framework for building and running teams of specialized autonomous agents. It enables role-based collaboration with persistent memory and explicit task outputs, designed for lean, dependency-light deployment. Use it to coordinate sequential or hierarchical processes where agents pass context and results between steps.

How this skill works

You define Agent objects with roles and goals, create Task objects with clear expected outputs, and assemble them in a Crew with a chosen Process (sequential or hierarchical). The framework executes tasks according to the process, chains context between dependent tasks, and returns structured raw outputs for inspection. It avoids heavyweight dependencies for faster startup and simpler integration.

When to use it

  • Building teams of specialized agents that must collaborate on a complex objective
  • Implementing role-based workflows with explicit handoffs and memory
  • Running production pipelines that require deterministic sequential execution
  • Delegating subproblems in hierarchical workflows for parallel or supervisory control
  • Prototyping multi-step AI processes without LangChain dependency overhead

Best practices

  • Define narrow, single-responsibility roles to reduce ambiguity and overlap
  • Make expected outputs explicit on each Task to simplify validation
  • Chain context only when necessary to avoid bloating task inputs
  • Prefer sequential processes for reliability; use hierarchical when delegation or reviews are needed
  • Log and inspect raw outputs at each step to aid debugging and auditing

Example use cases

  • Research-to-writing pipeline: researcher agent extracts insights, writer agent composes a memo
  • Product design workflow: analyst outlines features, engineer drafts architecture, reviewer validates
  • Customer support triage: classifier routes tickets, responder drafts replies, auditor checks quality
  • Automated report generation: data gatherer collects metrics, summarizer produces executive highlights
  • Multi-stage content production: topic ideation, outline creation, draft writing, and editorial review

FAQ

How do agents share results between tasks?

Tasks can include context references to prior Task outputs; the Crew passes those outputs forward so downstream agents receive the necessary inputs.

When should I choose hierarchical over sequential process?

Choose hierarchical when tasks need delegation, parallel subtasks, or supervisory review; choose sequential when strict ordered execution and determinism are priorities.