Conversational data validation with CUA + Grafana
Ask questions about your metrics. Get answers with context. No dashboard clicking required.
- CUA reads your Grafana dashboards like a senior data engineer
- Ask: "Any pipeline failures in the last 24 hours?" → get root cause analysis
- Ask: "Why did the ETL run take 3x longer today?" → get correlation across metrics
- Ask: "Which table hasn't been updated?" → get freshness validation
10× faster root cause analysis. Zero dashboards opened. All insights in chat.
docker-compose.yml
├── Grafana (dashboards)
├── Prometheus (metrics)
├── Node Exporter (system metrics)
├── CUA Ubuntu (browser container)
└── CUA Agent (AI that reads dashboards)
└── uv for fast package management
- Docker Desktop or Docker Engine
- Anthropic API key (get from https://console.anthropic.com)
- 4GB RAM minimum
- uv (optional for local development):
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone or create project directory
mkdir cua-dashboard-agent && cd cua-dashboard-agent
# Copy all files from the artifact
# Create .env file
make setup
# Add your API key
# Edit .env and add: ANTHROPIC_API_KEY=your-key-here
# Start the entire stack (uses uv inside containers)
docker-compose up -d
# Wait 30 seconds for services to start
# Check services are running
docker-compose ps
# Run the agent in interactive mode
make agent
# Install dependencies with uv (much faster than pip)
make dev-install
source .venv/bin/activate
uv pip install -r requirements.txt
# Start only Grafana/Prometheus
docker-compose up -d grafana prometheus node-exporter
# Run agent locally
python agent/dashboard_agent.py
Open browser to http://localhost:3000
- Username:
admin - Password:
admin
You'll see basic system metrics from Node Exporter.
docker-compose run --rm cua-agent
# Then ask questions:
Your question: What metrics are currently being collected?
Your question: Show me CPU usage over the last hour
Your question: Any memory spikes or anomalies?
# Run pre-configured scenarios
docker-compose run --rm -e MODE=examples cua-agent
Edit .env:
# Point to your existing Grafana
GRAFANA_URL=http://your-grafana-url:3000
GRAFANA_USER=your-username
GRAFANA_PASSWORD=your-password
Then run:
docker-compose up -d grafana prometheus # Skip if using external Grafana
docker-compose run --rm cua-agent
- CUA Container — Ubuntu desktop in Docker, runs Firefox
- Agent — Claude 3.5 Sonnet controls the browser, reads dashboards
- Computer Interface — Takes screenshots, clicks, types, navigates
- Reasoning Loop — Analyzes metrics, correlates patterns, reports findings
No Grafana API integration needed. Agent reads what you read.
"Any compute spikes in the last 24 hours?"
"Is RAM utilization concerning?"
"Which namespace looks unhealthy?"
"Why did disk I/O spike at 2:15am?"
"Compare CPU usage today vs yesterday"
"List all dashboards and their status"
"Show me the 3 most concerning metrics right now"
Answers are:
- Printed to console in real-time
- Saved to
outputs/analysis_TIMESTAMP.txt - Include screenshots (future feature)
You → Question
↓
CUA Agent (Claude 3.5 Sonnet)
↓
CUA Computer (Ubuntu container)
↓
Firefox → Grafana Dashboard
↓
Screenshots → Analysis
↓
Answer with Context
- Point agent at localhost Grafana first
- Test with synthetic metrics (Node Exporter)
- Verify agent catches anomalies
- Then point at production dashboards
If it doesn't work on localhost, it won't work in prod.
For faster local development:
# Install uv if not already installed
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create virtual environment and install deps (much faster than pip)
uv venv
source .venv/bin/activate # or `.venv\Scripts\activate` on Windows
uv pip install -r requirements.txt
# Run agent locally
python agent/dashboard_agent.py
Edit prometheus.yml to scrape your services:
scrape_configs:
- job_name: 'your-app'
static_configs:
- targets: ['your-app:8080']
Edit agent/dashboard_agent.py:
# Use OpenAI instead of Anthropic
agent = ComputerAgent(
model="openai/gpt-4o",
tools=[computer],
)
# Use local model with Ollama
agent = ComputerAgent(
model="omniparser+ollama_chat/llama3.2:latest",
tools=[computer],
)
Import dashboards in Grafana:
- Go to http://localhost:3000
- Dashboards → Import
- Use ID from https://grafana.com/grafana/dashboards/
Agent will automatically read them.
- Anthropic Claude 3.5 Sonnet: ~$0.01-0.05 per question (depends on complexity)
- OpenAI GPT-4o: ~$0.02-0.10 per question
- Local models (Ollama): Free, but slower
Budget limit: Set max_trajectory_budget in code (default: $5.00)
Services won't start:
docker-compose down -v
docker-compose up -d
docker-compose logs -f
CUA container can't connect:
# Check if running on ARM (M1/M2 Mac)
# CUA requires amd64 platform
docker pull --platform=linux/amd64 trycua/cua-ubuntu:latest
Agent errors:
# Verify API key is set
echo $ANTHROPIC_API_KEY
# Check agent logs
docker-compose logs cua-agent
Grafana won't load:
# Wait longer (first startup takes 60s)
docker-compose ps
# Check Grafana logs
docker-compose logs grafana
- Point at your production Grafana
- Test with real dashboards (Kubernetes, Airflow, Postgres)
- Schedule periodic checks (cron + docker-compose run)
- Build custom dashboards for your data pipelines
- Integrate with Slack (send analysis to channels)
- Browser automation beats APIs — screenshots are universal, APIs change
- Local first — validate on localhost before pointing at prod
- Docker-compose — entire stack in one command
- Conversational — ask questions instead of reading 47 panels
From dashboards to dialogue. This is Data + AI Engineering 2026.
- CUA Docs: https://docs.cua.ai
- CUA GitHub: https://github.com/trycua/cua
- Grafana Dashboards: https://grafana.com/grafana/dashboards/
- Blog Post: [Link to your blog]
MIT
Questions? Issues? Improvements?
Open an issue or contribute to make this better.