DEV Community

Cover image for Two Lines of Code to Full Observability
Babar Hayat for OpsVeritas

Posted on

Two Lines of Code to Full Observability

Most observability platforms require you to rebuild your infrastructure around them. New logging pipelines. New deployment configs. Dedicated sampling layers. By the time you have "observability," you've also rewritten half your stack.

The AI Agents Control Tower SDK doesn't work that way.

The Two Lines

Python:

from opsveritas import track
result = track(my_agent_function)(input_data)
Enter fullscreen mode Exit fullscreen mode

JavaScript:

import { track } from '@opsveritas/sdk';
const result = await track(myAgentFunction)(inputData);
Enter fullscreen mode Exit fullscreen mode

That's it. Your existing agent call, wrapped. No new infrastructure. No deployment changes. No sidecars, no proxies, no log aggregators.

What Happens From Those Two Lines

From the moment you wrap the call, every execution automatically sends: duration, token usage, USD cost, status (success/failed/empty), output_summary, and timestamp — all flowing into your agents.opsveritas.com dashboard, visible per-execution and per-agent across your entire fleet.

The Custom Webhook Fallback

Already using LangSmith? Running a framework that doesn't wrap cleanly? The platform also accepts raw webhook payloads:

curl -X POST https://agents.opsveritas.com/api/sdk/ingest \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"agent_name":"my-agent","status":"success","duration_ms":1250,"tokens_used":842,"cost_usd":0.0017}'
Enter fullscreen mode Exit fullscreen mode

Same dashboard. Same alerts. Any platform, any language, any orchestration framework.

What You Get Automatically

Once the SDK is connected, the platform detects:

  • silent_failure — output_tokens = 0 on HTTP 200 (ran successfully, produced nothing)
  • token_anomaly — usage 3× above baseline
  • agent_loop — same tool call repeated (runaway retry behavior)
  • budget_exceeded — total spend over configured threshold
  • high_cost_spike — single-run cost anomaly
  • execution_failed — non-200 response from the model
  • no_activity — agent hasn't run in its expected window

All 7 alert types, active automatically. No configuration beyond the API key.

The Monitoring Gap Is a Friction Problem

Teams that skip observability aren't being reckless. They're making a rational trade-off: the perceived effort of setting up monitoring versus the urgency of shipping the next feature.

Two lines and an API key is the whole setup. That's a trade-off worth making on any sprint.


Free to try → agents.opsveritas.com
We also build AI agents and automations end-to-end → opsveritas.com
DM me for a 15-min walkthrough.

Top comments (0)