Skip to main content

Monitor your AI agents in 3 lines of code — tokens, cost, latency, and silent failures

Project description

opsveritas

Monitor your AI agents in three lines of code. Tracks tokens, cost, latency, model, and silent failures (200 OK with empty output) — and routes alerts to Slack / Email / Teams via OpsVeritas AI Agents Control Tower.

pip install opsveritas

Quick start (3 lines)

import opsveritas

opsveritas.init("<your-ingest-key>")                       # key from Settings → Integrations
client = opsveritas.wrap(openai_client, agent_name="Support Bot")
# use `client` exactly as before — runs appear in your dashboard automatically

Works the same for Anthropic and Gemini clients. Prefer manual control? Use the decorator:

@opsveritas.monitor("Nightly Report")
def run_report():
    ...

What data is sent

By design the SDK sends metadata only, plus a short output snippet — never your prompts/inputs:

Sent Detail
✅ Metadata agent name, status, timestamps, duration, token counts, model, cost, tool-call count
⚠️ Output snippet first 300 chars of the response (output_summary) — powers silent-failure detection
⚠️ Error message the exception text, if a call fails
❌ Prompts / inputs never sent — only token counts

Metadata-only mode (for regulated / client data)

Drop the output snippet and redact error text so no response content ever leaves your environment — token/cost/latency metadata still flows:

opsveritas.init("<your-ingest-key>", metadata_only=True)

Or set the environment variable:

OPSVERITAS_METADATA_ONLY=true

Reliability

Telemetry is non-blocking and fire-and-forget — it never raises into your code and never slows your agent. If the ingest endpoint is briefly unreachable, sends are retried with backoff and buffered in memory (bounded), then flushed on the next event — so a transient outage doesn't lose telemetry.

Configuration

opsveritas.init(
    api_key,
    endpoint="https://agents.opsveritas.com",  # optional
    metadata_only=False,                        # optional; when True, no response content is sent
)

License

MIT

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

opsveritas-0.2.0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

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

opsveritas-0.2.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file opsveritas-0.2.0.tar.gz.

File metadata

  • Download URL: opsveritas-0.2.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for opsveritas-0.2.0.tar.gz
Algorithm Hash digest
SHA256 664716a58ce119291ecbb4825cca352a661f66592c93407923af4d6a4d2d6808
MD5 3ca06cbe940c72495fa2ae11ff128bb9
BLAKE2b-256 95a55fb22da865b31de62b4174079459e581bbd6054a674a635af211bf666efe

See more details on using hashes here.

File details

Details for the file opsveritas-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: opsveritas-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for opsveritas-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 15571bb97d5e9c881484c9fa343945b001c6eabfa6a19e8bd7d72b036685bdb4
MD5 32d941cd28069a34eb3526fa53f2ef32
BLAKE2b-256 cde370688f60186ab82e945e299d897ec3aac6b0392b161ba834b2412b4004a5

See more details on using hashes here.

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