Python SDK for Staso – observe, enforce, evaluate, and debug AI agents in production
Project description
Staso Python SDK
See what your AI agents actually do. Every tool call, LLM interaction, token count, latency, and error -- on your Staso dashboard.
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()
Open your dashboard. Full execution tree -- agents, tools, LLM calls, tokens, timing, errors.
Auto-Instrument LLM Calls
pip install "staso[anthropic]" # or "staso[openai]" or "staso[all]"
st.integrations.patch_anthropic()
# every Anthropic SDK call is now traced automatically -- tokens, model, latency, errors
st.integrations.patch_openai()
# every OpenAI SDK call is now traced automatically
Both sync and async clients. Streaming fully supported.
CLI Agent Integrations
Trace Claude Code and Codex sessions automatically. Run the interactive wizard:
staso setup
Or pass flags directly:
staso setup --target claude-code --api-key ak_... --workspace my-workspace
staso setup --target codex --api-key ak_... --workspace my-workspace
CLI Commands
staso setup # interactive setup wizard
staso setup --target claude-code --api-key ak_... # scripted setup
staso status # show what's configured
staso sync # sync hooks after upgrade
staso update # upgrade package + sync
staso uninstall --target codex # remove hooks, clean up
staso version # show version info
Docs
- Quickstart -- 5 minutes to first trace
- Tracing --
@agent,@tool,@trace,st.span() - Conversations -- group traces by conversation
- Integrations -- Anthropic, OpenAI, Claude Code, Codex
- Configuration -- all options and env vars
- Troubleshooting -- common issues
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.21.tar.gz.
File metadata
- Download URL: staso-0.1.21.tar.gz
- Upload date:
- Size: 137.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94e7686e0dd354f4cd77243c2eefe52e2b2c948b411333eea61dcd8fad659f37
|
|
| MD5 |
bbd09b795ac7d33a092b7ac2dba32a3f
|
|
| BLAKE2b-256 |
c4fd6e838651230e4d778bd326466137d99bb0901fb9927d4239a7dee19b2909
|
Provenance
The following attestation bundles were made for staso-0.1.21.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.21.tar.gz -
Subject digest:
94e7686e0dd354f4cd77243c2eefe52e2b2c948b411333eea61dcd8fad659f37 - Sigstore transparency entry: 1218952867
- Sigstore integration time:
-
Permalink:
stealth-ai-organization/agentic_leash_python_sdk@f6657f021b808773c2fb9f7b8cbba7f45a37ba38 -
Branch / Tag:
refs/tags/v0.1.21 - 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@f6657f021b808773c2fb9f7b8cbba7f45a37ba38 -
Trigger Event:
push
-
Statement type:
File details
Details for the file staso-0.1.21-py3-none-any.whl.
File metadata
- Download URL: staso-0.1.21-py3-none-any.whl
- Upload date:
- Size: 62.6 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 |
03fb7b68a84dafd02658ee5d8f32bdaa7579804d2bbc8d5e01c1a54677ad826a
|
|
| MD5 |
89e95d35adb4786788240d4e3b7d70f8
|
|
| BLAKE2b-256 |
7ab22310abff3decc09502b079ef350d785185a68260915d19b8028a680a53b2
|
Provenance
The following attestation bundles were made for staso-0.1.21-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.21-py3-none-any.whl -
Subject digest:
03fb7b68a84dafd02658ee5d8f32bdaa7579804d2bbc8d5e01c1a54677ad826a - Sigstore transparency entry: 1218952935
- Sigstore integration time:
-
Permalink:
stealth-ai-organization/agentic_leash_python_sdk@f6657f021b808773c2fb9f7b8cbba7f45a37ba38 -
Branch / Tag:
refs/tags/v0.1.21 - 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@f6657f021b808773c2fb9f7b8cbba7f45a37ba38 -
Trigger Event:
push
-
Statement type: