Framework guide

Test your CrewAI agent

CrewAI orchestrates multiple agents working as a crew, each with its own role, tasks, and tools. When one agent's output feeds the next, a single bad step can derail the whole crew. Connect yours to ClientCoded and every agent and hand-off gets captured and scored.

1. Install

Add the ClientCoded package to your CrewAI project.

Terminal
$ pip install clientcoded

2. Initialize

Add two lines at the top of your CrewAI app, before your agent runs. Your agent_id and team api_key come from your dashboard.

Python
import clientcoded
clientcoded.init(agent_id="your-agent-id", api_key="your-team-api-key")
# Every CrewAI call is now captured and scored.

3. What gets auto-traced

Once init runs, ClientCoded auto-instruments CrewAI. You do not change your agent code. On every run, these are captured automatically:

  • Each agent's LLM calls
  • Task execution and task outputs
  • Tool calls across the crew
  • Agent-to-agent delegation and hand-offs
  • The full crew kickoff through final result

4. See your results

Each run is scored and sent to your dashboard, with the overall grade, the per-dimension breakdown, and the exact step where your agent went wrong.

Output
✓ Connected. Tracing CrewAI calls.

Run scored: 7.8 / 10
15 steps traced · 2 issues flagged
# View the full breakdown in your dashboard

Open your dashboard to see traced runs, scores, and flagged failures. From there you can run the full adversarial test suite against your CrewAI agent and track quality on every change.

Next steps

See the full integration docs for the production monitoring webhook and the Query API, or start free, your first adversarial test is on us.

Testing another framework? LangChain · AutoGen · LlamaIndex