AI AGENTS

CrewAI + GateSolve

Give your CrewAI agents the ability to solve CAPTCHAs. Add GateSolve as a tool and never get blocked again.

The Problem

CrewAI agents doing web scraping, research, or data extraction hit CAPTCHAs constantly. Cloudflare Turnstile blocks automated browsers. reCAPTCHA stops form submissions. Your agent either fails silently, retries endlessly, or returns incomplete data. GateSolve solves the CAPTCHA and returns a valid token your agent can inject to continue.

Install

pip install gatesolve crewai

Create a CAPTCHA Tool

Wrap GateSolve as a CrewAI tool. Your agents can call it whenever they encounter a CAPTCHA.

from crewai.tools import tool
from gatesolve import GateSolve

solver = GateSolve(api_key="gs_your_key_here")

@tool("Solve CAPTCHA")
def solve_captcha(captcha_type: str, site_key: str, page_url: str) -> str:
    """Solve a CAPTCHA and return the token.
    Use when a webpage is blocked by Cloudflare Turnstile,
    reCAPTCHA, or hCaptcha. Returns a token to inject."""
    result = solver.solve(
        type=captcha_type,
        page_url=page_url,
        site_key=site_key
    )
    return f"Token: {result.token} (solved in {result.solve_time})"

Use in Your Crew

Assign the tool to any agent. When they hit a CAPTCHA, they'll automatically call GateSolve.

from crewai import Agent, Task, Crew

# Create an agent with CAPTCHA solving capability
scraper = Agent(
    role="Web Scraper",
    goal="Extract data from protected websites",
    backstory="Expert at navigating web protections",
    tools=[solve_captcha],  # Add the GateSolve tool
)

task = Task(
    description="""Go to https://example.com/data and extract
    the pricing table. If blocked by a CAPTCHA, use the
    solve_captcha tool with the siteKey from the page source.""",
    agent=scraper,
    expected_output="Pricing data in JSON format"
)

crew = Crew(agents=[scraper], tasks=[task])
result = crew.kickoff()

MCP Server (Zero Code)

CrewAI supports MCP natively. Add GateSolve as an MCP server and your agents get CAPTCHA solving without any custom tool code.

# Or use GateSolve MCP server — works with CrewAI's MCP support
# Add to your MCP config:
{
  "mcpServers": {
    "gatesolve": {
      "command": "npx",
      "args": ["-y", "@gatesolve/mcp-server"],
      "env": {
        "GATESOLVE_API_KEY": "gs_your_key_here"
      }
    }
  }
}

# CrewAI agents with MCP support can call solve_captcha directly

Python SDK (Standalone)

Use GateSolve directly in any Python code — not just CrewAI.

from gatesolve import GateSolve

solver = GateSolve(api_key="gs_your_key_here")

# Solve any CAPTCHA by URL + siteKey
result = solver.solve(
    type="cloudflare-turnstile",
    page_url="https://example.com/login",
    site_key="0x4AAAAAAA..."
)

print(f"Token: {result.token}")  # inject into your form

How It Works

1

Agent encounters CAPTCHA

Your CrewAI agent navigates to a page protected by Cloudflare Turnstile or reCAPTCHA.

2

Tool calls GateSolve

The agent invokes the solve_captcha tool with the CAPTCHA type, siteKey, and URL.

3

Token returned

GateSolve solves it in 7-15 seconds and returns a valid token the agent injects to continue.

Cloudflare Turnstile

Most common on modern sites. $0.02/solve.

reCAPTCHA v2/v3

Google reCAPTCHA support. $0.03/solve.

hCaptcha

Privacy-focused CAPTCHA. $0.03/solve.

Why GateSolve for CrewAI

100 free solves

No credit card required. Get an API key in 30 seconds.

CrewAI @tool compatible

Works as a native CrewAI tool with type hints and docstrings.

MCP server

Listed in MCP Registry. Native CrewAI MCP support.

Python SDK

pip install gatesolve. Three lines of code.

Error taxonomy

correction_class tells your agent exactly what to do on failure.

Async API

Submit and poll. Non-blocking. Webhook callbacks available.

Start Solving CAPTCHAs in CrewAI

100 free solves. No credit card. 30-second setup.