Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.xenovia.io/llms.txt

Use this file to discover all available pages before exploring further.

Most teams start in proxy mode because it gives immediate coverage with the smallest code change. Use SDK mode when you also need policy enforcement around actions that happen after the model call.

Choose your integration path

PathBest forFirst change
Proxy modeOpenAI SDK, LangChain, LlamaIndex, Vercel AI SDK, Agents SDK, CrewAI, and most OpenAI-compatible clientsChange base_url to your Xenovia proxy URL
SDK modeTool calls, API requests, writes, file operations, or business actions outside the LLM requestAdd xenovia.execute() or @xenovia.guard()
You can use both together: proxy mode for the model layer, SDK mode for downstream side effects.

Prerequisites

For proxy mode
  • A Xenovia account and workspace with at least one proxy created.
  • Your proxy ID (found under Proxies in the platform).
  • A Xenovia API key (xe_...) scoped to that proxy.
  • An LLM client or framework (OpenAI SDK, LangChain, LlamaIndex, Vercel AI SDK, etc.).
For SDK mode
  • Python ≥ 3.9.
  • A Xenovia API key.
  • Your agent or tool functions that need policy gating.

What to decide before rollout

  • Which workflow should be governed first
  • Which environment to start in dev or staging, not production
  • What should be blocked, redacted, or escalated first
  • Which metadata you want attached to traces: environment, user tier, feature, or workflow ID

Proxy URL format

Every proxy exposes an OpenAI-compatible base URL:
https://runtime.xenovia.io/a/{proxy_id}/openai/v1
Point your client here and pass the xe_... key as the API key. Xenovia resolves the upstream provider credentials server-side.
1

Create one proxy

Give it a clear owner, environment label, and scope so the traces mean something on day one.
2

Route one workflow

Start with a narrow path such as one chat endpoint, one agent runner, or one background job.
3

Verify trace headers

Confirm X-Xenovia-Session-Id and X-Xenovia-Trace-Id show up in responses and traces land in the platform.
4

Attach one simple policy

Begin with a concrete rule such as blocking a destructive tool or redacting email addresses.
5

Expand based on evidence

Use real traces to add stricter rules, intent checks, and downstream SDK guards.

Session tracking

Xenovia resolves a session automatically, but for multi-turn agents you should usually pass an explicit X-Xenovia-Session-Id header so related calls stay grouped in Traces. Continue to Quickstart to run your first proxied call with policy enforcement.