Metadata-Version: 2.5
Name: cosens-sdk
Version: 0.9.0
Summary: CoSens Python SDK for cloud and local RSI and reusable Recipes
Project-URL: Homepage, https://cosens.ai/
Project-URL: Documentation, https://cosens.ai/docs/
Project-URL: Repository, https://github.com/PreSeen/CoSens-SDK
Project-URL: Issues, https://github.com/PreSeen/CoSens-SDK/issues
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Keywords: agents,cosens,llm,openai,recipes
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.27
Requires-Dist: langgraph-checkpoint-sqlite<4,>=3
Requires-Dist: langgraph<2,>=1.0
Requires-Dist: pydantic<3,>=2.7
Provides-Extra: local-rsi
Provides-Extra: test
Requires-Dist: build>=1; extra == 'test'
Requires-Dist: hatchling>=1.25; extra == 'test'
Requires-Dist: pytest>=8; extra == 'test'
Description-Content-Type: text/markdown

# CoSens Python RSI SDK

Install with `pip install --upgrade cosens-sdk`.

Cloud mode is the default. Set `COSENS_API_KEY`; CoSens learns with its own models and you need no model of your own.

```python
from cosens.rsi import RSIClient

rsi = RSIClient()  # cloud
run = rsi.execution_create(
    evidence={"context_path": "context.txt", "files": [{"path": "sales.csv", "role": "input"}]},
    idempotency_key="delivery-42",
)
print(rsi.execution_get(run["id"])["status"])
```

Only the files named in `evidence` are uploaded. For local mode, pass a data directory and your own tool-calling model; the key comes from `RSI_MODEL_API_KEY`:

```python
rsi = RSIClient(
    data_dir="./.rsi-python",
    config={"model": "your-model", "base_url": "http://127.0.0.1:8000/v1", "auto_start": True},
)
```

Both modes have the same methods and results. See the [atomic API and Hook lifecycle](docs/local-rsi.md) and the [Python Hook example](examples/05_rsi_sdk_v2.py).
