Skip to main content
Connic
Back to BlogProduct Spotlight

Agent Observability: Track Costs, Tokens & Runs

Deploying AI agents without visibility is flying blind. Build custom dashboards, track LLM costs per model, and catch failures before users do.

January 23, 2026(last updated: July 5, 2026)8 min readAuthor: Connic Engineering

You deployed your first AI agent. It processed 500 requests yesterday. Great news. Except you don't know how many tokens it consumed, what it cost you, or why 12% of those requests failed silently. Welcome to the observability problem.

Traditional APM tools were built for request-response patterns: latency percentiles, error rates, throughput. AI agents don't fit that mold. They make multiple LLM calls per request, token usage varies wildly based on context, and costs can spike 10x when users send longer inputs. You need observability built specifically for agentic workloads.

What Makes Agent Observability Different

When a user sends a message to your agent, a lot happens behind the scenes. The agent might:

  • 1.Query a retrieval for context (RAG retrieval)
  • 2.Make an initial LLM call to reason about the request
  • 3.Execute 2-3 tool calls (API requests, database queries)
  • 4.Make another LLM call to synthesize results
  • 5.Optionally call another agent for specialized tasks

Each step consumes tokens, and each step can fail. Traditional metrics like "average response time" hide all that. You need granular visibility into each phase.

See what your agents actually do

Per-step traces, token usage, and cost-per-run come built in, so you can debug and price every agent run.

Get started free

The Four Pillars of Agent Observability

Run Tracking
Total runs, success rates, failures. The baseline health metrics for your agent fleet.
Token Usage
Input vs output tokens, cached tokens, reasoning tokens. Understand where context is going.
Cost Attribution
Per-model pricing, volume tiers, input vs output costs. Know exactly where money goes.
Real-time Logs
Live run history, duration, status. Debug issues as they happen, not hours later.

Building Your First Dashboard

Connic creates a default dashboard when you start your first project, but the real value comes from customizing it. Build a dashboard for what your team actually looks at:

Connic project overview dashboard: an agent-runs-over-time area chart beside a live feed of recent runs with durations and token counts
The default project dashboard shows agent runs over 30 days alongside a live feed of recent runs, durations, and token usage.

Step 1: Navigate to Observability

In your project sidebar, click Observability. You'll see the default dashboard with pre-configured widgets for total runs, success rate, token usage, and costs.

Step 2: Enter Edit Mode

Click the Edit button in the top right. Edit mode lets you drag and drop widgets, as well as add, remove, or configure them.

Step 3: Add Widgets

Click Add Widget to choose from three widget types:

Stat Cards

Single metric displays. Choose from: Total Runs, Success Rate, Failed Runs, Tool Calls, Total Tokens, Input/Output Tokens, Token Cost, Input/Output Token Cost, Average Token Cost per Run, Avg Tokens per Run.

Area Charts

Time-series visualizations. Track agent runs (completed vs failed), token usage (input vs output over time), or token cost trends.

Logs Lists

Recent activity feeds. Show agent runs or connector runs with status, duration, and direct links to detailed traces.

Step 4: Filter by Agent

Most widgets support filtering by agent. If you run multiple agents for different purposes, create separate widgets per agent, or compare them side-by-side in the same chart.

Understanding Token Economics

Token usage drives your LLM costs, but not all tokens are equal:

Input tokensWhat you send to the model: system prompt, user message, RAG context
Output tokensWhat the model generates: responses, tool calls, reasoning
Cached tokensInput tokens that hit provider caching, often 10x cheaper
Thinking tokensReasoning tokens from models like o1 or Claude with extended thinking

Output tokens typically cost 3–8x more than input tokens across major providers — for example, review OpenAI's current API pricing for up-to-date ratios across their model tiers. If your costs look high, check output usage first. Long, verbose responses are usually the culprit.

Connic Token Usage page: total monthly spend and tokens, a daily token-cost chart, and a per-agent breakdown across input, output, thinking, and cached tokens.
A month of token spend in Connic: token cost up top, daily token cost stacked by agent in the chart, and a per-agent table splitting spend across input, output, thinking, and cached tokens.

Setting Up Model Pricing

Token counts are useful, but dollar amounts are actionable. To convert tokens to costs, configure pricing for the models your agents use.

Global Defaults

Connic includes global pricing for popular models out of the box. These appear with a "global" badge in your pricing settings, so you don't need to configure anything to track costs for common models like GPT, Claude Sonnet, or Gemini.

Custom Model Pricing

For fine-tuned or self-hosted models, or any price that differs from the defaults, navigate to Settings > Token Pricing and click Add Pricing.

Model Pattern Examples
# Exact model match
openai/gpt-5-mini
anthropic/claude-haiku-4-5
gemini/gemini-2.5-flash

# Regex pattern for model families
openai/gpt-5.*          # Matches all GPT-5 variants
anthropic/claude-.*      # All Claude models
gemini/gemini-.*         # All Gemini models

All pricing is per 1 million tokens. Project-level pricing overrides global defaults, so you can customize costs for specific use cases without affecting other projects.

Volume-Based Pricing Tiers

Some providers use progressive pricing tiers as token volume rises. Configure each threshold so tokens above it use the corresponding rate:

First 200K input tokens$2.50 / 1M
Input tokens above 200K$2.00 / 1M

Multi-Dashboard Workflows

One dashboard rarely fits all needs. Create multiple dashboards for different perspectives:

  • -Executive Overview: High-level cost and success metrics for weekly reviews
  • -Debugging Dashboard: Recent runs, failure rates, and logs for on-call engineers
  • -Cost Optimization: Token breakdowns and cost trends for budget planning
  • -Agent Comparison: Side-by-side metrics for A/B testing different agent configurations

