Skip to content
NexCaptcha

Solution

Captcha solving for AI agents

Agents stall on the one step they cannot do. Expose solving as a single tool call and the run finishes instead of waiting for a human.

Who this is for

Teams building autonomous browser agents, agent-infrastructure startups, and developers wiring LLM tool calling to real web tasks. The stack is usually browser-use, Stagehand or a Playwright MCP server driving a real browser on behalf of an end user. The agent is expected to finish a task with nobody watching it.

The problem

The agent hits a Turnstile widget, sees it in the accessibility snapshot, and has no tool to act on it. The run halts mid-plan and the user gets a half-finished result with no error worth reading. Playwright MCP and similar servers ship no solve primitive, so the fix has to be a tool the agent can call inline and then continue from.

  • the challenge is resolved as a step, not an exception
  • one tool definition covers every widget the agent meets
  • runs finish without handing control back to a person
  • the solve is an ordinary tool call, so it shows up in the trace

Works with

  • browser-use
  • LangChain
  • CrewAI
  • OpenAI Agents SDK
  • Playwright MCP
  • Stagehand
  • Browserbase
  • Skyvern

[ 04 ]Questions about this one

Questions about this one

A token string and the task type it came from. The agent writes it into the field the widget reads, fires the callback if the page defines one, and continues its plan.

The API is a two-call HTTP contract, so wrapping it as an MCP tool or an OpenAI function definition takes a few lines. This page carries a definition you can paste into browser-use, LangChain or CrewAI.

Write the DOM markers into the tool description: a cf-turnstile container, a g-recaptcha div, a checkbox labelled to confirm you are human. Models call the tool far more reliably when the description names those markers instead of only the word captcha.

That one returns a cf_clearance cookie rather than a form token. The agent sets the cookie on the browser context and reloads the page, which is why it is a separate task type.

Solve your first thousand on us.

Create a key, paste it into the sample above, and watch a real token come back. No card, no sales call.