# How to configure a monitoring event for agents

{% embed url="<https://youtu.be/MerjTGKlG1U?si=ZbzMTfmrd0D1iX2A>" %}
Quick 'How-to' video with steps to monitor ZBrain agents
{% endembed %}

### **Step 1: Access the monitoring setup** <a href="#step-1-access-the-monitoring-setup" id="step-1-access-the-monitoring-setup"></a>

To set up monitoring for an agent:

**Access the agent dashboard:**

* Go to the Agents page.
* Choose a deployed agent. This opens that specific agent’s dashboard.

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2FWl5fZLTt9BaWG4hbLVcb%2Fimage.png?alt=media&#x26;token=10149674-afed-48f1-b572-0f2b9d6c10b4" alt=""><figcaption></figcaption></figure>

**Enable monitoring:**

* Click on the full-screen button of ‘Agent Activity.’
* Click the 'Monitor' button of that execution.
* When prompted, select configure ‘Now.’

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2F36tygWG81mZeqHVRMtyT%2Fimage.png?alt=media&#x26;token=adf5bde3-a29a-41c8-8704-cc4df1e11a5b" alt=""><figcaption></figcaption></figure>

### **Step 2: Configure event settings** <a href="#step-2-configure-event-settings" id="step-2-configure-event-settings"></a>

When you click on configure ‘Now,’ you’ll be redirected to the ‘Monitor’ page. Click ‘Configure’ in the ‘Last Status’ column to open the ‘Event Monitoring Settings’ page.

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2FANv8rzyCs4dQdNEIEI6t%2Fimage.png?alt=media&#x26;token=3ac61793-087a-495d-a7d8-623711a76925" alt=""><figcaption></figcaption></figure>

On the Event Monitoring screen, review the following settings, similar to the app monitoring configuration:

* Entity Name / Type (Agent)
* Monitored Input (e.g., a prompt or document)
* Monitored Output (response generated by agent)

Configure the following options:

* Evaluation Frequency (Hourly, Daily, etc.)
* Metrics

ZBrain enables you to monitor AI agent performance through customizable evaluation conditions, utilizing a comprehensive set of metrics. These metrics are configurable under the **Evaluation Conditions** section of an event.

* **Adding Metrics**
  * **Click** the **“Add Metric”** button under the Evaluation Conditions section.
  * **Choose** from three metric categories:
    * **Non-LLM**
    * **LLM-based**
    * **LLM-as-a-judge**
    * **Performance**
  * Combine multiple metrics using **AND** / **OR** logic to define composite evaluation rules.

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2F0HwEUm8jNR4s4yIgkbib%2Fimage.png?alt=media&#x26;token=d94d62b1-32a1-4593-8e24-9fb3528abdcc" alt=""><figcaption></figcaption></figure>

*Note: ZBrain continually expands its list of available metrics to support advanced evaluation needs.*

* **Setting thresholds**
  * After choosing metrics, configure thresholds based on your business requirements.
  * Start with a conservative range (e.g., 0.5–0.7) and fine-tune based on performance.

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2FGzO12QSzkEO40T9UYCSW%2Fimage.png?alt=media&#x26;token=f603642a-ec60-4302-a315-85af288a22d8" alt=""><figcaption></figcaption></figure>

* Consider the context:
  * **Customer-facing applications** → higher thresholds
  * **Internal tools** → lower thresholds are acceptable
  * Revisit and adjust thresholds as models or use cases evolve.
* **Define outcome and notifications**
  * Set the outcome of evaluation as either **Success** or **Fail** from the Mark Evaluation drop down, depending on the metric logic.

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2FVQanZE3ufEOp3hzjfV3L%2Fimage.png?alt=media&#x26;token=6fb27cb4-dbb6-4775-88ad-eeddc18ff6f6" alt=""><figcaption></figcaption></figure>

* Enable notifications by toggling the **Send Notification** button if you want to get notifications on agent events.
* You can check ‘Send Notifications’ for both successful and failed evaluation.

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2F3EXwCyT1Bt62T9Nz92jW%2Fimage.png?alt=media&#x26;token=4857d6f9-a53f-449c-8395-fcc544ac5854" alt=""><figcaption></figcaption></figure>

* **Adding notification flows**
  * Click **'+ Add a Flow from the Flow Library'**
  * In the side panel, search and select your preferred notification flow from the default or custom flow options. You can add multiple flows for a single event, allowing you to send alerts simultaneously across various channels. The system prevents adding the same flow more than once to avoid redundant alerts or conflicts. Upon meeting the evaluation trigger conditions, all attached flows are executed in parallel.

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2FUemjGaYN3l5eorGGttfG%2Fimage.png?alt=media&#x26;token=761a53d2-b53e-4e72-9f7d-875cc18e445f" alt=""><figcaption></figcaption></figure>

* You can directly edit linked notification flows from the **Event Settings** screen, allowing you to quickly update or troubleshoot notification logic without needing to navigate away from the monitoring configuration, as you are directly redirected to the Flow page.
  * Click on the pencil icon ![memo](https://leewayhertz.atlassian.net/gateway/api/emoji/86e7216a-2b63-4398-aefe-391cdd46a4ec/1f4dd/path?scale=MDPI) beside the selected Flow.
  * It will redirect you to the defined Flow page, and here you can modify the logic.

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2FaAChIc2SBrXPlcetUoJj%2Fimage.png?alt=media&#x26;token=127c22dd-f316-4c1f-b154-ca31edbe8935" alt=""><figcaption></figcaption></figure>

Click the Play ▶️ button to run a delivery test.

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2FVHwcAa2CUPgdpfD1EbEB%2Fimage.png?alt=media&#x26;token=ab406e32-ffed-4e1f-9120-2f9a86222dd4" alt=""><figcaption></figcaption></figure>

* If the flow succeeds, a confirmation message appears: "Flow Succeeded".
* If the flow fails, inline error messages will be displayed, along with a link to Edit Flow for troubleshooting.

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2Fgk03fTbCzIXf3x2W883U%2Fimage.png?alt=media&#x26;token=67cb9e83-444c-4645-8730-6e6e164126ed" alt=""><figcaption></figcaption></figure>

**Note:** Users cannot update the event settings until a valid notification flow passes the delivery test.\
Once the flow passes the delivery test, notifications will be sent via the chosen communication channel whenever the associated event fails.

* **Test the event**
  * Click the **‘Test’** button to simulate a monitoring event.
  * Optionally, enter a test message to preview the response evaluation.
* Once you click ‘Test’, the system runs monitoring checks to validate the configuration, ensuring that the model and temperature values match the settings defined in the associated agent. The resulting metrics dynamically reflect the actual model selected, making evaluation outcomes more realistic and aligned with runtime behavior.

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2FD6VK4PluMekO2AITtpFp%2Fimage.png?alt=media&#x26;token=df0a8146-b336-4f54-92eb-8a191c43081d" alt=""><figcaption></figcaption></figure>

* Review the test results for accuracy.
  * Click **‘**&#x52;ese&#x74;**’** to test again with different inputs.

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2Fw7QDnTVD8R64BFn0668K%2Fimage.png?alt=media&#x26;token=e7074f30-7d0b-4a5e-a7b7-388ca3b1fe67" alt=""><figcaption></figcaption></figure>

* **Save and activate**
  * Once all settings are configured:
    * Click **‘Update’** to save your Monitor configuration.
    * The Monitor runs automatically at the selected evaluation frequency:
      * Hourly
      * Every 30 minutes
      * Daily
      * Weekly
