Skip to main content

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

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.14.tar.gz (114.3 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.14-py3-none-any.whl (42.5 kB view details)

Uploaded Python 3

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

Hashes for staso-0.1.14.tar.gz
Algorithm Hash digest
SHA256 c39f0249d0ccefb1c731cdf6b45981875e670021ba468db77d8bcf72f1283750
MD5 94ae5f73e3cf46b02f1996d33757150c
BLAKE2b-256 0eade84672cb3e0c9f3fde3391f68c9ced4d086c2c52bbf38d4ed751e0b984e2

See more details on using hashes here.

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

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.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

Hashes for staso-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 e004cb7e4a6b70996ee693e26abcc232793d2ac7d0d28f003595901609680641
MD5 e8833602dae3516b497fe2d9b7a067e2
BLAKE2b-256 7523db546c4edb55d9e3d403424a9d2869f94f34ca63ed3154b13f71d416c466

See more details on using hashes here.

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

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