> ## Documentation Index
> Fetch the complete documentation index at: https://docs.provenlog.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CrewAI

> Audit CrewAI crews, tasks, and tool usage

<Note>
  **Prefer zero setup?** Use `plog run` or `import provenlog.auto` instead. See [Auto-Instrumentation](/integrations/auto-instrumentation).
</Note>

## Setup

```python theme={null}
from provenlog.integrations.crewai import Trail

trail = Trail(agent_id="my-crew")
# Run your crew as normal — events are captured automatically
crew.kickoff()
```

## What gets captured

| Event          | Action Type                 | Details                            |
| -------------- | --------------------------- | ---------------------------------- |
| Tool usage     | `TOOL_CALL` / `TOOL_RESULT` | Tool name, inputs, outputs         |
| LLM calls      | `LLM_CALL` / `LLM_RESPONSE` | Model, prompt, token counts        |
| Task lifecycle | `CUSTOM`                    | Task start, completion, delegation |
| Crew execution | `CUSTOM`                    | Crew start, finish, agent roles    |
| Cache hits     | `CUSTOM`                    | Cached tool results                |

## How it works

The CrewAI Trail auto-registers on CrewAI's global event bus. Once instantiated, it passively observes all crew activity without any additional wiring.

## Configuration

```python theme={null}
# Simple — uses default embedded mode
trail = Trail(agent_id="my-crew")

# With explicit client for custom configuration
from provenlog import ProvenLogClient

client = ProvenLogClient("http://localhost:7600", agent_id="my-agent")
trail = Trail(client=client, agent_id="my-crew")
```
