Soothe SDK
A lightweight, decorator-based SDK for building Soothe plugins and shared contracts (events, wire codec, display/UX helpers, protocols).
Version: 1.0.0 (stable). The WebSocket transport client lives in
soothe-client-python
(soothe_client), not in this package.
Installation
pip install soothe-sdk
Quick Start
from soothe_sdk.plugin import plugin, tool, subagent
@plugin(
name="my-plugin",
version="1.0.0",
description="My awesome plugin",
dependencies=["langchain>=0.1.0"],
)
class MyPlugin:
"""My custom plugin with tools and subagents."""
@tool(name="greet", description="Greet someone by name")
def greet(self, name: str) -> str:
"""Greet a person."""
return f"Hello, {name}!"
@subagent(
name="researcher",
description="Research subagent with web search",
model="openai:gpt-4o-mini",
)
async def create_researcher(self, model, config, context):
"""Create research subagent."""
from langgraph.prebuilt import create_react_agent
tools = [self.greet]
agent = create_react_agent(model, tools)
return {
"name": "researcher",
"description": "Research subagent",
"runnable": agent,
}
Features
- Decorator-based API:
@plugin,@tool,@subagentundersoothe_sdk.plugin - Lightweight: Only requires
pydanticandlangchain-core - Type-safe: Full type hints and Pydantic validation
- No runtime dependency: SDK is separate from Soothe runtime
- Contracts, not transport: Wire codec under
soothe_sdk.wire; paths undersoothe_sdk.paths
Canonical imports (1.0.0+)
Root package exports version metadata only. Import from subpackages:
from soothe_sdk import __version__
from soothe_sdk.plugin import (
plugin,
tool,
subagent,
PluginManifest,
PluginContext,
PluginHealth,
register_event,
emit_progress,
)
from soothe_sdk.core.events import SootheEvent, OutputEvent
from soothe_sdk.core.exceptions import PluginError
from soothe_sdk.core.types import VerbosityLevel
from soothe_sdk.core.verbosity import VerbosityTier, should_show
from soothe_sdk.wire import messages_from_wire_dicts, ProtocolError
from soothe_sdk.paths import SOOTHE_HOME, SOOTHE_DATA_DIR
from soothe_sdk.ux.loop_stream import assistant_output_phase, LOOP_ASSISTANT_OUTPUT_PHASES
from soothe_sdk.tools.metadata import get_tool_meta, get_tool_display_name
from soothe_sdk.utils.formatting import format_cli_error, log_preview
from soothe_sdk.protocols import AsyncPersistStore, PolicyProtocol
Removed in 1.0.0
| Removed | Use instead |
|---|---|
soothe_sdk.client.* |
soothe_sdk.wire / soothe_sdk.paths (transport: soothe_client) |
soothe_sdk.langchain_wire |
soothe_sdk.wire.codec |
Root re-exports (plugin, SOOTHE_HOME, …) |
Subpackage imports above |
Manifest / Context / Health / Depends |
PluginManifest / PluginContext / PluginHealth / library |
API Reference
@plugin
from soothe_sdk.plugin import plugin
@plugin(
name="my-plugin",
version="1.0.0",
description="My plugin",
dependencies=["arxiv>=2.0.0"],
trust_level="standard",
)
class MyPlugin:
pass
@tool / @tool_group / @subagent
from soothe_sdk.plugin import plugin, tool, tool_group, subagent
@plugin(name="research", version="1.0.0", description="Research tools")
class ResearchPlugin:
@tool(name="my-tool", description="What this tool does")
def my_tool(self, arg: str) -> str:
return f"Result: {arg}"
@tool_group(name="search", description="Search tools")
class SearchTools:
@tool(name="arxiv")
def search_arxiv(self, query: str) -> list:
pass
@subagent(name="researcher", description="Research subagent", model="openai:gpt-4o-mini")
async def create_researcher(self, model, config, context):
return {"name": "researcher", "description": "…", "runnable": agent}
PluginContext / PluginHealth
from soothe_sdk.plugin import PluginContext, PluginHealth
class MyPlugin:
async def on_load(self, context: PluginContext):
self.api_key = context.config.get("api_key")
context.logger.info("Plugin loaded")
async def health_check(self) -> PluginHealth:
return PluginHealth(status="healthy")
Publishing Your Plugin
- Create a Python package with your plugin class
- Add the entry point in
pyproject.toml:
[project.entry-points."soothe.plugins"]
my_plugin = "my_package:MyPlugin"
- Publish to PyPI and install with
pip install my-plugin
Architecture
soothe_sdk/
├── __init__.py # __version__ only
├── core/ # Events, exceptions, verbosity
├── plugin/ # Decorators + PluginManifest/Context/Health
├── wire/ # Protocol-1 codec + encode/decode
├── paths.py # SOOTHE_HOME / SOOTHE_DATA_DIR
├── ux/ # Loop stream, classification, subagent progress
├── display/ # Card binder, transcript helpers
├── tools/ # Tool display metadata
├── protocols/ # PersistStore, VectorStore, Policy
└── utils/ # Formatting, logging, parsing, serde
Development
pip install -e ".[dev]"
pytest tests/
ruff check src/soothe_sdk/
ruff format src/soothe_sdk/
License
MIT License — see LICENSE for details.
Links
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file soothe_sdk-1.0.2.tar.gz.
File metadata
- Download URL: soothe_sdk-1.0.2.tar.gz
- Upload date:
- Size: 93.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6f083f146115c4d67317f24b4d0bcc41bfb11ef711cd3454a3aedd9e9146393
|
|
| MD5 |
8bf8fe516bbbae40818a08c3d5dc493c
|
|
| BLAKE2b-256 |
9db0dab2a1869479ed72fa7900a05f164c609f4979994d9aa6689393be2a4261
|
Provenance
The following attestation bundles were made for soothe_sdk-1.0.2.tar.gz:
Publisher:
release.yml on mirasoth/soothe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
soothe_sdk-1.0.2.tar.gz -
Subject digest:
c6f083f146115c4d67317f24b4d0bcc41bfb11ef711cd3454a3aedd9e9146393 - Sigstore transparency entry: 2206252517
- Sigstore integration time:
-
Permalink:
mirasoth/soothe@9a43df367e6eaae5bc126a243d3b4494506abe7f -
Branch / Tag:
refs/tags/soothe-sdk-v1.0.2 - Owner: https://github.com/mirasoth
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9a43df367e6eaae5bc126a243d3b4494506abe7f -
Trigger Event:
release
-
Statement type:
File details
Details for the file soothe_sdk-1.0.2-py3-none-any.whl.
File metadata
- Download URL: soothe_sdk-1.0.2-py3-none-any.whl
- Upload date:
- Size: 126.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a69e37e1795ac28e1d7031c3f6c1892309b60f4e2923afddad43ab3ef5fc52be
|
|
| MD5 |
22506de6bea4e6737ed6a4905b9d8269
|
|
| BLAKE2b-256 |
a9859bda79b96e3f0b43dbd32f5ab5ce535d6d6eb48ed68a76a257263036cad2
|
Provenance
The following attestation bundles were made for soothe_sdk-1.0.2-py3-none-any.whl:
Publisher:
release.yml on mirasoth/soothe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
soothe_sdk-1.0.2-py3-none-any.whl -
Subject digest:
a69e37e1795ac28e1d7031c3f6c1892309b60f4e2923afddad43ab3ef5fc52be - Sigstore transparency entry: 2206252532
- Sigstore integration time:
-
Permalink:
mirasoth/soothe@9a43df367e6eaae5bc126a243d3b4494506abe7f -
Branch / Tag:
refs/tags/soothe-sdk-v1.0.2 - Owner: https://github.com/mirasoth
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9a43df367e6eaae5bc126a243d3b4494506abe7f -
Trigger Event:
release
-
Statement type: