// buglens for agents

AI agents write the code.
BugLens reviews it.

Devin opens a PR. Claude Code pushes a commit. Copilot Workspace suggests a merge. None of them know if the code is actually correct. BugLens is the review layer that sits between agent output and production.

// the problem

Agent PRs are already
outpacing human review.

Teams using Devin and Claude Code report 5–10× more PRs per week. Human reviewers are the bottleneck. And the agent has no idea it introduced a bug — it just sees a green merge.

BugLens adds a review layer the agent can actually use: machine-readable output, structured JSON, no dashboard required.

agent output without BugLens
$ devin merge PR #247
✓ Tests passed
✓ CI green
✓ Merged to main
✗ Hardcoded API key in line 42
✗ SQL injection on line 89
✗ Unhandled promise on line 104
# found in prod 6 hours later
// integration

Three ways to wire it in.
Pick your interface.

Coming — Sprint 2

REST API

The simplest integration. Your agent POSTs a diff, gets back structured JSON findings. No GitHub. No webhooks. Works in any language, any pipeline.

  • Returns findings with severity, line number, category, fix suggestion
  • Exit-code-friendly — use as a pre-merge gate
  • API key in 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",
      "description": "sk_live_... exposed in source",
      "suggestion": "const key = process.env.API_KEY"
    }
  ]
}
Coming — Sprint 3

MCP Server

Add BugLens as a tool in Claude Code, Cursor, or Windsurf. The agent calls review_diff() directly from its tool loop — before it even opens the PR.

  • review_diff(diff, filename) → findings
  • check_conventions(code, repo) → violations
  • get_knowledge_base(repo) → your team's lessons
// claude_desktop_config.json
{
  "mcpServers": {
    "buglens": {
      "url": "https://mcp.buglens.app",
      "headers": {
        "Authorization": "Bearer bl_sk_..."
      }
    }
  }
}

// Claude Code now has access to:
// - review_diff()
// - check_conventions()
// - get_knowledge_base()
//
// Agent self-reviews before opening PR.
Coming — Sprint 4

CLI

For agents that shell out. Pipe a diff into BugLens, get findings to stdout. Exit code 1 on HIGH severity — plug into any CI gate or pre-commit hook.

  • Works with any agent that uses subprocess / shell
  • JSON output or human-readable
  • Zero config — API key via env var
// in any shell script or CI
# Review staged changes before commit
git diff HEAD | npx buglens review --stdin

# Review a specific file
npx buglens review src/auth/login.ts

# JSON output for programmatic use
npx buglens review auth.ts --format json

# Exit code 1 on HIGH findings
# Use as a gate in your agent loop:
if ! git diff | npx buglens review --stdin; then
  echo "BugLens found issues. Fix before merge."
  exit 1
fi
// discoverability

Agents find us
on their own.

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

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

## Authentication
Get your API key: https://buglens.app/settings
No credit card for free tier (50 reviews/month)

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

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

## CLI
npx buglens review <file>
BUGLENS_API_KEY=<key> git diff | npx buglens review --stdin
// early access

Building an agent that writes code?
We want to talk.

We're working with early adopters to shape the API. If you're building on Devin, Claude Code, or your own coding agent — email us. API design happens in the open.

founder@buglens.app →Try BugLens on GitHub now