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

# Monitoring

> Set rules on an agent that tell your team, in Slack, Microsoft Teams, or email, when a task ends in a status you care about, an evaluation score drifts, or failures pile up.

Monitoring is where you decide which moments in an agent's work your team needs to hear about, and where that news should arrive. Each rule pairs a condition to watch with a place to send it, and sends either the moment it happens or as a scheduled report.

<Frame caption="Agent <span>→</span> Configuration <span>→</span> Monitoring">
  <img src="https://mintcdn.com/beamai/mzjYglzHZw7mcBH3/02-building-agents/agent-configuration/monitoring/monitoring-rules-list.png?fit=max&auto=format&n=mzjYglzHZw7mcBH3&q=85&s=e405b7fd3987caa8c0baefb599c08f98" alt="The Monitoring tab of an agent, with the Smart monitor band at the top and rules grouped under Real-time and Scheduled" width="1880" height="1097" data-path="02-building-agents/agent-configuration/monitoring/monitoring-rules-list.png" />
</Frame>

<Info>
  Only owners and admins can open the **Monitoring** tab. Anyone else who reaches it sees **Unauthorized Access**.
</Info>

<h2 id="what-monitoring-rules-are">
  What monitoring rules are
</h2>

<h3 id="the-three-parts-of-a-rule">
  The three parts of a rule
</h3>

Every rule is built from the same three sections, in the order the rule editor shows them.

| Section | The question it answers | What you pick |
| - | - | - |
| **Channels** | Where should this alert go? | **Email**, **Slack**, **Teams**, in any combination |
| **Conditions** | What should the agent watch for? | **Status change**, **Evaluation score**, **Failure count**, in any combination |
| **Notifications** | When should it be sent? | **Real-time**, or a **Scheduled report** that is **Daily**, **Weekly**, or **Monthly** |

A rule needs at least one channel and at least one condition. A rule with several conditions fires only when all of them are met, so "task failed" plus "score below 60" alerts on the tasks that are both broken and bad, not on every failure.

<h3 id="the-conditions">
  The conditions
</h3>

| Condition | Fires when | What you set |
| - | - | - |
| **Status change** | A task ends in a status you choose | One or more of **Completed**, **Failed**, **Input required**, **Consent required**, **Authentication required**, **Insufficient credits**, **Aborted** |
| **Evaluation score** | A task scores outside the range you set | A task-level score, a score on individual steps, or both. Each is **is between** two values, **is above** one, or **is below** one, on a 0 to 100 scale |
| **Failure count** | Failures pass the number you set | The number, and how often the count starts over: **Resets daily**, **Resets weekly**, **Resets monthly**, or **Never resets** |

Step-level scores are only offered for steps that have evaluation switched on in the Flow. If the agent has none, the step picker reads **No evaluated nodes**. Evaluation itself is covered in [Evaluation Framework](/04-observability-analytics/evaluation-framework/evaluation-framework).

<h3 id="real-time-or-scheduled">
  Real-time or scheduled
</h3>

**Real-time** sends each alert as the condition is met. **Scheduled report** collects them and sends one message on a cadence. Reports go out at 00:00 UTC: weekly reports on Monday and monthly reports on the 1st. There is no time picker.

The rules list groups rules by this choice, under a **Real-time** header and a **Scheduled** header, so you can see at a glance which alerts interrupt and which summarise.

<h3 id="agent-learning">
  Agent learning
</h3>

Above the rules sits a **Agent learning** band. Rules only alert. With Agent learning on, what monitoring observes is also turned into feedback for the agent's Learning, so the agent improves from the same failures it reports. The band links to Learning, which is covered in [Optimize Outputs](/04-observability-analytics/optimize-outputs/optimize-outputs).

<Note>
  Agent learning is a Pro feature and needs at least one rule to exist. On a free workspace the band shows a lock instead of a switch, and the band does not appear at all until you have created a rule.
</Note>

<h3 id="where-rules-live">
  Where rules live
</h3>

Rules belong to one agent. Open the agent, go to **Configuration**, and select the **Monitoring** tab. Each agent has its own list, so an agent that runs a critical process can page a channel in real time while a low-stakes one sends a weekly digest.

<h2 id="how-to-use-monitoring-rules">
  How to use monitoring rules
</h2>

<h3 id="create-a-rule">
  Create a rule
</h3>

