Skip to content
Critique/docs
Platform

Bring Your Own Agent (BYOA)

Route Critique review findings to Cursor Cloud Agents, Claude Managed Agents, OpenAI Codex, or paste-based agents — without double-paying for execution.

Critique answers what should change on a pull request. BYOA (Bring Your Own Agent) is how you answer who writes the patch using tools you already pay for — while Critique stays the review and decision layer.

This is separate from BYOK (Bring Your Own Key), where you supply an OpenRouter key so Critique’s review and chat models bill OpenRouter directly. BYOA and BYOK work together: BYOK for inference on review, BYOA for fix execution on your agent stack.

Choose your execution path

PathWhat runs the fixCritique credits for executionSetup
RemedyCritique-managed sandboxYes (Remedy workload)One click on review run
Cursor Cloud AgentYour Cursor accountNo — Cursor bills youCursor API key in Settings
Claude Managed AgentsYour Anthropic accountNo — Anthropic bills youAnthropic API key in Settings
OpenAI CodexYour OpenAI account (Responses API)No — OpenAI bills youOpenAI API key in Settings
Fix promptYou paste into Codex, Claude Code, or CopilotSmall Critique usage to generate promptReview run → Fix prompt
Claude Code from chatAnthropic via chat handoff toolUses browser-local keySettings → Claude Code handoff
flowchart TB
  RV[Critique review findings]
  RV --> R[Remedy managed]
  RV --> C[Cursor Cloud Agent]
  RV --> CL[Claude Managed Agent]
  RV --> CX[OpenAI Responses / Codex]
  RV --> F[Fix prompt copy]
  F --> Codex[OpenAI Codex]
  F --> CC[Claude Code]
  F --> Cop[GitHub Copilot]
  RV --> Chat[Chat handoff]
  Chat --> CC

The fix blueprint

Every BYOA path starts from the same fix blueprint Critique builds from the review:

  • What failed or warned, with file locations
  • Allowed write scope (same bounded idea as Remedy)
  • Suggested validation (tests, lint, build when detectable)
  • Review strictness and summary context

Remedy consumes the blueprint inside Critique. Queued BYOA paths serialize it into provider-specific handoffs (critique.cursor_agent_handoff, critique.claude_agent_handoff, critique.codex_agent_handoff). Fix prompt produces a paste-ready variant for any other agent.


Cursor Cloud Agents

Status: Live — queue from the dashboard or export JSON.

Setup

  1. In Cursor, create an API key under Dashboard → Integrations.
  2. In Critique SettingsCursor Cloud Agents (BYOA), save the key (encrypted server-side).
  3. Open a completed review run on the PR you want to fix.

Run a fix

  1. On the review run page, optionally add operator instructions.
  2. Click Queue Cursor agent.
  3. Use Open in Cursor when the Cloud Agent URL is available.

Critique passes the PR URL and works on the current branch (workOnCurrentBranch). Execution bills to your Cursor plan, not Critique credits.

Export

GET /api/review-runs/{reviewRunId}/byoa/cursor — add ?download=1 for an attachment.


Claude Managed Agents

Status: Live — queue from the dashboard or export JSON.

Setup

  1. Create an Anthropic API key with access to Claude Managed Agents (beta header managed-agents-2026-04-01).
  2. In Critique SettingsClaude Managed Agents (BYOA), save the key (encrypted server-side).
  3. Open a completed review run.

Run a fix

  1. Add optional operator instructions on the review run page.
  2. Click Queue Claude agent.
  3. Critique provisions (once per account) a Managed Agent with agent_toolset_20260401 and a cloud environment, starts a session with your repo mounted via the GitHub App installation token, sends the handoff as a user.message event, and polls until the session is idle or terminated.
  4. Use Open session when a console URL is recorded.

Execution bills to your Anthropic account. Critique does not charge execution credits for the agent loop.

Export

GET /api/review-runs/{reviewRunId}/byoa/claude — add ?download=1 for an attachment.

Environment variables (server)

VariablePurpose
CRITIQUE_SECRETS_ENCRYPTION_KEYRequired to store Anthropic (and other BYOA) keys
CRITIQUE_CLAUDE_AGENT_MODEL_IDOptional Managed Agent model id (default claude-sonnet-4-6)

Three Claude paths

Managed Agents (review run) = server key, PR checkout, queued worker. Fix prompt = paste on a review run. Chat handoff = browser-local key for thread export — see Chat tools.


OpenAI Codex

Status: Live — queue Responses API runs and export JSON for Codex cloud / CLI.

OpenAI’s Codex cloud task surface does not yet mirror Cursor’s single REST “agent on PR” contract in Critique. The queue path calls the documented Responses API with your platform key so work is a real API invocation. Use export when you want the full Codex sandbox or CLI workflow.

Setup

  1. Create an OpenAI API key.
  2. In Critique SettingsOpenAI Codex (BYOA), save the key (encrypted server-side).
  3. Open a completed review run.

Run a fix

  1. Add optional operator instructions.
  2. Click Queue Codex run.
  3. A QStash worker calls POST /v1/responses with the handoff prompt (default model codex-mini-latest).
  4. Open the logged response link when present.

Token usage bills to your OpenAI account.

Export

GET /api/review-runs/{reviewRunId}/byoa/codex — add ?download=1 for an attachment.

Environment variables (server)

VariablePurpose
CRITIQUE_SECRETS_ENCRYPTION_KEYRequired to store OpenAI keys
CRITIQUE_CODEX_AGENT_MODEL_IDOptional Responses model (default codex-mini-latest)

Fix prompt: Codex, Claude Code, Copilot

Status: Live — manual paste when you do not need queueing.

  1. Open Dashboard → Review runs → select a completed run.
  2. Click Generate fix prompt.
  3. Paste into Codex, Claude Code, Copilot, or any agent that accepts rich instructions.

Generating the fix prompt uses a modest Critique model call; execution stays in the product you already own.


Claude Code from chat

Status: Live for chat handoff — separate from review-run queueing.

  1. SettingsClaude Code handoff (browser-local Anthropic key).
  2. In chat, use prepare Claude Code handoff or ask to hand off (see Chat tools).

OpenRouter BYOK (not BYOA)

Connecting an OpenRouter key is BYOK, not BYOA. Pair BYOK with any execution row in the table above.


BYOA vs Remedy

RemedyBYOA
ExecutorCritique E2B / OpenCode pipelineYour Cursor, Anthropic, OpenAI, or paste-based agent
BillingCritique creditsYour agent subscription (+ OpenRouter if BYOK for review)
Best for“Fix this PR inside Critique”“We already pay for Cursor / Anthropic / OpenAI”

Many teams use Critique for review, BYOA for execution, and BYOK when OpenRouter should carry model cost.