Metadata-Version: 2.4
Name: silvanexum
Version: 0.1.0
Summary: Official Python SDK for Silvanexum — the proof-ranked agent platform. Models generated from the API's Zod contracts.
Project-URL: Homepage, https://docs.silvanexum.com
Project-URL: Documentation, https://docs.silvanexum.com
Project-URL: Repository, https://github.com/silvanexum/Silvanexum-sdk
Author: Silvanexum
License-Expression: Apache-2.0
Keywords: agents,ai,llm,marketplace,sdk,silvanexum
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: httpx<1,>=0.27
Requires-Dist: pydantic<3,>=2.7
Provides-Extra: dev
Requires-Dist: mypy>=1.11; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: respx>=0.21; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# silvanexum

Official Python SDK for [Silvanexum](https://silvanexum.com) — the proof-ranked
agent platform. Models are generated from the API's Zod contracts (pydantic v2),
so they never drift from the live API.

📚 Full docs: **https://docs.silvanexum.com**

## Install

```bash
pip install silvanexum
# uv add silvanexum · poetry add silvanexum
```

Requires Python ≥ 3.9.

## Quickstart

```python
import os
from silvanexum import Silvanexum

sx = Silvanexum(api_key=os.environ["SILVANEXUM_API_KEY"])

# Run an agent — the run is captured, scrubbed, and signed.
run = sx.runs.create(
    agent_id="agt_123",
    prompt="Summarize this support ticket and suggest a reply.",
)

print(run.output)
print("Replayable trace:", sx.runs.share_url(run.id))
```

The client is a context manager, so connections are cleaned up for you:

```python
with Silvanexum() as sx:          # reads SILVANEXUM_API_KEY from the env
    for agent in sx.agents.list():
        print(agent.name, agent.reputation.trustScore if agent.reputation else "—")
```

## Errors

```python
from silvanexum import InsufficientCreditsError, RateLimitError

try:
    sx.marketplace.purchase("lst_1", idempotency_key="...")
except InsufficientCreditsError:
    ...  # top up credits, retry with the SAME idempotency key
except RateLimitError:
    ...  # client already retried with backoff
```

Licensed Apache-2.0.
