Metadata-Version: 2.4
Name: kyvvu-crewai
Version: 0.1.0
Summary: Kyvvu listener for CrewAI
Author-email: "Kyvvu B.V." <info@kyvvu.com>
License: Copyright 2026 Kyvvu B.V.
        
        Licensed under the Apache License, Version 2.0 (the "License");
        you may not use this file except in compliance with the License.
        You may obtain a copy of the License at
        
        http://www.apache.org/licenses/LICENSE-2.0
        
        Unless required by applicable law or agreed to in writing, software
        distributed under the License is distributed on an "AS IS" BASIS,
        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        See the License for the specific language governing permissions and
        limitations under the License.
        
        This license applies only to the contents of the kyvvu-sdk/ directory
        of the Kyvvu monorepo. Other directories in this monorepo are governed
        by their own LICENSE files.
Requires-Python: <3.14,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: kyvvu<0.24.0,>=0.23.0
Requires-Dist: crewai<2,>=1.15.21
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: jsonschema<5,>=4.23; extra == "dev"
Requires-Dist: rfc3339-validator>=0.1.4; extra == "dev"
Requires-Dist: PyYAML>=6.0; extra == "dev"
Requires-Dist: packaging>=24.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: ruff>=0.16.9; extra == "dev"
Requires-Dist: types-PyYAML>=6.0; extra == "dev"
Dynamic: license-file

# kyvvu-crewai

CrewAI event listener and policy enforcement for Kyvvu.

Releases use `CREWAI_VERSION` in the repository's `VERSIONS` file and
`crewai-v*` tags. Changes are recorded in [CHANGELOG.md](CHANGELOG.md).

```sh
pip install kyvvu-crewai
```

```python
from kyvvu import Kyvvu
from kyvvu_crewai import KyvvuCrewAIListener

kv = Kyvvu(api_url="https://platform.kyvvu.com", api_key="...", agent_key="crew")
listener = KyvvuCrewAIListener(kv)
result = listener.kickoff(crew)
```

Code CrewAI runs during a kickoff (a task guardrail, a task callback, a tool) can
record a gate in that kickoff's task with `listener.gate()`. A passing gate
after the model call is what clears the bundled baseline's EU AI Act Article 50
warning on the crew's answer:

```python
def disclose(output):
    listener.gate("ai_disclosure", kind="guardrail", decision="pass")
    return True, output

task = Task(description="...", expected_output="...", agent=writer, guardrail=disclose)
```

A `deny` decision is recorded, not enforced: return `(False, "reason")` from the
guardrail as well for CrewAI to retry or stop. See
[the CrewAI guide](https://github.com/Kyvvu/platform/blob/main/docs/integrations/crewai.md#recording-a-gate-from-inside-the-crew).

CrewAI 1.15.21 is the oldest tested release. This package requires Python
3.10 through 3.13, matching CrewAI's supported versions.
