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

A newly deployed AI agent processed 500 requests yesterday. Yet the team does not know how many tokens it consumed, what it cost, or why 12% of those requests failed silently. That is 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. Agentic workloads need purpose-built observability.

What Makes Agent Observability Different

When a user sends a message to an 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. Each phase needs granular visibility.

See what the agents actually do

Per-step traces, token usage, and cost-per-run come built in, so every agent run can be debugged and priced.

Get started free

The Four Pillars of Agent Observability

Run Tracking
Total runs, success rates, failures. The baseline health metrics for an 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 a First Dashboard

Connic creates a default dashboard when a first Project starts, but the real value comes from customizing it. Build a dashboard around the metrics the team actually reviews:

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.
  1. Navigate to Observability

    In the Project sidebar, click Observability. The default dashboard has pre-configured widgets for total runs, success rate, token usage, and costs.

  2. Enter Edit Mode

    Click the Edit button in the top right. Edit mode supports dragging and dropping widgets as well as adding, removing, or configuring them.

  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.

  4. Filter by Agent

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

Understanding Token Economics

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

Input tokensWhat the model receives: 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, OpenAI's current API pricing lists up-to-date ratios across its model tiers. If 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 used by the agents.

Global Defaults

Connic includes global pricing for popular models out of the box. These appear with a "global" badge in the pricing settings, so no configuration is needed 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 can override global defaults with custom 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. Different perspectives benefit from separate dashboards:

  • -An Executive Overview provides high-level cost and success metrics for weekly reviews
  • -A Debugging Dashboard collects recent runs, failure rates, and logs for on-call engineers
  • -A Cost Optimization view combines token breakdowns and cost trends for budget planning
  • -An Agent Comparison shows side-by-side metrics for A/B testing different agent configurations

A default dashboard can load on entry, with a separate default time range for each dashboard. The executive overview might show 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. During incident response, failures can be watched 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 thousands of test runs execute in development.

Common Patterns and Anti-Patterns

DO: Track token cost per agent
Different agents have different cost profiles. A research agent might use GPT-5 while a 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 the 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 the Project

  3. Review the default dashboard, then customize it for the relevant requirements

  4. Configure model pricing in Settings > Token Pricing for accurate cost tracking

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

Check out the quickstart guide to deploy a 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 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 used by the agents. 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 support custom rates per use case.

There is no universal threshold because 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 Browser Automation: How It Works and How to Build It

Learn how AI agent browser automation works, when to use it, and how Connic adds managed browsing, persistent state, tabs, dialogs, and files.

September 21, 20268 min read
Product Spotlight

Give Your AI Agents Hundreds of Tools Without Overloading Their Context

Connic keeps a large tool catalog outside the model context and retrieves schemas on demand, so agents can use more tools without loading them all upfront.

September 14, 20267 min read
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

Human-in-the-Loop AI Agents: Approvals and Secure Input Requests

Connic agents pause for approvals and human input, protect sensitive responses, and resume with the result; tests cover approval, rejection, and timeout.

April 5, 202614 min read
Product Spotlight

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

A changed prompt may feel better. A controlled experiment shows whether it is and lets real traffic decide.

March 27, 20269 min read
Product Spotlight

Agent Guardrails: Real-Time Safety for AI Agents

Connic Guardrails intercept agent inputs and outputs in real time to block prompt injection, redact PII, and enforce topic restrictions.

March 3, 20269 min read
Product Spotlight

Connic Bridge: AI Agents for Private Infrastructure

Connic Bridge creates a secure outbound tunnel so 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