> ## Documentation Index
> Fetch the complete documentation index at: https://flywheel.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Testing and Monitoring Agents

> Test agent runs with sample events and monitor logs, debug data, and run history

## Test mode

Use the **Test** tab in the agent builder to run controlled tests before making an agent live.

### Test flow

1. Select the target user
2. Select a recent event example for the configured trigger event
3. Review or edit the event payload JSON
4. Click **Run test**

<Card title="Agent test flow" icon="flask-conical">
  Test mode runs the agent with your selected payload and writes a test run you can inspect in the builder.
</Card>

## Event payload behavior

When recent events are available for the trigger event, Flywheel preloads a real event example.

When no recent events are available, Flywheel falls back to schema-based payload generation so you can still run tests.

<Note>
  If your trigger event is not configured yet, set it on the **New Event** trigger in Editor first.
</Note>

## Run history and details

Use the **Runs** tab to inspect run behavior:

* **Run History**: list of recent runs for the selected node context
* **Logs**: chronological execution logs
* **Debug**: step timeline and step result data

This is the fastest way to validate prompts, tool selection behavior, and output quality.

## Draft vs published behavior

Agent runs should be validated with your current draft and then published when ready:

* **Publish changes** applies current draft graph/config to the live version
* **Discard changes** restores the last published graph/config
* **Live toggle** controls whether real trigger events execute the agent

## Recommended testing checklist

Before enabling Live:

1. Test with at least one representative user
2. Test with at least one edge-case payload
3. Verify required tools return expected outputs
4. Verify messages/emails match tone and policy
5. Confirm logs and debug timeline have no unexpected failures