<Steps>
  <Step title="Open the Monitoring tab">
    Open the agent, go to **Configuration**, and select **Monitoring**. If the agent has no rules yet, the tab reads **No rules yet**.
  </Step>

  <Step title="Select New rule">
    The **New rule** button sits in the tab header. The **New rule** editor opens with **Email** and **Status change** already switched on.
  </Step>

  <Step title="Choose the channels">
    In the **Channels** section, turn on each place the alert should go.

    <Frame caption="Agent <span>→</span> Configuration <span>→</span> Monitoring <span>→</span> New rule <span>→</span> Channels">
      <img src="https://mintcdn.com/beamai/mzjYglzHZw7mcBH3/02-building-agents/agent-configuration/monitoring/new-rule-channels.png?fit=max&auto=format&n=mzjYglzHZw7mcBH3&q=85&s=8d48771c55bed11269e609b2a9edd8db" alt="The Channels section of the New rule editor, with Email on and a recipient chosen, and the Connect Slack and Connect Teams buttons" width="1880" height="1220" data-path="02-building-agents/agent-configuration/monitoring/new-rule-channels.png" />
    </Frame>

    * **Email**: with the switch on, pick one or more workspace members in the picker beside it.
    * **Slack**: select **Connect Slack** and approve Beam in the Slack window that opens. The button changes to **Disconnect** once the connection is made.
    * **Teams**: select **Connect Teams**, approve Beam in the Microsoft window, then pick a team under **Select a team** and a channel under **Select a channel**. Teams only counts as a channel once a channel is chosen.

    <Warning>
      The rule refuses to save with no channel, with **Email** on and no recipients, or with Teams connected and no channel picked. The message under the section tells you which.
    </Warning>
  </Step>

  <Step title="Choose what to watch">
    In the **Conditions** section, switch on each condition the rule should watch. Each one expands to its settings.

    <Frame caption="Agent <span>→</span> Configuration <span>→</span> Monitoring <span>→</span> New rule <span>→</span> Conditions">
      <img src="https://mintcdn.com/beamai/mzjYglzHZw7mcBH3/02-building-agents/agent-configuration/monitoring/new-rule-status-change.png?fit=max&auto=format&n=mzjYglzHZw7mcBH3&q=85&s=e4610477cf278260a7246f5b362e0745" alt="The Conditions section with Status change expanded and Failed and Input required selected" width="1880" height="1220" data-path="02-building-agents/agent-configuration/monitoring/new-rule-status-change.png" />
    </Frame>

    For **Status change**, pick the statuses under **Select statuses**.

    For **Evaluation score**, leave **Task level** on to watch the whole task's score, and choose **is between**, **is above**, or **is below** with the scores to compare against. To watch particular steps instead, or as well, select **Add node**, pick the step under **Select node**, and set its own range. Each step can appear once.

    <Frame caption="Agent <span>→</span> Configuration <span>→</span> Monitoring <span>→</span> New rule <span>→</span> Conditions <span>→</span> Evaluation score">
      <img src="https://mintcdn.com/beamai/mzjYglzHZw7mcBH3/02-building-agents/agent-configuration/monitoring/new-rule-evaluation-score.png?fit=max&auto=format&n=mzjYglzHZw7mcBH3&q=85&s=e9ec15145a1b1a18fb3b0b82ad588c30" alt="The Evaluation score condition expanded, with Task level set to is below 70 and a step card added under Node level" width="1880" height="1220" data-path="02-building-agents/agent-configuration/monitoring/new-rule-evaluation-score.png" />
    </Frame>

    For **Failure count**, type the number of failures and choose how often the count starts over.

    <Note>
      The reset frequency is the window the failures have to land in. With **Resets daily**, ten failures spread across a week never trip a threshold of ten; ten in one day do. Choose **Never resets** to count every failure the agent has had since the rule was created.
    </Note>

    Switching a condition on and then leaving it empty stops the rule saving: **Status change** needs at least one status, **Evaluation score** needs the task level on or at least one step, and scores must sit between 0 and 100 with the second higher than the first.
  </Step>

  <Step title="Choose when to send">
    In the **Notifications** section, choose **Real-time** or **Scheduled report**. For a scheduled report, pick **Daily**, **Weekly**, or **Monthly** in the dropdown that appears beside it.

    <Frame caption="Agent <span>→</span> Configuration <span>→</span> Monitoring <span>→</span> New rule <span>→</span> Notifications">
      <img src="https://mintcdn.com/beamai/mzjYglzHZw7mcBH3/02-building-agents/agent-configuration/monitoring/new-rule-notifications.png?fit=max&auto=format&n=mzjYglzHZw7mcBH3&q=85&s=9db5603112f5b079767c5037064a3936" alt="The Notifications section set to Scheduled report and Weekly, with the note about reports being sent at 00:00 UTC" width="1880" height="1220" data-path="02-building-agents/agent-configuration/monitoring/new-rule-notifications.png" />
    </Frame>
  </Step>

  <Step title="Decide whether test tasks count">
    Turn on **Include test tasks** if tasks run in test mode should trigger this rule too. It is off by default, so a rule that pages a channel does not fire while you are still testing the agent.
  </Step>

  <Step title="Select Create rule">
    The rule appears in the list under **Real-time** or **Scheduled**, switched on, and starts watching immediately.
  </Step>
</Steps>

<Tip>
  Keep the interrupting rules narrow and the summarising rules broad. A real-time rule on **Failed** and **Authentication required** to a Slack channel catches what needs a person now; a weekly report on **Completed** to email shows the team what the agent got through.
</Tip>

<h3 id="pause-edit-or-remove-a-rule">
  Pause, edit, or remove a rule
</h3>

