agent-dd
Datadog triage CLI for AI agents
- Language
- Go
- Version
- 0.20.1
- License
- PolyForm Perimeter 1.0.0
- Category
- CLI Tool
A Datadog CLI shaped around investigation rather than administration — monitors, logs, metrics, traces, events, hosts, incidents and SLOs — plus the hardening that follows: creating and retuning monitors once you know what broke. A surface limited to what matters during triage, with classified errors so an agent can self-correct.
Features
Triage-shaped, not admin-shaped — the commands an investigation needs, not 200+ Datadog API endpoints
NDJSON everywhere by default — one object per line for lists, one line per id for gets; --format json|yaml overrides
Compact and null-pruned by default — monitors come back as id, name, status, type until you ask for --full
Errors classify themselves — fixable_by: agent means fix your parameters, human means stop and ask, retry means wait
Item-level misses do not lose the batch — an unresolvable id becomes an @unresolved line on stdout with exit 0
Monitor updates are surgical — it reads the monitor, layers your changes on and writes the whole definition back, so restricted_roles, composite sub-monitors and unmodelled options survive untouched
Every update reports its own diff — a changes map of exactly which fields moved, and from what to what
--dry-run validates against Datadog without creating anything
--body escape hatch — pass a whole monitor definition as inline JSON, @file or @- for options with no dedicated flag
Secrets stay off argv — --form uses a native OS dialog, or pipe both keys on stdin, one per line
Multi-org — several Datadog organizations and sites side by side, selected with --org
Flexible time — relative (now-15m), RFC3339 or unix epoch, on every --from and --to
Runs as an MCP server over stdio or HTTP, and ships a mock Datadog API for testing without an account
Install
Homebrew
$ brew install shhac/tap/agent-dd AI Agent Skill
$ npx skills add shhac/agent-skills --skill agent-dd --global GitHub Release (macOS)
$ curl -L https://github.com/shhac/agent-dd/releases/latest/download/agent-dd-darwin-arm64.tar.gz | tar xz Go Install
$ go install github.com/shhac/agent-dd/cmd/agent-dd@latest Build from Source
$ git clone https://github.com/shhac/agent-dd.git && cd agent-dd && make build Getting Started
agent-dd needs a Datadog API key and application key. Both are secrets, so keep them off the command line — they would otherwise land in shell history, ps, and any agent transcript.
01 · Add an organization without the keys touching argv
$ agent-dd org add prod --form --site datadoghq.com --form types the keys into a native OS dialog, so the agent driving the CLI never sees them. It needs a graphical session and fails cleanly with fixable_by=human over SSH.
02 · Or pipe them, for CI
$ printf '%s\n%s' "$DD_API_KEY" "$DD_APP_KEY" | agent-dd org add prod --site datadoghq.com API key first, app key second. stdin is read only when neither key was passed as a flag. DD_API_KEY and DD_APP_KEY also work directly, with no setup at all.
03 · Test the connection
$ agent-dd org test Add a second org for another region with --site datadoghq.eu, then select it per command with --org eu.
04 · See what is alerting
$ agent-dd monitors list --status alert Compact NDJSON by default. agent-dd usage prints the reference card; each domain has its own usage page.
Usage
$ agent-dd monitors list --status alert $ agent-dd logs search --query "service:web-api status:error" --from now-15m $ agent-dd logs facets --query "status:error" --from now-1h $ agent-dd traces search --service web-api --query "@duration:>1000000000" --from now-30m $ agent-dd monitors create --type "metric alert" --query 'avg(last_5m):avg:system.cpu.user{service:web-api} > 90' --name "CPU high on web-api" --dry-run $ agent-dd monitors update 12345 --threshold-critical 95 $ agent-dd slo history SLO_ID --from now-7d $ agent-dd api get /api/v1/dashboard