<!-- SPDX-License-Identifier: Apache-2.0 -->
**Status:** stable · **Owner:** Developer Relations · **License:** Apache-2.0

# `crewai` — KYE adapter for CrewAI

A thin CrewAI `step_callback` / `task_callback` that binds a crew at kickoff and
records each agent task step as a KYE tool-call in the §0.3 evidence chain. Wire
it into your existing `Crew` — the crew is unchanged.

```python
from crewai import Crew
from adapter import KyeCrewAdapter

kye = KyeCrewAdapter()
crew = Crew(agents=[...], tasks=[...], step_callback=kye.on_step)
kye.on_kickoff()          # task-start binding
result = crew.kickoff()
kye.on_complete()         # task-end ledger
```

- `on_kickoff` → `kye.agent.governance.v1` (the §52 task-start binding).
- `on_step` → `kye.evidence.tool_call.v1` per agent step.
- `on_complete` → `kye.agent.completion.v1` (the task-end ledger).

## Non-competition lock (§0 / §0.30 / §32 — permanent)

KYE **governs** the CrewAI crew as a first-class principal; it does **NOT** run,
replace, or vendor CrewAI. `crewai` is a peer dependency, referenced as an
integration point only. The non-competition lock vs CrewAI (and LangChain /
LlamaIndex / Firecrawl / CocoIndex / OpenAI Agents SDK / Claude Agent SDK) is
permanent.

## Reuses the canonical envelope

Same three envelopes as
[`governed-agent`](../../agent-dev-kit-templates/governed-agent/README.md) (§32)
— no new envelope is invented. Reference shapes:
[`public/examples/agent-governance/`](../../../examples/agent-governance/).

## Files

- `src/adapter.py` — the `KyeCrewAdapter`.
