Skip to content

agi-inc/agisdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ AGI SDK

πŸ“„ Paper β€’ πŸ“ Blog β€’ 🏒 AGI Inc β€’ πŸ† Leaderboard

PyPI version Python versions Downloads License

Build, evaluate, and level up your AI agents β€” for the real web.

REAL benchmark demo

✨ What is AGI SDK?

AGI SDK is a toolkit for building and evaluating AI browser agents in real-world environments.

It powers REAL Bench β€” the first high-fidelity benchmark for AI agents navigating modern websites like Amazon, DoorDash, Airbnb, and more.

πŸ”Ή Train agents to browse and interact with real apps
πŸ”Ή Benchmark agents with robust, standardized tasks
πŸ”Ή Submit to the leaderboard and see how your agents stack up!

TL;DR: Go from β€œidea” to β€œbenchmarked agent” in <60 seconds

πŸ› οΈ Installation (30 s)

# Install the SDK
pip install agisdk

# Install Playwright browser dependencies
playwright install --force

# Set your LLM API key (for evaluation)
export OPENAI_API_KEY="your-api-key"   # any supported provider key works

βœ… Supports OpenAI, Anthropic, OpenRouter, and custom models!

On Apple Silicon run brew install --cask playwright first.

⏱️ 60-second Quick-Start

Here's a minimal example to get you started for benchmarking an AI agent on the REAL Bench environment:

from agisdk import REAL

harness = REAL.harness(
    model="gpt-4o",       # any LLM tag
    task_type="omnizon",  # Amazon-like store
    headless=False        # watch it click in real-time!
)

print(harness.run())      # πŸŽ‰

Need more control? See full examples β€Ί

πŸ”₯ Features

  • Full-stack web replicas of top real-world apps (Amazon, Uber, Gmail, Airbnb, etc.)
  • Robust agent API: Observations, Actions, Memory, Errors
  • Leaderboard integration (REAL Bench)
  • Customizable harness: plug your own agents
  • Multi-model support: OpenAI, Anthropic, OpenRouter, or your own model
  • Parallel evaluation for faster experiments

Running Custom Agents

Checkout the README.md in the example folder. There are three examples of custom agents in the example directory:

  • example/starter.py: A simple example to get you started
  • example/custom.py: A more complex example with a custom agent
  • example/nova.py: For running custom agents which already have browsers running (in this case, Amazon NovaAct)

Additionally, there is a hackable example in example/hackable.py which is a can be configured for better performance and starting of.

Local Development

Only if you want to develop locally, you can install from source:

# Clone the repository
git clone https://github.com/agi-inc/agisdk.git
cd agisdk

# Install in development mode
pip install -e .

🌐 Available Tasks

The AGI SDK includes high-fidelity, fully-deterministic websites for agents to explore. These are modern web stack sites (React + Next.js) with rich functionality for core user flows, realistic mock data, and consistent behavior for testing and evaluation.

The benchmark includes these environments:

App Clone Task Prefix Example Use Case
πŸ›’ Amazon β†’ Omnizon webclones.omnizon-* Buy a laptop, find a gift
πŸ” DoorDash β†’ DashDish webclones.dashdish-* Order dinner
✈️ United β†’ FlyUnified webclones.fly-unified-* Book a flight
🏑 Airbnb β†’ Staynb webclones.staynb-* Reserve accommodation
πŸ“… Google Calendar β†’ GoCalendar webclones.gocalendar-* Schedule a meeting
πŸ“¬ Gmail β†’ GoMail webclones.gomail-* Compose an email
🍽️ OpenTable β†’ OpenDining webclones.opendining-* Book a restaurant
πŸ‘” LinkedIn β†’ NetworkIn webclones.networkin-* Accept a connection
πŸš— Uber β†’ Udriver webclones.udriver-* Book a ride
πŸ’Ό UpWork β†’ TopWork webclones.topwork-* Find a freelance gig
🏠 Zillow β†’ Zilloft webclones.zilloft-* Browse houses

Each task comes with human-written goals designed to stress-test agent capabilities.

πŸ”‘ API Keys

To use models from other providers, set their respective API keys:

# For Anthropic models (like sonnet-3.7)
export ANTHROPIC_API_KEY="your-anthropic-api-key"

πŸ‘οΈ Observation Structure

Your agent gets access to the following observation structure:

{
    'chat_messages': [...],          # History of chat messages
    'goal': "...",                   # Text description of the goal
    'goal_object': [...],            # Structured goal object with text and images
    'open_pages_urls': [...],        # List of open page URLs
    'active_page_index': 0,          # Index of the active page
    'url': "...",                    # Current URL
    'screenshot': np.array(...),     # Screenshot as numpy array
    'dom_object': {...},             # DOM structure
    'axtree_object': {...},          # Accessibility tree
    'extra_element_properties': {...}, # Additional element properties
    'focused_element_bid': "...",    # ID of the focused element
    'last_action': "...",            # Last action performed
    'last_action_error': "...",      # Error from last action (if any)
    'elapsed_time': 0.0,             # Time elapsed in the episode
    'browser': {...}                 # Playwright browser object (for direct control)
}

🎯 Actions

Actions are specified as strings in the format of function calls. Here are some commonly used actions:

# Navigation
"goto('https://www.google.com')"
"go_back()"
"go_forward()"

# Interaction
"click('element_id')"
"fill('input_id', 'text to enter')"
"press('Enter')"

# Communication
"send_msg_to_user('I found the answer: $42.99')"

# Reporting infeasible tasks
"report_infeasible('The requested item is out of stock')"

βš™οΈ Harness Configuration

The harness function accepts the following parameters:

REAL.harness(
    # Agent configuration (provide one of these)
    model="gpt-4o",                                # OpenAI models
    model="sonnet-3.7",                            # Anthropic models
    model="openrouter/deepseek/deepseek-chat-v3-0324", # OpenRouter models (with openrouter/ prefix)
    agentargs=MyAgentArgs(),                       # Or provide your own agent arguments

    # Task selection (provide one of these or don't provide any to run all tasks)
    task_name="webclones.omnizon-1",  # Specific task to run
    task_type="omnizon",              # Run all tasks of this type
    task_id=1,                        # Run specific task ID within a type

    # Browser configuration
    headless=False,                   # Whether to show the browser
    max_steps=25,                     # Maximum number of steps
    browser_dimensions=(1280, 720),   # Browser window dimensions

    # Observation options
    use_html=False,                   # Include HTML in observations
    use_axtree=True,                  # Include accessibility tree
    use_screenshot=True,              # Include screenshots

    # Leaderboard submission
    leaderboard=False,                # Whether to submit to leaderboard
    run_id="my_unique_id",            # Unique ID for the submission

    # Execution options
    num_workers=4,                    # Number of parallel workers
    use_cache=True,                   # Use cached results when available
    cache_only=False,                 # Only use cached results
    force_refresh=False,              # Force re-running tasks

    # Output options
    results_dir="./results"           # Where to store results
)

🀝 Contributing

We welcome contributions of all kinds:

Let's build the future of agents together. πŸ”₯

πŸ’¬ Community

⭐️ Why AGI SDK?

Because your agents deserve better than toy environments.
Because the real web is messy β€” and that's where the magic happens.
Because the future is agentic β€” and it starts here.

About

AGI SDK

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 7