Agent Governance

Run-Level Tracking vs Request Tracking: A Comparison

Why tracking entire agent runs provides better insights than individual request logging.

A
AgentWall Team
AgentWall Team
Dec 16, 2025 9 min read
Run-Level Tracking vs Request Tracking: A Comparison

Photo by Unsplash

Run-level tracking is AgentWall's secret weapon. While competitors track individual API requests, we track entire agent tasks from start to finish. This fundamental difference enables capabilities impossible with request-only tracking.

Understanding the Difference

Request-Level Tracking

Request tracking logs individual API calls: one prompt in, one response out. Each request is independent. This approach is simple but misses the bigger picture.

Most LLM gateways use request-level tracking. They see trees but miss the forest—individual API calls without understanding the complete task.

Run-Level Tracking

Run tracking follows entire agent tasks. A run might involve dozens of API calls, tool invocations, and decision points. Run tracking connects these operations, showing the complete execution flow.

AgentWall tracks runs from initiation to completion, capturing all operations and their relationships. This holistic view enables insights impossible with request-only data.

Why Run-Level Tracking Matters

Loop Detection

Infinite loops span multiple requests. An agent might call the LLM, get a response, call a tool, call the LLM again, and repeat indefinitely. Request-level tracking sees individual calls—all look normal.

Run-level tracking sees the pattern: the same sequence repeating. This visibility enables automatic loop detection and kill switches.

True Cost Attribution

A single user task might cost $5 across 20 requests. Request tracking shows 20 separate $0.25 charges. Run tracking shows one $5 task—the actual unit of work.

Run-level budgets prevent expensive tasks. Request-level budgets only limit individual calls, missing tasks that are cheap per-request but expensive overall.

Complete Context

Understanding agent behavior requires complete context. Why did the agent call this tool? What was it trying to accomplish? Request tracking can't answer these questions—it lacks context.

Run tracking maintains context across all operations. You see the entire decision tree, not just individual branches.

Capabilities Enabled by Run Tracking

Task-Level Budgets

Set budgets per task, not per request. "This customer support query can cost up to $2" is more meaningful than "each API call can cost up to $0.10."

Task budgets prevent expensive runs while allowing flexibility in how agents accomplish tasks.

Execution Replay

Reproduce agent behavior by replaying entire runs. See exactly what the agent did, in order, with full context. Replay is invaluable for debugging.

Request-level systems can't replay—they don't know which requests belong together or their order.

Step Analysis

Analyze execution patterns: how many steps do tasks typically take? Where do agents get stuck? Which steps are expensive?

Step analysis reveals optimization opportunities and identifies problematic patterns.

Approval Workflows

Implement human-in-the-loop at the run level. Pause expensive or sensitive runs for approval. Resume after human review.

Request-level systems can't implement run-level approvals—they don't understand task boundaries.

Technical Implementation

Run Identification

Every agent task gets a unique run ID. All operations within that task include the run ID. This identifier connects related operations.

AgentWall generates run IDs automatically and propagates them through all systems.

State Management

Run tracking requires maintaining state across requests. AgentWall tracks: run status, accumulated cost, steps taken, tools called, and execution history.

This state enables real-time decisions: should this run continue? Has it exceeded budget? Is it stuck in a loop?

Lifecycle Management

Runs have lifecycles: initiated, running, paused, completed, failed, or killed. Lifecycle management enables control: pause expensive runs, resume after approval, or kill problematic ones.

Comparison: Request vs Run Tracking

Cost Control

Request tracking: Limit individual API calls. Misses expensive multi-request tasks.

Run tracking: Limit entire tasks. Prevents expensive operations regardless of request count.

Loop Detection

Request tracking: Can't detect loops spanning multiple requests.

Run tracking: Detects repetitive patterns across entire runs.

Debugging

Request tracking: See individual API calls without context.

Run tracking: See complete execution flow with full context.

Budgeting

Request tracking: Per-request budgets. Doesn't prevent expensive tasks.

Run tracking: Per-task budgets. Aligns with actual work units.

Observability

Request tracking: Request-level metrics. Limited insight into agent behavior.

Run tracking: Task-level metrics. Complete visibility into agent operations.

Real-World Scenarios

Scenario 1: Infinite Loop

An agent gets stuck calling the same tool repeatedly. Each request looks normal—under budget, reasonable latency. But the task never completes and costs accumulate.

Request tracking: Sees normal requests. No alerts.

Run tracking: Detects repetition. Triggers kill switch. Prevents expensive loop.

Scenario 2: Complex Task

A data analysis task requires 50 LLM calls and 30 tool invocations. Total cost: $8. Per-request cost: $0.10.

Request tracking: Allows all requests (each under budget). Task completes.

Run tracking: Enforces $5 task budget. Stops task at $5. Prevents overspending.

Scenario 3: Debugging

An agent produces incorrect results. You need to understand why.

Request tracking: Shows individual API calls. Difficult to reconstruct agent reasoning.

Run tracking: Shows complete execution flow. Easy to see where agent went wrong.

Migration from Request to Run Tracking

Instrumentation

Add run ID generation at task initiation. Propagate run IDs through all operations. This instrumentation connects related requests.

State Storage

Implement run state storage: Redis, database, or in-memory cache. Store run metadata, accumulated costs, and execution history.

Lifecycle Hooks

Add hooks for run lifecycle events: start, step, pause, resume, complete, fail, kill. These hooks enable control and monitoring.

AgentWall Integration

The easiest approach: route requests through AgentWall. AgentWall handles run tracking automatically. No manual instrumentation required.

Best Practices

Define Task Boundaries

Clearly define what constitutes a task. Is it one user query? An entire conversation? A background job? Consistent task definition enables meaningful tracking.

Set Appropriate Budgets

Run budgets should reflect task complexity. Simple queries might have $0.50 budgets. Complex analysis might allow $10. Base budgets on historical data.

Monitor Run Metrics

Track run-level metrics: average cost per run, typical step count, success rate, and duration. These metrics reveal agent efficiency and reliability.

Implement Kill Switches

Enable automatic termination of problematic runs. Kill switches prevent expensive loops and runaway agents.

The Competitive Advantage

Run-level tracking is AgentWall's moat. Competitors focus on request-level metrics because that's what LLM APIs provide. We go deeper, tracking complete agent tasks.

This difference enables capabilities competitors can't match: true loop detection, task-level budgets, execution replay, and comprehensive observability.

Conclusion

Run-level tracking provides the visibility and control needed for production AI agents. By tracking complete tasks rather than individual requests, you gain insights and capabilities impossible with request-only systems.

AgentWall pioneered run-level tracking for AI agents. Experience the difference today.

Frequently Asked Questions

Yes. AgentWall provides both. Request-level data supports detailed analysis. Run-level data provides task context. Together, they offer complete visibility.

Task boundaries depend on your application. For chatbots, a task might be one user query. For background jobs, a task is the entire job. Choose boundaries that match your operational model.

Minimal. AgentWall adds less than 10ms overhead for run tracking. The benefits far outweigh the small performance cost.

Start with conversation-level tracking—each conversation is a run. Refine boundaries as you understand your agent's patterns better.

A
Written by

AgentWall Team

Security researcher and AI governance expert at AgentWall.

Ready to protect your AI agents?

Start using AgentWall today. No credit card required.

Get Started Free →