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.13.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.13-py3-none-any.whl (42.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: staso-0.1.13.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.13.tar.gz
Algorithm Hash digest
SHA256 d82783e9b92f05e6edf05a8cf8766afbbcb3be2bb66411494b048b5e03685706
MD5 5c6f28c452aa3968815460c6a4f2e2ce
BLAKE2b-256 5a51b6e1205f0373abc73ab5f20137ef434ee3d2345ab2f75cbd4b0523a32fcf

See more details on using hashes here.

Provenance

The following attestation bundles were made for staso-0.1.13.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.13-py3-none-any.whl.

File metadata

  • Download URL: staso-0.1.13-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.13-py3-none-any.whl
Algorithm Hash digest
SHA256 2d543ee512a9bbb156fd1f0219e13971a4a5a7c5a40777766d6667518a84151d
MD5 d3226a38f9ec0ec7d7a9960f6b8625c2
BLAKE2b-256 a7ecf0ae305ab421d9e27030a69d58ae535f8a6dc300ec8471fad3767143cf4f

See more details on using hashes here.

Provenance

The following attestation bundles were made for staso-0.1.13-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