Skip to content

Repository files navigation

LlamaIndex + CapSolver Agent examples

Demo repository CI License: ISC

Runnable LlamaIndex FunctionAgent examples powered directly by capsolver-agent.

Examples only: no llamaindex-capsolver PyPI package, duplicated SDK, or independent release lifecycle.

Repository scope

The demo converts ordinary async Python functions into LlamaIndex tools. Those functions delegate every operation to the shared CapSolver executor, keeping schemas, solving behavior, error handling, and browser support centralized.

Quick start

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

Export the keys in .env.example, then run python examples/quickstart.py.

Key integration code

from capsolver_agent import create_executor
from llama_index.core.agent.workflow import FunctionAgent

capsolver = create_executor()

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

agent = FunctionAgent(tools=[get_capsolver_balance], llm=llm)

See examples/quickstart.py for solving and balance tools.

Project layout

examples/quickstart.py   LlamaIndex FunctionAgent demo
requirements.txt         Shared SDK repositories and LlamaIndex
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 secrets or private target data.

Contributing, support, and license

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

LlamaIndex is a third-party project. This repository is maintained by CapSolver and is not affiliated with or endorsed by LlamaIndex.

About

Runnable LlamaIndex agent 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