A Python library for computer automation using OpenAGI's Lux model - the world's best foundation computer-use model.
This project provides a comprehensive framework for implementing computer use automation using the Lux model. It includes modules for:
- Web Automation - Form filling, data scraping, web research
- QA Testing - Automated UI testing, validation, regression testing
- Data Processing - Bulk data entry, report generation
| Model | Online-Mind2Web Score |
|---|---|
| Lux (OpenAGI) | 83.6 |
| Google Gemini CUA | 69.0 |
| OpenAI Operator | 61.3 |
| Anthropic Claude Sonnet 4 | 61.0 |
Key Advantages:
- ~1 second per step (3x faster than competitors)
- 10x cheaper per token
- Works across any desktop application (not browser-only)
# Install the OAGI SDK
pip install oagi
# Enable permissions (required for desktop automation)
oagi agent permissionmacOS Users: Grant Accessibility and Screen Recording permissions in System Settings > Privacy & Security.
-
Get your API key at developer.agiopen.org (includes $10 free credits)
-
Set environment variables:
export OAGI_API_KEY=sk-your-api-key-here
export OAGI_BASE_URL=https://api.agiopen.orgOr create a .env file:
OAGI_API_KEY=sk-your-api-key-here
OAGI_BASE_URL=https://api.agiopen.orgRun your first agent in one command:
oagi agent run "Go to https://agiopen.org" --model lux-actor-1See the full Quickstart Guide for desktop setup tips and troubleshooting.
import asyncio
from oagi import AsyncDefaultAgent, AsyncPyautoguiActionHandler, AsyncScreenshotMaker
async def main():
agent = AsyncDefaultAgent(max_steps=10)
completed = await agent.execute(
"Open Chrome and search Google for 'OpenAGI Lux'",
action_handler=AsyncPyautoguiActionHandler(),
image_provider=AsyncScreenshotMaker(),
)
print(f"Task completed: {completed}")
asyncio.run(main())agiopen/
├── docs/ # Documentation
│ ├── lux-overview.md # Model overview and capabilities
│ ├── sdk-reference.md # SDK API reference
│ ├── use-cases.md # Implementation guides
│ └── api-examples.md # Code snippets
├── src/ # Source code
│ ├── config.py # Configuration management
│ ├── web_automation/ # Web automation modules
│ ├── qa_testing/ # QA testing modules
│ └── data_processing/ # Data processing modules
├── examples/ # Demo scripts
│ ├── basic_usage.py
│ ├── web_automation_demo.py
│ ├── qa_testing_demo.py
│ └── data_processing_demo.py
├── tests/ # Test files
├── requirements.txt # Python dependencies
├── .env.example # Environment template
└── README.md # This file
Fast execution for clearly-specified tasks (~1 second per step).
agent = AsyncDefaultAgent(max_steps=10, model="lux-actor-1")
await agent.execute("Click the Submit button")Handles complex, multi-step goals with automatic decomposition.
agent = AsyncDefaultAgent(max_steps=50, model="lux-thinker-1")
await agent.execute("Research AI trends and create a summary report")Maximum control with explicit task lists and retry logic.
agent = AsyncDefaultAgent(max_steps=30, model="lux-tasker-1")
await agent.execute("""
Execute these steps:
1. Navigate to the dashboard
2. Export the report
3. Save to Downloads folder
""")from src.web_automation import FormFiller
from src.web_automation.form_filler import FormField
filler = FormFiller()
result = await filler.fill_form(
url="https://example.com/contact",
fields=[
FormField("Name", "John Doe"),
FormField("Email", "john@example.com"),
]
)from src.qa_testing import TestRunner, TestCase
from src.qa_testing.test_runner import TestStep
runner = TestRunner()
test = TestCase(
name="Login Test",
description="Verify login flow",
steps=[
TestStep("Enter credentials", "Type username and password"),
TestStep("Submit", "Click login button"),
]
)
result = await runner.run_test(test)from src.data_processing import BulkDataEntry
from src.data_processing.bulk_entry import EntryRecord
entry = BulkDataEntry()
result = await entry.enter_records(
url="https://crm.example.com/contacts/new",
records=[
EntryRecord({"Name": "John", "Email": "john@example.com"}),
EntryRecord({"Name": "Jane", "Email": "jane@example.com"}),
]
)# Basic usage
python examples/basic_usage.py
# Web automation demo
python examples/web_automation_demo.py
# QA testing demo
python examples/qa_testing_demo.py
# Data processing demo
python examples/data_processing_demo.py# CVS Appointment Booking
python examples/cvs_appointment_booking.py \
--first-name "John" \
--last-name "Doe" \
--phone "555-123-4567" \
--email "john@example.com" \
--birthdate "1990-01-15" \
--zip-code "10001"
# Amazon Product Search
python examples/amazon_product_search.py \
--product "wireless headphones" \
--sort-by "best-sellers" \
--max-products 10
# Nuclear Player QA Testing
python examples/nuclear_player_qa.py --verify-all-pages
python examples/nuclear_player_qa.py --test-playback
python examples/nuclear_player_qa.py --all# AAPL Insider Activity (NASDAQ)
python examples/aapl_insider_activity.py --symbol AAPL
python examples/aapl_insider_activity.py --symbols AAPL MSFT GOOGL
# Healthcare to CoveredCA
python examples/healthcare_coveredca.py --zip-code 90210
python examples/healthcare_coveredca.py --zip-code 94102 --household-size 3 --income 80000
# Nike Shopping
python examples/nike_shopping.py --product "running shoes" --size 10
python examples/nike_shopping.py --product "air max" --size 9 --color black --add-to-cart# Simple task
oagi agent run "Go to google.com" --model lux-actor-1
# Complex task
oagi agent run "Research AI news and summarize" --model lux-thinker-1
# With verbose output
oagi agent run "Fill the contact form" --verboseSee the docs/ directory for detailed documentation:
- Quickstart Guide - Get running in 5 minutes
- Lux Overview - Model capabilities and modes
- SDK Reference - API documentation
- Use Cases - Implementation guides
- API Examples - Code snippets
- Official Examples - Complete official examples from OpenAGI
- OSGym Setup - Infrastructure setup guide
MIT License - See LICENSE file for details.