π Automate repetitive browser tasks!
Try it yourself:
curl -X POST http://localhost:3000/runs \ -H "Content-Type: application/json" \ -d '{ "task": "Go to https://webagent.cloud and explain what the platform does." }' The universal connector for web agents :
- π Integrate into any app with our API
- π Multiple LLM compatibility
- π Supports multiple Browsers providers
- π Host on your infrastructure
- π½ Store and retrieve results in database
- πͺ Get notified of results with webhooks
- ποΈ Structure results with JSON Schema
- Make sure you have Python 3.12+ installed.
- Install the dependencies:
pip install -r requirements.txt- Configure your
.envfile with the necessary environment variables (API keys, etc.) Add your API keys for the provider you want to use to your .env file.
OPENAI_API_KEY= ANTHROPIC_API_KEY= AZURE_ENDPOINT= AZURE_OPENAI_API_KEY= GEMINI_API_KEY= DEEPSEEK_API_KEY= GROK_API_KEY= NOVITA_API_KEY= - Run the server
python server.py- Build the Docker image:
docker build -t webagent .- Run the container:
docker run -p 8080:8080 --env-file .env webagentThe Docker image includes all necessary dependencies, including Playwright for browser automation.
-
Configure your environment variables in the
docker-compose.ymlfile or in a.envfile. -
Start the service:
docker-compose uppython server.py# Using Docker docker run -p 8080:8080 --env-file .env webagent # Using Docker Compose docker-compose upThe server will start at http://localhost:8080
Once the server is started, you can access the interactive API documentation at:
- http://localhost:8080/docs (Swagger UI)
- http://localhost:8080/redoc (ReDoc)
Endpoint: POST /runs
Request body:
{ "task": "go to this site https://example.com and retrieve the page title", "provider": "openai", "model": "o3" }Response:
{ "history": [ { "is_done": true, "success": true, "extracted_content": "Example Domain", "error": null, "include_in_memory": false } ], "result": "Example Domain", "is_done": true, "is_successful": true, "status": "success" }# Execute a task curl -X 'POST' \ 'http://localhost:8080/run' \ -H 'Content-Type: application/json' \ -d '{ "task": "go to this site https://example.com and retrieve the page title", "model": "o3", "provider": "openai" }'import requests # Base URL of the API base_url = "http://localhost:8080" # Execute a task response = requests.post( f"{base_url}/run", json={ "task": "go to this site https://example.com and retrieve the page title", "model": "o3", "provider": "openai" } ) # Print the response print(f"Response: {response.json()}")