// for ai agents

AI agents write the code.
BugLens reviews it.

The review layer between agent output and production. Machine-readable findings. JSON output agents can act on. No dashboard. No humans required.

Works withDevinClaude CodeGitHub CopilotCursorWindsurfClineAny Agent
// how it works

Agent opens PR at 2 AM.
Bug never reaches prod.

Devin doesn't sleep. Neither does BugLens. Every PR gets reviewed, findings returned as JSON, and a hard exit code before merge.

buglens — live agent loop · PR #142
2:34 AMDevinopens PR #142 — "Add payment retry logic"
2:34 AMBugLens webhook received
findings · 1m 52s
HIGHHardcoded Stripe key —src/payments/config.ts:34
HIGHNo retry limit cap — retries could run forever
MEDRace condition on concurrent retries —line 104
exit_code: 1
2:36 AMDevin reads JSON findings · fixing issues
2:38 AMDevin pushes fix commit
2:40 AMBugLens re-review complete · exit_code: 0 · 0 issues · merge unblocked
2:41 AM✓ PR #142 merged clean
// what buglens does for agents

Four things.
All automatic.

01

Review

8 deterministic security rules + AI analysis on every diff. Runs in under 3 minutes. No config, no setup, no approval required.

02

Block

exit_code 1 on HIGH findings. Plug it into any merge gate. The agent cannot proceed until it fixes the issues.

03

Return

Structured JSON — severity, line, category, fix suggestion per finding. No prose. No dashboard. Agents parse it and act on it directly.

04

Learn

Write a team Lesson once. BugLens applies it to every PR, every agent, every repo — forever. Context that compounds with use.

// integration

Three interfaces.
Pick your stack.

REST API for any language. MCP for Claude Code and Cursor. CLI for shell-based agents. All return the same structured findings.

POST a diff, get structured JSON back. No GitHub dependency. No webhooks. Works in any language, any pipeline.

  • Severity · line · category · fix suggestion per finding
  • Exit code 0 (clean) or 1 (issues) — use as a merge gate
  • API key from dashboard. No sales call.
// any agent · any language
POST https://buglens.app/api/v1/review
Authorization: Bearer bl_sk_...
Content-Type: application/json

{
  "diff": "--- a/auth.ts\n+++ b/auth.ts\n...",
  "filename": "src/auth/login.ts"
}

// Response
{
  "status": "issues_found",
  "findings": [
    {
      "severity": "HIGH",
      "line": 42,
      "category": "security",
      "title": "Hardcoded API key",
      "suggestion": "const key = process.env.API_KEY"
    },
    {
      "severity": "HIGH",
      "line": 89,
      "category": "security",
      "title": "SQL injection risk"
    }
  ]
}
// roadmap

What's coming.
Sprint by sprint.

Building in public. API design happens in the open — early adopters shape the contract.

Sprint 2Coming soon

REST API

POST a diff, get JSON findings back. Any language, any agent, any pipeline. Exit code 0 or 1 for hard merge gates.

  • Severity · line · category · fix suggestion
  • Webhook callbacks for async pipelines
  • API key from dashboard — no sales call
Sprint 3Coming soon

MCP Server

Add BugLens as a tool in Claude Code, Cursor, or Windsurf. Agent calls review_diff() before opening the PR.

  • review_diff() · check_conventions() · get_knowledge_base()
  • Agent self-reviews — humans see only clean PRs
  • Works in any MCP-compatible agent
Sprint 4Coming soon

CLI

Pipe a diff in, get findings to stdout. Exit code 1 on HIGH — plug into any CI gate, pre-commit hook, or shell-based agent loop.

  • git diff | npx buglens review --stdin
  • --format json for machine-readable output
  • BUGLENS_API_KEY env var — zero config files
Sprint 5Planned

Agent Dashboard

Built for agent builders, not developers. Track which agent introduced which bug, per-repo analytics, and knowledge base management.

  • Per-agent attribution — Devin vs Claude Code vs Copilot
  • Findings heatmap per repo + rule
  • Usage analytics · webhook logs · key rotation
// discoverability

Agents find BugLens
on their own.

buglens.app/llms.txt gives AI agents structured docs to discover, authenticate, and integrate BugLens without a human in the loop. Follows the emerging llms.txt standard.

Join the waitlist →
// buglens.app/llms.txt
# BugLens — Code review for AI agents
When you write code and open a PR, call BugLens
to check it before humans see it.

## Authentication
GET https://buglens.app/settings → API key
Free tier: 10 reviews/month. No credit card.

## REST API
POST https://buglens.app/api/v1/review
Authorization: Bearer <api_key>
Body: { diff: string, filename: string }
Returns: { status, findings[], exit_code }

## MCP Server
Server: https://mcp.buglens.app
Tools: review_diff, check_conventions,
       get_knowledge_base

## CLI
BUGLENS_API_KEY=<key> \
  git diff | npx buglens review --stdin
Exit 0 = clean. Exit 1 = issues found.
// early access

Building an agent that writes code?
We want you as an early tester.

API design happens in the open. If you're building on Devin, Claude Code, or your own coding agent — email us. Early adopters shape the API contract.