Skip to main content

Visceral Python SDK — runtime optimization layer for AI agents

Project description

Visceral Python SDK

visceral — runtime optimization layer for AI agents. Wrap your LLM client and Visceral observes traffic, finds wasted work, and proves a cheaper call is safe before making it. Fails open: if Visceral is unreachable, your agent runs exactly as before.

Install

pip install "visceral-ai[openai]"   # or [anthropic], [google], [all-providers]

Distribution name is visceral-ai; the import package is visceral. Requires Python 3.10+.

Usage

from openai import OpenAI
from visceral import wrap

client = wrap(OpenAI(), agent_id="my-agent")   # same client back, now instrumented

Authentication

You hold exactly one secret: the workspace API key (vsc_...), from your workspace's Settings page in the dashboard (or from Visceral during onboarding). Set it as VISCERAL_API_KEY, or pass api_key= to wrap(); set VISCERAL_BASE_URL only if self-hosting. The key both authenticates the SDK and selects the workspace your traffic lands in — there is no separate user or org credential. One process serves one workspace: wrap every client in a process with the same key.

Prompt and response text never leaves your process unencrypted: content is stripped or AES-256-GCM-encrypted before export with a per-workspace encryption key the SDK fetches automatically — you never handle it — and spans that cannot be redacted are dropped, never sent.

Develop

pip install -e ".[dev]"
ruff check src/ tests/
pytest

License

Apache-2.0 — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

visceral_ai-0.1.1.tar.gz (37.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

visceral_ai-0.1.1-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file visceral_ai-0.1.1.tar.gz.

File metadata

  • Download URL: visceral_ai-0.1.1.tar.gz
  • Upload date:
  • Size: 37.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for visceral_ai-0.1.1.tar.gz
Algorithm Hash digest
SHA256 abd45beca08d74e294f8a801676364438dfd6c504f3ed17581f44f67e57e2c68
MD5 0d06cdb276d02483f73458790fd0bf09
BLAKE2b-256 fc0c96b28c27e671072d15915861313bf8ed932b7d67cfbcffe058e8c38fd3df

See more details on using hashes here.

Provenance

The following attestation bundles were made for visceral_ai-0.1.1.tar.gz:

Publisher: publish.yml on visceral-ai/visceral-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file visceral_ai-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: visceral_ai-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 25.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for visceral_ai-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e9b7668d9e2c0a3349f8e39530a0d8855b5bee4b1e5b9501afa8e0a33f186ea
MD5 a1032827fad9584c26bafdb60a2ba3be
BLAKE2b-256 06edf21b634eb34eebd462f764f1275988378d301a96e412af431a0c76ba2fd6

See more details on using hashes here.

Provenance

The following attestation bundles were made for visceral_ai-0.1.1-py3-none-any.whl:

Publisher: publish.yml on visceral-ai/visceral-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page