ACAgentic Craft

Intermediate~45 minHazelJS

Observability and Cost

Inspect AgentRuns with getTimeline / Inspector and enforce RunBudget cost ceilings.

Authors
editorial-team
Published
Last reviewed

Operate agents with timelines, OTel peers, and hard budget stops—not dashboard theater.

Learning outcomes

  • Pull timelines via getTimeline / Inspector
  • Set and alert on maxTokens / maxCostUsd

Lessons

  1. 01Inspector Timelines and Traces
    Use runtime.getTimeline, FileTimelineStore, and Inspector endpoints to debug AgentRuns—with code.
  2. 02Cost Budgets and Alerts
    Enforce RunBudget maxTokens/maxCostUsd and assert ceilings in tests—with execute snippets.

Related patterns