Background daemon for monitoring AI agent sessions across Claude Code, Cursor, Aider, and custom agents
# Agent Monitor
A background daemon for monitoring AI agent sessions across multiple tools.
## Features
- **Multi-agent monitoring**: Track Claude Code, Cursor, Aider, and custom agents
- **Real-time updates**: Claude Code hook integration for instant event streaming
- **Unified view**: See all sessions in one place with TUI or web dashboard
- **Token & cost tracking**: Monitor usage and costs across all sessions
- **Historical data**: SQLite storage for session history and analytics
## Installation
```bash
# Install with pip
pip install agent-monitor
# Or install from source
git clone https://github.com/robertcprice/agent-monitor.git
cd agent-monitor
pip install -e .
```
## Quick Start
```bash
# Start the daemon
agent-monitor daemon
# Check status
agent-monitor status
# List sessions
agent-monitor sessions
# Install Claude Code hooks
agent-monitor install-hooks
```
## Architecture
```
┌─────────────────────────────────────────────────────────────────┐
│ LaunchAgent (plist) │
└────────────────────────────┬────────────────────────────────────┘
│
┌────────────────────────────▼────────────────────────────────────┐
│ Session Monitor Daemon (Python) │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Adapters │ │ Storage │ │Event Bus │ │ IPC/API │ │
│ │ Registry │ │ (SQLite) │ │ (asyncio)│ │ (Socket) │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
└─────────────────────────────────────────────────────────────────┘
```
## Configuration
Configuration file location: `~/.config/agent-monitor/config.json`
```bash
# Create default config
agent-monitor config --init
# Show current config
agent-monitor config --show
```
## LaunchAgent (macOS)
To run as a background service:
```bash
# Copy the plist file
cp launchd/com.user.agent-monitor.plist ~/Library/LaunchAgents/
# Load the service
laAgent that generates comprehensive documentation, API references, architecture diagrams, and developer onboarding guides from existing code.
Agent configuration for systematic bug investigation that traces issues from error logs through the codebase to root cause with suggested fixes.
Agent for integrating third-party APIs including SDK setup, type generation, error handling, retry logic, and rate limit management.
Cursor's built-in autonomous coding agent that can make multi-file edits, run terminal commands, search the codebase, and iteratively build features with minimal human intervention.
Cloud-based autonomous coding agent that runs in the background on remote sandboxed environments, handling complex multi-step tasks while you continue working.
Cursor's multi-file editing agent within Composer mode that can create, edit, and delete files across your entire project in a single conversation.