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.16.tar.gz (123.1 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.16-py3-none-any.whl (53.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: staso-0.1.16.tar.gz
  • Upload date:
  • Size: 123.1 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.16.tar.gz
Algorithm Hash digest
SHA256 ef8a95acd61bad90b50f5045c920e382a329e505de2b27ece4f5d0ea1a49003b
MD5 dc80528c6deec6502fd1ea00158f32b2
BLAKE2b-256 bba0d6a6894c985cdf6a242078442a5d32c0f453c5e918e0975756bb7d7f3f6e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: staso-0.1.16-py3-none-any.whl
  • Upload date:
  • Size: 53.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.16-py3-none-any.whl
Algorithm Hash digest
SHA256 872bb2545de1fb408b974faf5365f26c0ed938b6db62a4763dac7aff66b25ff4
MD5 6ba6cd93fe96d253b3e755a861e14d90
BLAKE2b-256 0fbb455ccc7e3f7dc9d003fa554147d5d862a2d51754d22dcaedd2b303a97091

See more details on using hashes here.

Provenance

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