Skip to main content

Setup

Chains

Use the configured llm in any LangChain chain. Every LLM call in the chain routes through Xenovia individually — each call gets its own trace.

Agents with tools

Tool definitions are passed to the upstream LLM through Xenovia. The request-stage Rego policy evaluates input.tool_names before the call reaches the model — a blocked tool returns 403 before the LLM is called.

RAG pipeline

Both LLM and embedding calls route through Xenovia. Policies and traces apply to the full pipeline, not only the final generation step.

Session tracking

To group all LLM calls in a multi-step chain under one session, pass X-Xenovia-Session-Id as a default header on the client.

Handling policy blocks

LangChain propagates the upstream 403 as an openai.PermissionDeniedError. Catch it in your chain’s error handler.
If your LangChain workflow also uses OpenAIEmbeddings, configure that client with the same Xenovia base_url and the same session header so retrieval and generation traces stay correlated.