Metadata-Version: 2.4
Name: kyvvu-templates
Version: 1.0.0
Summary: Kyvvu behaviour templates: map framework events to governed agent steps
Author-email: "Kyvvu B.V." <info@kyvvu.com>
License-Expression: Apache-2.0
Project-URL: Documentation, https://docs.kyvvu.com/
Project-URL: Changelog, https://docs.kyvvu.com/reference/changelog
Project-URL: Issues, https://github.com/Kyvvu/issues/issues
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: kyvvu-engine<2.0.0,>=1.0.0
Requires-Dist: PyYAML>=6.0
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: types-PyYAML>=6.0; extra == "dev"
Dynamic: license-file

# kyvvu-templates

Kyvvu behaviour templates, Apache-2.0. A template is a YAML file of
first-match-wins rules that turns a framework event into the fields of a
governed agent step: its kind, verb, step name and properties.

## Installation

```bash
pip install kyvvu-templates
```

The `kyvvu` Python client and every Kyvvu integration already depend on it.

## Usage

```python
from kyvvu_templates import BehaviorTemplate

template = BehaviorTemplate.from_path("my.template.yaml")
fields = template.match({"event": "on_tool_start", "name": "search_web"})
```

The public interface is exactly `kyvvu_templates.__all__`: `BehaviorTemplate`,
`load_template`, `deep_merge`, `discover_templates` and `TemplateError`. A
template is checked against the action kinds and verbs of `kyvvu-engine`, which
this package depends on. Each Kyvvu integration ships its own template and
declares it in the `kyvvu.templates` entry-point group.

## Licence

Apache License 2.0. See
`LICENSE`, included in the distribution.
