Skip to content
CaptchaSonic

Dành cho AI Agent & tự động hóa trình duyệt

Bộ giải CAPTCHA cho AI Agent

Khi agent LangChain, CrewAI, browser-use hoặc Playwright của bạn gặp CAPTCHA, nó sẽ dừng lại. CaptchaSonic cung cấp khả năng giải cho agent và client MCP để chúng hoàn thành tác vụ thay vì bị chặn.

Vì sao AI agent bị chặn

Agent tự động duyệt web thực tế nên gặp cùng các thử thách chống bot như mọi tác vụ tự động hóa: reCAPTCHA, hCaptcha, Cloudflare Turnstile, AWS WAF và nhiều loại khác. CAPTCHA giữa chừng sẽ làm đứt vòng lặp, agent mất ngữ cảnh và tác vụ thất bại. Hãy coi việc giải CAPTCHA là một công cụ mà agent có thể gọi, và quá trình sẽ chạy xuyên suốt đến cuối.

LangChainCrewAIbrowser-usePlaywrightPuppeteerSeleniumMCP clientsAutoGen

Đưa việc giải CAPTCHA vào vòng lặp agent

Đưa CaptchaSonic thành tool/hàm mà mô hình có thể gọi, hoặc kết nối máy chủ MCP có sẵn. Khi một bước trả về CAPTCHA thay vì nội dung, agent gọi công cụ, nhận token và tiếp tục — không cần con người can thiệp.

agent_loop.py
from captchasonic import CaptchaSonic
from langchain.tools import tool

solver = CaptchaSonic(api_key="YOUR_API_KEY")

@tool
def solve_captcha(captcha_type: str, website_url: str, website_key: str) -> str:
    """Solve a captcha and return a token the agent can submit."""
    task = solver.create_task(
        type=captcha_type,          # e.g. "ReCaptchaV2" | "Turnstile" | "HCaptcha"
        website_url=website_url,
        website_key=website_key,
    )
    return solver.get_task_result(task.id).token

# Agent loop: detect -> solve -> continue
page.goto(target_url)
if page.locator('iframe[src*="recaptcha"]').count():
    sitekey = page.get_attribute('[data-sitekey]', 'data-sitekey')
    token = solve_captcha("ReCaptchaV2", page.url, sitekey)
    page.evaluate("(t)=>{document.querySelector('#g-recaptcha-response').value=t}", token)
    page.click('button[type=submit]')  # task resumes, no human in the loop

Máy chủ MCP có sẵn

Trỏ bất kỳ client tương thích MCP nào tới https://mcp.captchasonic.com cùng API key của bạn, và nó sẽ có ngay các công cụ giải CAPTCHA — không cần mã kết nối. Xem tài liệu MCP để thiết lập.

Tài liệu MCP / AI Agent

Vòng lặp agent hoạt động thế nào

01

Phát hiện bị chặn

Agent nhận thấy trang trả về thử thách CAPTCHA thay vì nội dung mong đợi.

02

Gọi công cụ giải

Agent gọi CaptchaSonic (tool hoặc MCP) với loại CAPTCHA, URL trang và site key, rồi truy vấn để lấy token.

03

Tiếp tục tác vụ

Token được chèn vào trang hoặc request, và agent tiếp tục mục tiêu ban đầu.

Trao cho agent khả năng giải CAPTCHA

Bắt đầu miễn phí với $0.50 credit thưởng. Máy chủ MCP có sẵn cùng SDK Python, Node.js và Go.

Câu hỏi thường gặp

It is an API (and, for CaptchaSonic, a hosted MCP server) that an autonomous agent can call as a tool when it hits a captcha. The agent submits the captcha type, page URL and site key, receives a token, injects it, and continues its task instead of stalling.

Yes. Expose CaptchaSonic as a LangChain/CrewAI tool or a Python/Node.js/Go function, or connect the hosted MCP server. browser-use, Playwright, Puppeteer and Selenium agents call the same solve flow inline.

Point any MCP-compatible client at the hosted CaptchaSonic MCP server (https://mcp.captchasonic.com) and it gains CAPTCHA-solving tools with no glue code. The model decides when to call them during a run. Setup is documented in the MCP docs.

hCaptcha, reCAPTCHA v2, Cloudflare Turnstile, GeeTest, AWS WAF, TikTok, Binance and image/OCR — the same coverage as the rest of the CaptchaSonic API, only charged for successful solves.

Agents browse the live web, so anti-bot systems present the same challenges they show any automation. Without a solve step the agent loses its loop context and the task fails. Adding captcha solving as a callable tool keeps the run going end to end.