Skip to main content
The SDK is pre-1.0 and its surface is still settling. The snippets below show the shape of the integration; check the SDK release notes for exact signatures before you pin a version.

1. Install

pip install visceral-ai
The distribution is visceral-ai; the import stays visceral.

2. Configure

Visceral reads its credentials from the environment. Your workspace API key comes from the dashboard (or the CLI).
export VISCERAL_API_KEY="vsk_..."
By default the SDK reports to https://api.visceralai.dev.

3. Wrap your client

Wrap the LLM client your agent already uses. Visceral observes the traffic and reports metadata only — it never changes the response your agent receives.
import visceral
from openai import OpenAI

client = visceral.wrap(OpenAI())

# use the client exactly as before
resp = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "hello"}],
)
That’s it — your agent behaves identically, and its LLM traffic now shows up in Visceral. If the backend is unreachable, the wrapped client falls straight through to the underlying provider (fail open).

Next steps

Instrumenting frameworks

LangChain, LangGraph, and other framework integrations.

How it works

What happens to the traffic once Visceral sees it.