Metadata-Version: 2.4
Name: waken-cohere
Version: 0.1.0
Summary: Cohere Target adapter for Waken — routes waken Events to Cohere's chat API.
Project-URL: Homepage, https://github.com/WakenHQ/waken-cohere
Project-URL: Repository, https://github.com/WakenHQ/waken-cohere
Project-URL: Issues, https://github.com/WakenHQ/waken-cohere/issues
Project-URL: Documentation, https://github.com/WakenHQ/waken-cohere/blob/main/README.md
Author: Waken contributors
License: MIT
License-File: LICENSE
Keywords: agents,ai,cohere,waken
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.12
Requires-Dist: cohere>=5.0.0
Requires-Dist: waken>=0.1.1
Provides-Extra: dev
Requires-Dist: mypy>=1.11; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.3; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# waken-cohere

[![CI](https://github.com/WakenHQ/waken-cohere/actions/workflows/ci.yml/badge.svg)](https://github.com/WakenHQ/waken-cohere/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/license-MIT-lightgrey)](https://github.com/WakenHQ/waken-cohere/blob/main/LICENSE)

A [Cohere](https://cohere.com) `Target` adapter for
[Waken](https://github.com/WakenHQ/waken) — routes waken `Event`s to
Cohere's chat API (`cohere.AsyncClientV2`) and returns a `Response`.

## Install

```bash
pip install waken-cohere
```

`COHERE_API_KEY` (or Cohere's own preferred `CO_API_KEY`) must be set in the
environment — the SDK reads it automatically, no wiring needed.

## Usage

```python
from waken import Runtime
from waken_cohere import CohereAdapter

runtime = Runtime()
runtime.target("cohere", CohereAdapter())
runtime.run()
```

## Sessions

Cohere's chat API is stateless: there's no server-side conversation id to
resume, just a message list you resend in full every turn. This adapter
keeps that list itself, keyed by waken's `session_id`, entirely **in
memory** — it is lost on restart and never shared across processes. Two
`Event`s sharing a `session_id` get a continued conversation; an `Event`
with no `session_id` is a one-off call that leaves no trace.

## Development

```bash
git clone https://github.com/WakenHQ/waken-cohere
cd waken-cohere
pip install -e ".[dev]"
pytest
```

## License

[MIT](https://github.com/WakenHQ/waken-cohere/blob/main/LICENSE)
