PercivalIntegrations
Custom Integration
How to trace your custom agentic framework with OpenInference + Patronus using OpenAI or Anthropic models.
Instrumenting In‑House Agents with Percival
If you already have an internal agent framework that calls OpenAI or Anthropic models directly, you can attach Percival/Patronus tracing with a few lines of code.
1. OpenAI Instrumentation
2. Anthropic Instrumentation
Tip Both snippets assume that the relevant environment variables (
OPENAI_API_KEY,ANTHROPIC_API_KEY, etc.) are already set.
