TOOL WIKI · AGENT SDKS

CrewAI

Organizes agents, collaborative crews, and flows for coordinating tasks.

Download example files Code + setup + checks in a ZIP
Jump to a section 10 sections

EXAMPLE USE CASE

Give one support worker an explicit task and tool

A developer needs a small, observable agent or retrieval step before connecting real business services.

Input
An Order reader agent, a lookup task and the order_status tool.
Expected output
Order ID and observed packed status, without an invented date.
  • Success check: The answer uses the fixture result for A104: packed. Ask about A999 to verify the missing-record path.
  • Try a failure: Ask for a nonexistent order and inspect the tool trace rather than only the prose.

Example scope: A single-worker Crew baseline; multi-worker coordination is not implemented here.

Official reference · CrewAI

WHAT IT ISMulti-agent framework
WHERE IT FITSAgent SDKs
SEE HOW THE SYSTEM FITS TOGETHERSELECT A COMPONENT
taskinvokedecisiontool callresultstatemeasureApplicationTask + identityCrewAIMulti-agent frameworkModel providerConfigured API modelTool serviceAuthorization + executionState storageRun and thread progressEvaluationOutcome + evidence
  1. Authenticate the request and define the goal before calling the framework.

  2. Work that has clear roles and artifacts for separate participants. Define an acceptance check for each task and one owner for the final result.

  3. The application supplies provider credentials, model selection, and budgets.

  4. Validate each operation and return authoritative observations.

  5. Choose the checkpoint or session store and its retention policy deliberately.

    Result or stopping point
  6. Check completion, cost, latency, and tool behavior against fixtures.

    Result or stopping point
CrewAI

Work that has clear roles and artifacts for separate participants. Define an acceptance check for each task and one owner for the final result.

Follow the arrows, then select a component to inspect its responsibility. On mobile, downward arrows connect the next step; bent arrows identify branches and return paths. Select a destination to jump to that component.

When to consider it

  • Work that has clear roles and artifacts for separate participants.

A design decision to make

  • Define an acceptance check for each task and one owner for the final result.

Prerequisites and setup

  • Python 3.11+ in an empty directory. A compatible model and provider credentials are required.
  • Running the model-backed example can incur API charges; this website displays it without calling a provider.
Shell
python3 -m venv .venv
source .venv/bin/activate
pip install crewai
export OPENAI_API_KEY="YOUR_API_KEY"
export OPENAI_MODEL="YOUR_ENABLED_MODEL"

Try a small integration

example.py

Python · example.py
import os
from crewai import Agent, Task, Crew, LLM
from crewai.tools import tool

@tool("order_status")
def order_status(order_id: str) -> str:
    """Read the authoritative status for one demo order."""
    return {"A104":"packed"}.get(order_id, "not_found")

worker = Agent(role="Order reader", goal="Report only observed order facts",
    backstory="A scoped support worker", tools=[order_status],
    llm=LLM(model="openai/"+os.environ["OPENAI_MODEL"]), max_iter=4, verbose=True)
task = Task(description="Look up A104 using the tool and report its status.",
    expected_output="Order ID, observed status, no invented delivery date", agent=worker)
print(Crew(agents=[worker], tasks=[task], verbose=True).kickoff())

Run and check the result

Shell
python example.py
  • The answer uses the fixture result for A104: packed. Ask about A999 to verify the missing-record path.
  • Inspect the tool invocation or trace; a correct-looking sentence alone does not prove the tool ran.

Common failures

  • 401 or model-not-found: verify the provider key, project and configured model identifier.
  • A repeated tool call needs a bounded loop and a clear not-found result; do not raise limits blindly.

Production decisions

  • Bind tool execution to the authenticated user and resource permissions. Keep keys in server environment variables.
  • Add deadlines, a turn budget, redacted traces, regression fixtures and explicit handling for refused or incomplete runs.

Keep exploring

Workflow, single agent, or multiple agents?Build an explicit agent loop with LangGraph

Explore the same layer

OpenAI Agents SDKClaude Agent SDKGoogle ADKLangGraph

Compare candidates on your own workload. This entry describes a product’s role; it is not a claim that products in the category are interchangeable.