Skip to content

Repository files navigation

OpenAI Agents SDK + CapSolver Agent examples

Demo repository CI License: ISC

Runnable OpenAI Agents SDK examples using the official capsolver-agent executor.

Examples only: this repository does not publish an additional Python library.

Repository scope

The demo uses OpenAI Agents SDK function tools as a thin framework boundary. Tool execution, schemas, supported CAPTCHA types, retries, and errors remain centralized in CapSolver Agent and Core.

Quick start

git clone https://github.com/capsolver-ai/openai-agent-capsolver.git
cd openai-agent-capsolver
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt

Export .env.example values, then run python examples/quickstart.py.

Key integration code

from agents import Agent, function_tool
from capsolver_agent import create_executor

capsolver = create_executor()

@function_tool
async def get_capsolver_balance() -> str:
    return str(await capsolver.execute("get_balance", {}))

agent = Agent(name="CapSolver demo", tools=[get_capsolver_balance])

See examples/quickstart.py for the complete runner flow and a solve tool.

Project layout

examples/quickstart.py   OpenAI agent, runner, and function tools
requirements.txt         Shared SDK repositories plus openai-agents
tests/test_demo.py        Offline validation
.github/workflows/ci.yml  Demo checks

Documentation

Responsible use

Use the example only for lawful, user-authorized workflows that respect target-site terms. Never commit API keys or private target data.

Contributing, support, and license

See CONTRIBUTING.md, SUPPORT.md, and SECURITY.md. Licensed under the ISC License.

OpenAI and the OpenAI Agents SDK are third-party to this repository. This project is maintained by CapSolver and is not affiliated with or endorsed by OpenAI.

About

Runnable OpenAI Agents SDK examples using the CapSolver Agent library.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages