Skip to main content

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

Python 3.11+ · Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

staso-0.1.20.tar.gz (137.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

staso-0.1.20-py3-none-any.whl (62.7 kB view details)

Uploaded Python 3

File details

Details for the file staso-0.1.20.tar.gz.

File metadata

  • Download URL: staso-0.1.20.tar.gz
  • Upload date:
  • Size: 137.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for staso-0.1.20.tar.gz
Algorithm Hash digest
SHA256 92c002da0e5929e2e72d5186da5d3b72b61b1118b4921a30509c9f5cadb9299d
MD5 76b39b0a62c3fa2d327fdfd53fe0abcd
BLAKE2b-256 80156c1de44d7c2581c17a0839e1723e6b9d0dba86ff051d60fd79a3faaa4ed7

See more details on using hashes here.

Provenance

The following attestation bundles were made for staso-0.1.20.tar.gz:

Publisher: build_deploy_pip_registry.yml on stealth-ai-organization/agentic_leash_python_sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file staso-0.1.20-py3-none-any.whl.

File metadata

  • Download URL: staso-0.1.20-py3-none-any.whl
  • Upload date:
  • Size: 62.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for staso-0.1.20-py3-none-any.whl
Algorithm Hash digest
SHA256 7d23f528b2d9a1cceecfd85dea865a5cb39b1f499f3295b29a9a6e0be421f2c2
MD5 c310dfad6619348eef2c2aad2c6d6dc0
BLAKE2b-256 137811b82016a598d0f91af27bab61814c7bceb946399605703ea1e695c03b33

See more details on using hashes here.

Provenance

The following attestation bundles were made for staso-0.1.20-py3-none-any.whl:

Publisher: build_deploy_pip_registry.yml on stealth-ai-organization/agentic_leash_python_sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page