Metadata-Version: 2.4
Name: soothe-client-python
Version: 0.9.9
Summary: WebSocket client + appkit for soothe-daemon (Python)
Project-URL: Homepage, https://github.com/mirasoth/soothe-client-python
Project-URL: Documentation, https://soothe.readthedocs.io
Project-URL: Repository, https://github.com/mirasoth/soothe-client-python
License: MIT
License-File: LICENSE
Keywords: agents,ai,client,soothe,websocket
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: <3.15,>=3.11
Requires-Dist: pillow<12.0.0,>=10.0.0
Requires-Dist: pydantic<3.0.0,>=2.0.0
Requires-Dist: soothe-sdk<1.0.0,>=0.8.1
Requires-Dist: websockets>=12.0
Provides-Extra: dev
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=1.3.0; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.12.0; extra == 'dev'
Description-Content-Type: text/markdown

# soothe-client-python

Talk to a running **soothe-daemon** over WebSocket — send prompts, stream agent
turns, run jobs.

```bash
pip install soothe-client-python
```

Requires a local daemon (default `ws://127.0.0.1:8765`).

## Quick start

```python
import asyncio
from soothe_client.appkit import DaemonSession

async def main() -> None:
    session = DaemonSession("ws://127.0.0.1:8765")
    await session.connect()
    await session.send_turn("Summarize this in one sentence: agents need tools.")
    async for _namespace, mode, data in session.iter_turn_chunks():
        if mode == "custom" and isinstance(data, dict):
            text = data.get("content") or data.get("text")
            if text:
                print(text, end="", flush=True)
    print()
    await session.close()

asyncio.run(main())
```

More patterns: [`examples/`](examples/) (hello → streaming → multi-turn → pool → jobs).

## What you get

| Need | Use |
|------|-----|
| One conversation, stream replies | `DaemonSession` |
| Raw WebSocket / custom RPCs | `WebSocketClient` |
| Many users / HTTP backend | `ConnectionPool` + `TurnRunner` |
| Jobs / autopilot / cron | `WsCommandClient` |

## Develop

```bash
make sync-dev
make check                 # lint + unit tests
make test-examples-offline # offline appkit examples
make test-examples         # live 01–06 (needs soothed)
make test-integration      # live integration suite (needs soothed)
```