Set a default dashboard that loads on entry, and configure a default time range per dashboard. Your executive overview might default to 30 days while the debugging dashboard shows the last hour.

Real-Time Monitoring

Dashboards auto-refresh every 10 seconds, and a "Last updated" indicator shows how fresh the data is. For incident response, you can watch failures happen live without hitting refresh.

Pro Tip: Environment Isolation
Each environment (development, staging, production) has isolated observability data. Use the environment selector to switch contexts. Production dashboards stay clean even while you're running thousands of test runs in development.

Common Patterns and Anti-Patterns

DO: Track token cost per agent
Different agents have different cost profiles. Your research agent might use GPT-5 while your simple FAQ bot uses Gemini Flash. Track them separately.
DON'T: Ignore success rate drops
A 95% to 85% success rate drop sounds minor, but it's 3x more failures. Set alerting thresholds based on percentages, not raw counts.
DO: Compare input vs output ratios
Healthy agents typically have 2-5x more input than output tokens (context + RAG retrieval). An inverted ratio often indicates runaway generation or inefficient prompts.
DON'T: Rely on averages alone
Average token cost per run hides outliers. One 50K token conversation can skew your daily average. Use time-series charts to spot anomalies.

Getting Started

Observability is available in all Connic projects. To start:

  • 1.Deploy an agent and run a few requests to generate data
  • 2.Navigate to Observability in your project
  • 3.Review the default dashboard, then customize for your needs
  • 4.Configure model pricing in Settings > Token Pricing for accurate cost tracking

Observability tells you what your agents did and what it cost. To measure whether the output met your criteria, pair it with automated agent scoring: an LLM judge grades every run against your own criteria and tracks quality trends over time.

Check out the quickstart guide to deploy your first agent, or explore the agent documentation to learn about advanced configurations.

Frequently Asked Questions

AI agent observability tracks the full internal execution of an agent run, including each LLM call, tool invocation, token count, cost, and failure reason, as a hierarchical trace. Traditional APM treats a request as a single span with latency and status. Agents make multiple LLM calls per request, token costs vary 10x based on input length, and failures often happen silently mid-chain, requiring per-step visibility that general APM tools do not provide.

The four essential metrics are: run tracking (total runs, success rate, failure rate), token usage (input vs output vs cached tokens per run), native-currency token-cost attribution per model, agent, and run, and real-time logs (run duration, status, tool calls). Beyond these basics, per-step traces let you pinpoint exactly where failures and token-cost spikes occur.

Start by checking the input-to-output token ratio. A healthy agent typically uses 2–5x more input than output tokens. An inverted ratio often signals runaway generation or inefficient prompts. Use time-series charts to spot cost spikes because a single long conversation can skew daily averages. Enable prompt caching for system prompts and recurring RAG context, which can cut cached token costs by roughly 10x on providers that support it.

Configure model pricing under Settings > Token Pricing with exact per-million-token rates for each model your agents use. Most providers price output tokens at 3–4x the input token rate. For volume-based pricing tiers, configure threshold breakpoints so cost tracking remains accurate as usage scales. Project-level pricing overrides let you customize rates per use case.

There is no universal threshold — it depends on use case risk and business impact. As a starting point: a drop from 95% to 85% success rate represents 3x more failures in absolute terms. Set alerting thresholds based on percentage points, not raw failure counts, and track the rate over time rather than treating any single number as a pass/fail target.

More from the Blog

Product Spotlight

AI Agent Routing: Trigger Agents and Return Results

AI agent routing moves events into an agent and returns results to the right system through Connic sync routes and asynchronous outbound connectors.

August 24, 20269 min read
Product Spotlight

Staging to Production: How Connic Environments Isolate AI Agents

Connic environments map git branches to isolated deployments, each with its own secrets, connectors, budgets, and run history, so one agent spec ships safely.

August 6, 20268 min read
Product Spotlight

LLM Context Compression for Long-Running AI Agents

Connic compresses older conversation history and oversized tool results, then retries the model call, so long-running agent sessions survive context limits.

July 20, 20268 min read
Product Spotlight

Connic Tests: Catch Agent Regressions Before They Reach Production

A YAML-driven testing framework built for non-deterministic AI agents. Repeated-run pass thresholds, expression-based assertions, custom-code mocking, multimodal fixtures, and a deploy gate that blocks failed checks by default.

May 6, 20268 min read
Product Spotlight

Human-in-the-Loop AI Agents: How Approvals Work in Production

How to pause an AI agent before refunds, deletes, or external calls, route the decision to a human, and resume automatically, with a full audit trail.

April 5, 202610 min read
Product Spotlight

A/B Testing for AI Agents: Ship Better Prompts with Confidence

You changed the prompt and it feels better. Run a controlled experiment to find out whether it is, and let real traffic decide.

March 27, 20269 min read
Product Spotlight

Secure AI Agents: A Production Safety Checklist

Shipping AI agents without a security strategy is a liability. A practical checklist covering prompt injection, PII handling, output validation, and the guardrails you need before go-live.

March 21, 202612 min read
Product Spotlight

Connic Bridge: AI Agents for Private Infrastructure

Connic Bridge creates a secure outbound tunnel so your AI agents can reach private Kafka, databases, and internal services without opening inbound ports.

February 19, 20267 min read
Product Spotlight

Composer SDK: Better Agent Development Tooling

Stop manual uploads and YAML guessing. The Composer SDK adds scaffolding, validation, cloud-backed hot-reload development, and CLI deployments.

December 27, 20255 min read