⚙️ Events

An Event is the most granular unit of action in your agent’s execution trace. Events represent atomic operations — like LLM calls, API requests, or tool invocations — that occur within a Step.

If a Step is the macro decision (“go to a new site”), then an Event is the micro-action (“run an LLM call to decide the next URL”).


🧬 Event Structure

Each Event includes (based on what you pass in):

  • Description: of the event (e.g., “LLM: What site should I go to next?”)
  • Result: the output of your event (e.g., model output, API response, return value)
  • Cost: how much it cost to run this event (e.g. $0.01)
  • Model name: for LLM events (e.g. gpt-4o)
  • Screenshots: for visual events (e.g. browser screenshots)

The following are generated automatically by us and provided to you on the dashboard:

  • Summary: LLM-generated summary of the event
  • Timestamps: when the event started and ended

🔍 What Counts as an Event?

Events can include:

  • 🤖 LLM call (e.g. reasoning about what action to take)
  • 🌐 API call (e.g. fetching data from a third-party tool)
  • 🛠️ Tool invocation (e.g. web scraping, search)
  • 🧮 Internal computations (e.g. custom heuristics or logic)
  • 💡 Agent “thoughts” captured from internal logs

You determine what gets logged as an Event. The more fine-grained, the better your observability.


🧠 Why Events Matter

Events help you:

  • Debug inside a step
  • Understand why an action was chosen
  • View raw outputs from models or tools
  • Measure cost attribution at the finest level
  • Identify timing bottlenecks
  • Analyze failure causes (e.g. bad model output, timeout, incorrect API usage)

🕵️‍♀️ Debugging Example

Step: Visit Stanford site
├── Event: LLM call → "Which university website should I go to?"
│   └── Result: "Stanford.edu"
├── Event: Visit URL → "https://stanford.edu"
└── Event: DOM scrape → "Extract list of faculty"

Each event gives you a breadcrumb trail of micro-decisions that led to the step’s result.


💸 Cost and Performance

Each Event tracks its cost, duration, and model identity (for LLMs). This lets you:

  • Break down session cost by step or event
  • Track model usage across different sessions
  • Optimize high-cost actions

Note: We recommend logging Events for every tool or model your agent uses to maximize observability.