Each row in the list has a switch on the right. Turn it off to pause the rule without losing its settings, and back on to resume it.

Select a row, or choose **Edit** from the menu at the end of it, to reopen the rule in the editor. The title names the rule the same way the list does. Change what you need and select **Save rule**.

To delete a rule, choose **Remove** from the same menu and confirm **Remove** in the **Remove rule?** dialog.

<Warning>
  Removing a rule is permanent. If you only want it quiet for a while, use the switch on its row instead.
</Warning>

The list names each rule after its condition, **Status change alert**, **Evaluation score alert**, or **Failure count alert**, and calls a rule with more than one condition **Custom rule**. The column beside the name lists the conditions, and the icons after it show the channels.

<h3 id="disconnect-slack-or-teams">
  Disconnect Slack or Teams
</h3>

Slack and Teams connections belong to the rule, not the agent. Open the rule, and in **Channels** select **Disconnect** beside the one to drop. The rule needs at least one channel left, so turn on **Email** first if it was the only one.

<h3 id="turn-on-agent-learning">
  Turn on Agent learning
</h3>

<Steps>
  <Step title="Create at least one rule">
    The **Agent learning** band only appears once the agent has a rule.
  </Step>

  <Step title="Turn on the switch in the band">
    On a Pro workspace the band ends in a switch. Turn it on. On a free workspace it shows a lock instead; select it to open billing and upgrade.
  </Step>

  <Step title="Pick the model, if you want a different one">
    With the switch on, a settings icon appears beside it. Select it to open **Agent learning settings**, choose a model under **Model**, and select **Save**. Leaving it on **Default model** is fine. Only reasoning models are offered.

    <Frame caption="Agent <span>→</span> Configuration <span>→</span> Monitoring <span>→</span> Agent learning settings">
      <img src="https://mintcdn.com/beamai/mzjYglzHZw7mcBH3/02-building-agents/agent-configuration/monitoring/agent-learning-settings.png?fit=max&auto=format&n=mzjYglzHZw7mcBH3&q=85&s=79f8f1f139763ac31971c5ea7125425c" alt="The Smart monitor settings dialog with the Model dropdown showing Default model" width="1271" height="825" data-path="02-building-agents/agent-configuration/monitoring/agent-learning-settings.png" />
    </Frame>
  </Step>
</Steps>

<h2 id="troubleshooting">
  Troubleshooting
</h2>

<AccordionGroup>
  <Accordion title="I cannot open the Monitoring tab">
    **Cause**: The tab is limited to owners and admins.

    **Solution**:

    * Check your role under **Workspace settings** → **Access** → **People**.
    * Ask an owner or admin to create the rule, or to move you to **Admin**.
  </Accordion>

  <Accordion title="Create rule does nothing and a message appears">
    **Cause**: A section is missing something it needs.

    **Solution**:

    * Under **Channels**: turn on at least one channel, add a recipient if **Email** is on, and pick a team and channel if Teams is connected.
    * Under **Conditions**: switch on at least one condition, pick a status for **Status change**, and give **Evaluation score** either the task level or a step. Scores must be between 0 and 100, and a range's second score must be higher than its first.
    * Under **Failure count**: enter a whole number of 1 or more.
  </Accordion>

  <Accordion title="Select node reads No evaluated nodes">
    **Cause**: None of the agent's steps has evaluation switched on, so there is no step-level score to watch.

    **Solution**:

    * Open the Flow, select the step, and turn on evaluation in its **Evaluation** tab. See [Evaluation Framework](/04-observability-analytics/evaluation-framework/evaluation-framework).
    * Or watch the task-level score instead, which does not need per-step evaluation.
  </Accordion>

  <Accordion title="A rule fires during testing">
    **Cause**: **Include test tasks** is on for that rule.

    **Solution**:

    * Open the rule and turn **Include test tasks** off, then select **Save rule**.
  </Accordion>

  <Accordion title="The Agent learning band is missing or locked">
    **Cause**: Either the agent has no rules yet, or the workspace is on the free plan.

    **Solution**:

    * Create one rule. The band appears once the list is not empty.
    * If the band shows a lock, select it to open billing and upgrade to Pro.
  </Accordion>
</AccordionGroup>

<h2 id="next-steps">
  Next steps
</h2>

<CardGroup cols={2}>
  <Card title="Task Executions" icon="chart-line" href="/03-running-operations/task-management/task-executions/task-executions">
    Read the task view the alerts point you to.
  </Card>

  <Card title="Evaluation Framework" icon="clipboard-check" href="/04-observability-analytics/evaluation-framework/evaluation-framework">
    Set the evaluation scores that an Evaluation score rule watches.
  </Card>

  <Card title="Fix with AI" icon="wand-magic-sparkles" href="/03-running-operations/debugging-testing/fix-with-ai/fix-with-ai">
    Repair the failed integration step an alert pointed you to.
  </Card>

  <Card title="Optimize Outputs" icon="sparkles" href="/04-observability-analytics/optimize-outputs/optimize-outputs">
    See where Agent learning's findings end up.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.