How to Monitor AgentOps with Vigilmon
AgentOps is an observability and monitoring platform specifically designed for LLM agents and multi-agent systems. It records every LLM call, tool invocation, and agent decision with full session replay, cost tracking, error rate dashboards, and latency profiling. AgentOps integrates with CrewAI, AutoGen, LangChain, and custom agent frameworks to give you deep insight into what your agents are actually doing.
But what monitors the monitor? AgentOps itself is a service your agent infrastructure depends on. If the AgentOps session ingestion endpoint goes down, you lose all observability into your agents — silently. And if you're running a self-hosted AgentOps instance or a session-flushing sidecar, those processes need health checks too.
This guide covers how to use Vigilmon to ensure your AgentOps setup stays healthy and your agent observability data keeps flowing.
Why Monitor AgentOps
AgentOps sits in the critical path of agent observability. The failure modes to watch for:
- Session ingestion outages — if AgentOps' API is down, your SDK silently drops session data; you fly blind on agent behavior for the outage window
- Self-hosted instance crashes — teams running AgentOps on their own infrastructure lose the dashboard and all incoming session data when the server goes down
- SDK sidecar failures — some architectures run AgentOps flush processes as sidecars; a crashed sidecar means sessions queue indefinitely or are dropped
- Dashboard unavailability — on-call engineers can't investigate agent incidents if the AgentOps dashboard is unreachable during an outage
- Cost tracking gaps — missed sessions mean your LLM cost accounting has holes; cost spikes go undetected
Vigilmon adds an independent external layer: HTTP availability checks on AgentOps endpoints and heartbeats for any scheduled AgentOps-adjacent jobs.
Key Metrics to Monitor
| Metric | What it indicates | |--------|------------------| | AgentOps API reachability | Session ingestion is accepting data | | Dashboard HTTP availability | On-call engineers can access AgentOps UI | | Self-hosted instance health | Your own AgentOps server is running | | Heartbeat from agent fleet | Agents are successfully completing and flushing | | Session flush latency | Sidecar is not backed up | | Error rate in agent sessions | Upstream agent health (visible via AgentOps dashboard) |
Setup Guide
1. Monitor the AgentOps API Endpoint
AgentOps exposes a REST API that your SDK sends session data to. Set up an HTTP monitor in Vigilmon to confirm it is reachable:
In Vigilmon:
- Monitors → New Monitor
- Type: HTTP
- URL:
https://api.agentops.ai/health(or the AgentOps status endpoint for your plan) - Expected status: 200
- Interval: 5 minutes
- Save
If AgentOps does not expose a public health endpoint at your plan level, monitor the API root:
https://api.agentops.ai/v2/create_events
Even a non-200 response from this endpoint (e.g. a 401 on an unauthenticated probe) is evidence the service is up. Configure the Vigilmon monitor to accept 200 or 401 as "reachable" using the status range option.
2. Monitor a Self-Hosted AgentOps Instance
If you run AgentOps on your own infrastructure, add a direct health monitor:
# Add a /health route to your AgentOps wrapper service
from fastapi import FastAPI
import httpx, time
app = FastAPI()
# Track when the last session was successfully ingested
last_ingest: dict = {"timestamp": None, "session_count": 0}
@app.get("/health/agentops")
async def agentops_health():
ts = last_ingest.get("timestamp")
seconds_since = (time.time() - ts) if ts else None
# Stale if no session ingested in 30 minutes during business hours
ok = ts is not None and (seconds_since is None or seconds_since < 1800)
return {
"ok": ok,
"last_ingest_timestamp": ts,
"seconds_since_last_ingest": seconds_since,
"total_sessions_ingested": last_ingest["session_count"],
}
Point Vigilmon at https://your-agentops-host.com/health/agentops with a keyword check on "ok":true.
3. Add Heartbeats for Agent Fleet Jobs
When your agents run on a schedule (hourly analysis, nightly batch, daily report generation), add a Vigilmon heartbeat that fires after each successful AgentOps-instrumented run:
In Vigilmon:
- Monitors → New Monitor
- Type: Heartbeat
- Name:
Agent Fleet — Nightly Analysis Job - Expected interval: 24 hours
- Grace period: 30 minutes
- Save — copy the ping URL
Then instrument your agent entrypoint:
import agentops
import requests
import os
agentops.init(api_key=os.environ["AGENTOPS_API_KEY"])
VIGILMON_HB = "https://vigilmon.online/ping/abc123"
@agentops.record_function("nightly_analysis")
def run_nightly_analysis():
# ... your agent logic ...
return {"status": "completed", "records_processed": 1234}
if __name__ == "__main__":
session = agentops.start_session(tags=["nightly", "analysis"])
try:
result = run_nightly_analysis()
session.end_session(end_state="Success")
# Only ping after AgentOps session closes successfully
requests.get(VIGILMON_HB, timeout=5)
except Exception as e:
session.end_session(end_state="Fail", end_state_reason=str(e))
raise
This heartbeat pattern catches the most common failure: a job that quietly stops running, with no exception to trigger alerts in AgentOps itself.
4. Validate the AgentOps SDK Integration
For a more thorough end-to-end check, write a canary script that creates a minimal AgentOps session and confirms it was recorded:
import agentops
import requests
import os
import time
AGENTOPS_API_KEY = os.environ["AGENTOPS_API_KEY"]
VIGILMON_HB = os.environ.get("VIGILMON_CANARY_HB_URL")
def run_canary():
agentops.init(api_key=AGENTOPS_API_KEY, tags=["canary", "vigilmon-probe"])
session = agentops.start_session()
# Minimal instrumented call — just validates pipeline end-to-end
@agentops.record_function("canary_check")
def canary_call():
return {"result": "ok", "timestamp": time.time()}
result = canary_call()
session.end_session(end_state="Success")
if VIGILMON_HB:
requests.get(VIGILMON_HB, timeout=5)
return result
if __name__ == "__main__":
run_canary()
Schedule this canary to run every 15 minutes. The Vigilmon heartbeat (15-minute interval, 5-minute grace) catches any gap in AgentOps session ingestion quickly.
5. Monitor the AgentOps Dashboard URL
Your on-call engineers need the AgentOps dashboard to investigate incidents. Monitor its availability independently:
In Vigilmon:
- Monitors → New Monitor
- Type: HTTP
- URL:
https://app.agentops.ai(or your self-hosted dashboard URL) - Expected status: 200
- Interval: 10 minutes
- Save
Alerting
Configure Vigilmon alerts for your AgentOps monitors:
- Open each monitor → Alerts
- Add notification channels:
- Slack:
#ai-opsfor API and dashboard failures - Email: On-call engineer for heartbeat misses
- PagerDuty: Self-hosted instance crashes (directly impacts all agent observability)
- Slack:
Recommended thresholds:
| Monitor | Alert after | Escalate after | |---------|------------|----------------| | AgentOps API endpoint | 2 consecutive failures | 3 consecutive failures | | Self-hosted health | 1 failure | 5-minute sustained failure | | Canary heartbeat (15 min) | 1 missed heartbeat | 2 consecutive misses | | Dashboard availability | 2 consecutive failures | 15-minute sustained failure |
Monitoring the Full Agent Stack
AgentOps is one layer in your agent observability stack. For complete coverage, add monitors for the frameworks AgentOps instruments:
- Monitor CrewAI pipelines — heartbeat per crew
- Monitor AutoGen workflows — execution health endpoints
- Monitor LangGraph agents — graph execution heartbeats
Group all of these in a Vigilmon monitor group named "AI Agent Infrastructure" for a unified status view.
Conclusion
AgentOps gives you deep visibility into your LLM agents — but it needs its own external health check. HTTP monitors on the AgentOps API and dashboard catch ingestion outages and UI unavailability. Heartbeat monitors on your scheduled agent jobs catch the silent failures that AgentOps itself can't report when it's down.
Add a Vigilmon heartbeat to every scheduled AgentOps-instrumented job today. If AgentOps ever goes dark, Vigilmon keeps your on-call team informed.