xenovia-sdk) sends an agent’s actions to Xenovia for a decision before they happen: tool calls and tool results, memory writes, context summaries, and — for agents that call their model directly — the model request and reply. Each check runs the guardrails configured on the agent for that stage; model_request, model_response, and tool_call checks also run the agent’s policies.
Use it alongside the agent endpoint: the endpoint governs model traffic, and the SDK governs the steps your code takes around it. Tool, memory, and summary guardrails only run when the SDK sends those stages.
Install:
httpx, which only the model call helpers use. Decisions are sent with the standard library.
How it works
Every SDK call is aPOST /v1/execute to the Xenovia runtime, authenticated with the agent’s xe_ API key. The key identifies the agent, so the request body does not name it.
The runtime reports failures such as a bad request, a rate limit, or an unavailable dependency as HTTP errors, which the SDK raises as
XenoviaExecutionError (see Error handling).
decision["escalated"] is true when a guardrail escalated the step. The step is still allowed, and an escalation is queued for review (see Escalations). A policy escalation, by contrast, denies the step.
Initialise the client
Your first check
tool_call, the agent’s policies. Look up trace_id in Sessions to see which policy or guardrail fired.
What next?
Hooks
Every hook, execute() and @guard().
Reference
Options, sessions, errors and the wire format.
Neon
Write the guardrails your checks run.