Python SDK for Staso – observe, enforce, evaluate, and debug AI agents in production
Project description
Staso Python SDK
You're shipping AI agents to production. You need to know what they're actually doing — which tools they called, what the LLM returned, where they failed, and how much it cost. Staso gives you that.
pip install staso
import staso as st
st.init(api_key="ak_...", agent_id="my-agent")
@st.agent(name="support-agent")
def handle_request(message: str) -> str:
context = search_kb(message)
return call_llm(context, message)
@st.tool(name="search_kb")
def search_kb(query: str) -> str:
return db.search(query)
with st.conversation("conversation-123"):
handle_request("How do I reset my password?")
st.shutdown()
That's it. Open your Staso dashboard and you'll see the full execution tree — every agent run, tool call, LLM interaction, token count, latency, and error.
Auto-Instrument LLM Calls
pip install "staso[anthropic]" # or "staso[openai]"
st.integrations.patch_anthropic()
# Every Anthropic API call is now traced automatically.
st.integrations.patch_openai()
# Every OpenAI API call is now traced automatically.
Claude Code Integration
Trace Claude Code CLI sessions — tool calls, LLM token usage, turn timing — automatically.
pip install staso # or: uv pip install staso
staso setup-claude-code \
--api-key ak_... \
--workspace my-workspace \
--environment production \
--agent-id my-agent
Start a Claude Code session and every turn, tool call, and LLM interaction is captured in your Staso dashboard.
Docs
- Quickstart
- Tracing your code
- Conversations
- LLM integrations
- Configuration
- Claude Code
- Troubleshooting
Python 3.11+ · Apache 2.0
Project details
Release history Release notifications | RSS feed
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 staso-0.1.14.tar.gz.
File metadata
- Download URL: staso-0.1.14.tar.gz
- Upload date:
- Size: 114.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c39f0249d0ccefb1c731cdf6b45981875e670021ba468db77d8bcf72f1283750
|
|
| MD5 |
94ae5f73e3cf46b02f1996d33757150c
|
|
| BLAKE2b-256 |
0eade84672cb3e0c9f3fde3391f68c9ced4d086c2c52bbf38d4ed751e0b984e2
|
Provenance
The following attestation bundles were made for staso-0.1.14.tar.gz:
Publisher:
build_deploy_pip_registry.yml on stealth-ai-organization/agentic_leash_python_sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
staso-0.1.14.tar.gz -
Subject digest:
c39f0249d0ccefb1c731cdf6b45981875e670021ba468db77d8bcf72f1283750 - Sigstore transparency entry: 1199879182
- Sigstore integration time:
-
Permalink:
stealth-ai-organization/agentic_leash_python_sdk@9e4a14e395fcb4e42487f7df165e670dcddfc6ea -
Branch / Tag:
refs/tags/v0.1.14 - Owner: https://github.com/stealth-ai-organization
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_deploy_pip_registry.yml@9e4a14e395fcb4e42487f7df165e670dcddfc6ea -
Trigger Event:
push
-
Statement type:
File details
Details for the file staso-0.1.14-py3-none-any.whl.
File metadata
- Download URL: staso-0.1.14-py3-none-any.whl
- Upload date:
- Size: 42.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e004cb7e4a6b70996ee693e26abcc232793d2ac7d0d28f003595901609680641
|
|
| MD5 |
e8833602dae3516b497fe2d9b7a067e2
|
|
| BLAKE2b-256 |
7523db546c4edb55d9e3d403424a9d2869f94f34ca63ed3154b13f71d416c466
|
Provenance
The following attestation bundles were made for staso-0.1.14-py3-none-any.whl:
Publisher:
build_deploy_pip_registry.yml on stealth-ai-organization/agentic_leash_python_sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
staso-0.1.14-py3-none-any.whl -
Subject digest:
e004cb7e4a6b70996ee693e26abcc232793d2ac7d0d28f003595901609680641 - Sigstore transparency entry: 1199879216
- Sigstore integration time:
-
Permalink:
stealth-ai-organization/agentic_leash_python_sdk@9e4a14e395fcb4e42487f7df165e670dcddfc6ea -
Branch / Tag:
refs/tags/v0.1.14 - Owner: https://github.com/stealth-ai-organization
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_deploy_pip_registry.yml@9e4a14e395fcb4e42487f7df165e670dcddfc6ea -
Trigger Event:
push
-
Statement type: