August 11, 2026

Stream Agent Execution Logs Token Usage Per Run

Learn how to stream agent execution logs token usage and cost estimates per run from your agent runtime backend. Get live visibility into intermediate outputs

Stream Agent Execution Logs Token Usage Per Run — illustrated guide from Run Agents

Stream Agent Execution Logs Token Usage Per Run

Your agent runtime produces execution data that you must inspect before any action reaches production. Streaming agent execution logs token usage gives you immediate access to those details.

The Agent Command Center pulls logs, token counts, and cost estimates directly from your agent runtime backend. You review this information in one place without switching tools.

Key Takeaways

  • Agent execution logs contain timestamps, intermediate outputs, and model responses.
  • Token usage tracking shows prompt and completion counts per run.
  • Cost estimates appear alongside logs before any external action executes.
  • All settings remain versioned in one config object.
  • Human approval gates sensitive steps through the approvals inbox.

Access Live Visibility for Agent Runs

Open the Agent Command Center dashboard and select an active agent. The interface streams logs as the agent executes tasks on your runtime backend.

You see each step in sequence. Logs include the prompt sent, model response received, and any tool calls attempted.

  • Timestamp of each event
  • Role prompt version applied
  • Tool parameters passed
  • Intermediate output text
  • Final decision before human review
  • Error codes returned by the model
  • Retry attempts logged automatically

Configure the stream to filter by agent ID or schedule window. This keeps focus on the runs that matter most. Teams often discover that unfiltered streams overwhelm the view, so start with priority agents only.

Track Token Usage in Agent Execution Logs

Every run records the exact number of tokens consumed. The system separates prompt tokens from completion tokens.

View these numbers in the execution detail panel. You compare usage across different model parameters stored in the single config object.

  • Prompt tokens: input length plus context
  • Completion tokens: generated response length
  • Total tokens: sum for the full run
  • Model name and version used
  • Autonomy level active during the run
  • Context window utilization percentage

High token counts often signal prompt bloat or overly broad tool descriptions. Adjust the config object and retest. For instance, trimming redundant examples from a role prompt can cut prompt tokens by 30 percent on repeated qualification tasks.

Generate Cost Estimates per Execution

Token counts convert directly into cost estimates using current model pricing. The dashboard displays the projected cost before the run completes.

You set budget thresholds in the config object. Runs that approach the limit pause and route to the approvals inbox.

  • Base model rate per 1,000 tokens
  • Estimated total for the current execution
  • Running monthly total across all agents
  • Alert threshold reached flag
  • Comparison to previous similar runs
  • Projected overage amount if continued

Cost estimates help teams decide which agents to scale and which to refine. When a lead qualification run shows consistent 4,200 total tokens, the estimate becomes predictable enough to forecast monthly spend.

Monitor Intermediate Outputs During Runs

Logs capture every intermediate output the agent produces. You inspect these outputs without waiting for final completion.

This visibility supports debugging role prompts and tool configurations stored in the versioned config object.

  • Partial reasoning steps
  • Tool call arguments before execution
  • Data fetched from external sources
  • Decision branches taken
  • Error messages from failed calls
  • Confidence scores attached to outputs

Review these outputs to confirm the agent follows expected logic on your runtime backend. Intermediate outputs also reveal when an agent begins to drift from its assigned role prompt.

Configure Logging Settings in One Config Object

All logging preferences live inside the single config object. Changes to log level, retention, or token tracking apply across every future run.

Update the object and the runtime pulls the new settings automatically.

  1. Open the agent definition screen.
  2. Select the logging section.
  3. Choose fields to capture.
  4. Set retention period in days.
  5. Enable cost estimate calculation.
  6. Save the versioned object.
  7. Test with a single scheduled execution.

Version history shows who changed what and when. This traceability satisfies audit requirements without separate documentation.

Set Up Runtime Backend Monitoring

Connect the Agent Command Center to your agent runtime backend through the provided endpoint. The connection streams data in real time.

Test the connection with a short scheduled task. Confirm logs appear within seconds.

  • Runtime endpoint URL
  • Authentication token scope
  • Webhook for log delivery
  • Retry policy on network failure
  • Fallback storage location
  • Heartbeat interval in seconds

Monitor connection health from the dashboard status panel. Persistent drops in the stream indicate network or authentication issues that must be resolved before production runs continue.

Compare Visibility Features

Different monitoring approaches offer trade-offs in detail and overhead.

FeatureBasic LogsFull StreamCost Tracking
Intermediate outputsPartialCompleteComplete
Token countsNoYesYes
Cost estimatesNoNoYes
Approvals inbox integrationManualAutomaticAutomatic
Retention controlFixedConfigurableConfigurable

Choose the level that matches your safety requirements and runtime capacity.

For controlled execution of sensitive steps, route agent actions to the approvals inbox. This keeps human oversight on every action that touches the real world.

Audit Execution History for Compliance

Past runs remain queryable through the execution history view. You filter by date, agent, or token threshold to surface runs that require review.

Audit trails support compliance programs that reference established AI governance practices such as the NIST artificial intelligence risk management framework. Each record includes the exact config object version, token totals, and any approvals applied.

  • Export filtered logs as CSV or JSON
  • Reproduce a prior run with identical config
  • Compare token usage trends over 30 days
  • Flag runs that exceeded cost thresholds
  • Attach notes to individual executions
  • Generate summary reports for stakeholders

This process turns raw agent execution logs token usage data into evidence for internal or external reviews.

Example: Lead Qualification Agent

A lead qualification agent configured with the lead qualification guide produces consistent logs. Each run shows token usage for scoring and routing steps.

You review intermediate qualification scores in the stream before the agent updates your CRM. When prompt tokens rise above 3,800 on average, the team revises the role prompt stored in the config object to restore efficiency.

Conclusion

Implement these monitoring steps to maintain control over every agent you run.

  • Review the single config object for current logging settings.
  • Enable token usage streaming on one test agent first.
  • Set cost estimate thresholds that match your budget.
  • Route any action that touches external systems through the approvals inbox.
  • Check the dashboard daily for the first week of production runs.
  • Export audit logs monthly to verify alignment with the White House executive order on trustworthy AI.

Start at Run Agents to connect your runtime backend today.

Frequently Asked Questions

How do I filter agent execution logs token usage by date range?

Use the date picker in the dashboard. It queries the stored logs from your agent runtime backend.

Can cost estimates include multiple models in one run?

Yes. The calculation sums tokens across every model call recorded in the execution.

Where does the single config object store logging preferences?

Preferences reside in the logging section of the versioned object. The runtime reads them at start of each run.

What happens when token usage exceeds the threshold?

The run pauses and appears in the approvals inbox for review before any further execution.

Do logs include intermediate outputs from tool calls?

Yes. Every tool response and partial result streams into the log view for inspection.