How-to June 4, 2026 · 4 min read

Instrumenting an Agent with One HTTP Call

No SDK, no library, no agent code changes. Report a run to AgentPulse with a single authenticated request — and keep your instrumentation portable across languages and frameworks.

Most observability tools ask you to install their SDK, initialize it at startup, wrap your calls in their context managers, and pin a version you'll later have to upgrade. That's a lot of coupling for what is, fundamentally, "tell me what happened after each run." AgentPulse takes the opposite stance: instrumentation is one HTTP request, and you already know how to make HTTP requests.

Register the agent, get a secret

In the dashboard, create a product and register an agent under it. You get a Bearer secret scoped to that agent. Store it the way you store any other secret — an environment variable is fine. That secret is the only credential the ingestion endpoint needs.

Report a run

After each agent run completes, send one request to POST /v1/runs with the secret and a small JSON body describing what happened:

curl -X POST https://agentpulse.sentinelflux.in/v1/runs \
  -H "Authorization: Bearer $AGENTPULSE_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "success",
    "duration_ms": 4210,
    "tokens": 18450,
    "cost_usd": 0.072,
    "steps": [
      { "type": "llm",  "name": "plan",      "duration_ms": 1200, "tokens": 5200 },
      { "type": "tool", "name": "search_db", "duration_ms": 2300 },
      { "type": "llm",  "name": "synthesize","duration_ms": 710,  "tokens": 13250 }
    ]
  }'

That's the whole integration. status drives your success and error rates, duration_ms feeds latency, cost_usd rolls up into per-product spend, and steps becomes the execution trace you can open when something looks off. Send the run on failure too — a run that threw is exactly the one you want recorded.

Why a webhook beats an SDK

  • Language-agnostic. Python, Node, Go, a bash script, a no-code workflow — if it can make an HTTP call, it can report runs. No SDK has to exist for your stack.
  • Zero version drift. There's no client library to keep up to date, no breaking SDK upgrade waiting for you next quarter.
  • No coupling to your hot path. Fire the report after the run, or push it onto a queue and send it from a worker. Your agent's latency is never hostage to the observability call.
  • Portable. Because you own the call, your instrumentation isn't locked to one vendor's abstractions.

A note on reliability

Treat the report as fire-and-forget with a short timeout. If you want belt-and-suspenders durability, enqueue the payload and have a worker post it with a couple of retries — but don't block the agent on it. The goal is to observe your agent, never to slow it down.

One endpoint, one secret, one request per run. That's all it takes to go from flying blind to a live dashboard with alerts.