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: OpenAI Chat Completions, Anthropic Messages, and direct LiteLLM calls on the tested OpenAI route. CLI: Claude Code and Codex. Guard needs a configured policy.
Trace direct completion calls and check supported tool proposals.
@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 says what to check. An enabled policy selects the rule, scopes it to agents, environments, and tools, and sets Audit or Enforce mode. Built-in templates are inactive until you attach them to an enabled policy.
Set up a Guard policyChecks explicit facts such as malformed arguments or a mismatch with the tool schema. Missing or suppressed evidence is skipped.
Reviews the proposed action against a written instruction using available evidence. It can abstain when the evidence is insufficient.
Runs your own condition on the proposed tool call. Execution depends on runner availability and your Python-run allowance.
Start in Audit to review would-block findings while calls remain allowed. Enforce can block matching supported proposals before dispatch. Unavailable checks follow the configured fail-open or fail-closed behavior and are not rule matches.
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.