Explicit roots
Group the supported model and tool spans that belong to one run.
Staso gives small AI teams one path from an instrumented agent run to a reviewed Guard decision. Start in audit mode. Turn on enforcement only when the matches reflect your intent.
Python SDK: sync and async, non-streaming OpenAI Chat Completions and Anthropic Messages. CLI: Claude Code and Codex through Staso hooks. Guard needs a configured policy.
@st.agent creates the explicit root for a Python run. Supported provider calls inherit that trace. @st.tool records the duration, status, errors, and enabled fields for the function that actually ran.
Group the supported model and tool spans that belong to one run.
A decorated tool span describes the function that ran. A model proposal alone does not.
Tokens appear when the provider supplies supported usage. Cost appears only for an exact known provider and model price. Missing data stays Unknown or Partial.
Claude Code and Codex sessions connect through local hooks installed by one setup command.
A rule template is inactive until you attach it to an enabled policy. In audit mode, a matching tool proposal records a would-block finding while the current action remains allowed.
Move a policy to enforce when its audit findings match your intent. A configured blocking policy can stop a supported provider proposal before your normal dispatch loop receives it.
Start with one supported path, create a queryable trace, then test one policy in audit mode.