# Desktop Monitor

> Monitor AI agent executions, review approvals, and track costs from a lightweight desktop app that lives in your system tray.

Source: https://0.0.0.0:8080/docs/desktop-monitor

PromptRails Monitor is a desktop app for monitoring your AI agent executions in real time. It lives in your system tray and gives you instant visibility into execution status, costs, traces, and pending approvals — without opening a browser tab.

<div style={{ display: 'flex', gap: '0.75rem', marginBottom: '1.5rem' }}>
  <a href="https://github.com/promptrails/desktop" target="_blank" rel="noopener noreferrer">
    GitHub
  </a>
  <a
    href="https://github.com/promptrails/desktop/releases"
    target="_blank"
    rel="noopener noreferrer"
  >
    Releases
  </a>
</div>

## Features

- **Live Execution Feed** — Real-time polling of agent executions with status, duration, and cost
- **Trace Viewer** — Collapsible trace tree with span details, input/output, and token usage
- **Approval Management** — View, approve, or reject pending human-in-the-loop approvals
- **Native Notifications** — Get notified on new approvals and execution failures
- **System Tray** — Quick overview panel on left-click, context menu on right-click
- **Stats Dashboard** — Execution counts, success rates, costs, and top agents with 1D/7D/30D period tabs
- **Infinite Scroll** — Load more executions and approvals as you scroll

## Screenshots

### Tray Panel

Left-click on the tray icon to see a quick overview of your workspace — execution stats, success rate, cost, pending approvals, and top agents. Toggle between 1D, 7D, and 30D views.

<img
  src="/images/desktop/panel.png"
  alt="Tray Panel"
  width="320"
  style={{ borderRadius: '12px', border: '1px solid #e5e7eb' }}
/>

### Execution Feed

Browse all agent executions with status badges, duration, cost, and timestamps. Filter by status and scroll to load more.

<img
  src="/images/desktop/feed.png"
  alt="Execution Feed"
  width="420"
  style={{ borderRadius: '12px', border: '1px solid #e5e7eb' }}
/>

### Stats Dashboard

View execution counts, success rates, total cost, and average duration. See executions-by-day charts and top agents breakdown. Switch between 1D, 7D, and 30D periods.

<img
  src="/images/desktop/stats.png"
  alt="Stats Dashboard"
  width="420"
  style={{ borderRadius: '12px', border: '1px solid #e5e7eb' }}
/>

### Approvals

Review pending human-in-the-loop approvals. See checkpoint names, payload data, and approve or reject with an optional reason.

<img
  src="/images/desktop/approvals.png"
  alt="Approvals"
  width="420"
  style={{ borderRadius: '12px', border: '1px solid #e5e7eb' }}
/>

### Settings

Configure polling interval (1–10 minutes), toggle notifications for approvals and failures, and disconnect to switch API keys.

<img
  src="/images/desktop/settings.png"
  alt="Settings"
  width="420"
  style={{ borderRadius: '12px', border: '1px solid #e5e7eb' }}
/>

## Installation

### Homebrew (macOS)

```bash
brew install --cask promptrails/tap/promptrails-monitor
```

### Direct Download

Download the latest release for your platform:

| Platform              | Format               |
| --------------------- | -------------------- |
| macOS (Apple Silicon) | `.dmg`               |
| macOS (Intel)         | `.dmg`               |
| Windows               | `.msi` / `.exe`      |
| Linux                 | `.AppImage` / `.deb` |

[Download from GitHub Releases →](https://github.com/promptrails/desktop/releases)

### Build from Source

```bash
# Prerequisites: Node.js 18+, Rust 1.77+, pnpm 10+
git clone https://github.com/promptrails/desktop.git
cd desktop
pnpm install
pnpm tauri build
```

## Setup

1. Launch PromptRails Monitor
2. Enter your API key (`pr_...`)
3. Click **Connect**

The API key is stored securely via the OS keychain. By default, the app connects to `https://api.promptrails.ai`. For self-hosted instances, click **Show advanced options** and enter your API URL.

You can create an API key from the PromptRails dashboard under **Settings → API Keys**. See [API Keys and Scopes](/docs/api-keys-and-scopes) for details.

## Usage

### System Tray

The app lives in your system tray:

- **Left-click** — Opens a quick overview panel with stats, pending approvals, and top agents
- **Right-click** — Context menu with "Open Monitor" and "Quit"

### Notifications

The app sends native OS notifications for:

- **New pending approvals** — When a human-in-the-loop checkpoint is triggered
- **Execution failures** — When an agent execution fails

Both can be toggled on/off in Settings.

### Polling

The app polls the API at a configurable interval (default: 1 minute). Available options: 1 min, 2 min, 5 min, 10 min. Adjust in Settings.

### Disconnect

To switch API keys or instances, go to **Settings → Disconnect**. This clears stored credentials and returns to the setup screen.

## Tech Stack

Built with [Tauri v2](https://v2.tauri.app/) for a lightweight native shell (~10MB), React 18 + Vite for the frontend, and [@promptrails/sdk](https://www.npmjs.com/package/@promptrails/sdk) for API communication.
