Sentry, From the Terminal to the Agent

CLI · npm library · MCP


A 5-minute lightning talk

whoami

Burak Yigit Kaya — BYK

Member of Technical Staff, Special Projects @ Sentry

GitHub: @BYK

What is Sentry?

  • Error & performance monitoring — errors, traces/spans, logs, session replay, releases
  • You ship code → Sentry tells you what broke, where, and why (down to the stack frame)
  • Traditionally lived in a web dashboard

Today's talk: getting that data out of the browser — into your terminal, your code, and your AI agents.

Meet the Sentry CLI

A first-class CLI — "built by robots and humans, for robots and humans."

  • Native binaries (curl / Homebrew / npm), Node ≥ 22
  • Dedicated commands for what you actually do:
sentry issue list
sentry issue view ACME-123
sentry event view   sentry trace view   sentry log list
sentry api  /  sentry schema   # anything without a dedicated command
  • Two output modes baked in: pretty for humans, --json for machines

sentry init: zero to instrumented

sentry init                 # auto-detect everything
sentry init acme/my-app     # explicit org/project
sentry init ./my-project    # point at a directory
  • Runs the setup wizard: detects your framework, installs the SDK, wires up config
  • Pick features, or pass them: --features errors,tracing,replay
  • Agent/CI friendly — non-interactive:
sentry init --yes --features errors,tracing
sentry init --dry-run        # preview before touching files

The CLI is a library (npm)

npm install sentry ships both the CLI and a typed SDK — no subprocess.

import createSentrySDK from "sentry";

const sdk = createSentrySDK({ token: "sntrys_..." });

// Typed methods for every command
const issues = await sdk.issue.list({ orgProject: "acme/frontend", limit: 5 });
const issue  = await sdk.issue.view({ issue: "ACME-123" });

// Escape hatch for anything
const version = await sdk.run("--version");
  • In-process (no spawn) · parsed objects (zero-copy) · typed SentryError
  • Never touches your process.env; streaming commands return async iterables

Same code path as the CLI — just callable. Great for build tools, CI, and agents.

Seer — Sentry's built-in agent

Sentry already has an AI agent that knows your stack traces, traces, and code. The CLI puts it one command away:

sentry issue explain @latest      # root-cause analysis
sentry issue plan ACME-123        # step-by-step fix plan
  • explain → root causes, reproduction steps, relevant code locations
  • plan → concrete implementation steps (uses your GitHub integration + code mappings)
  • Works on real issues — @latest, @most_frequent, or a short ID like cli-G

explain/plan start from a known issue.

Seer Agent + agentic dashboards

Seer Agent (open beta) — when there's no issue to start from, just ask:

  • Hit Cmd + / / "Ask Seer" in Sentry, or @mention it in Slack
  • Traverses your trace-connected graph (trace → spans → logs → deploy → commits → source) — no "which service is upstream?" guesswork

Agentic dashboards — built from the same engine:

  • Prompt "Generate Dashboard" in-product, with full revision history to revert mistakes
  • Or script it: sentry dashboard create + --json so agents (Claude Code, Copilot, Cursor) provision dashboards from your terminal

Explore rewards operators who already have the map. Seer builds the map.

Agentic Sentry — two paths

1. Sentry CLI as an agent skill

  • On install, sentry cli setup drops skills into ~/.claude / ~/.agents (Claude Code, Cursor…)
  • Agent translates intent → real commands:
    • "Show me the latest issues"sentry issue list
    • "Stack trace for ISSUE-123?"sentry issue view ISSUE-123
  • Uses your existing sentry auth login — includes Seer AI (root-cause + fix plans)

Agentic Sentry — two paths

2. Sentry MCP servermcp.sentry.dev · getsentry/sentry-mcp

  • Remote MCP server: middleware to the Sentry API, built for coding assistants
  • Connect any MCP client (Cursor, Claude Code…) — OAuth, no token wrangling
  • Or run local stdio: npx @sentry/mcp-server@latest --access-token=…
  • AI-powered tools: search_events, search_issues, Seer

CLI skill = local, project-aware, scriptable. MCP = remote, account-wide tool surface. They complement each other.

Sentry, three ways

Type it → CLI
Import it → npm library
Let your agent use it → skills + MCP


The one command to remember: sentry init