Python SDK for building ARC-AGI-3 agents
Project description
arc-agi-3
Python SDK for building ARC-AGI-3 agents.
ARC-AGI-3 is an Interactive Reasoning Benchmark designed to measure an AI Agent's ability to generalize in novel, unseen environments. By building agents that can play ARC-AGI-3, you're directly contributing to the frontier of AI research.
Installation
# Core installation (Random agent only)
pip install arc-agi-3
# With OpenAI support (LLM-based agents)
pip install arc-agi-3[openai]
# With LangGraph support
pip install arc-agi-3[langgraph]
# With SmolAgents support
pip install arc-agi-3[smolagents]
# With AgentOps observability
pip install arc-agi-3[agentops]
# Everything
pip install arc-agi-3[all]
Quick Start
1. Get an API Key
- Go to three.arcprize.org
- Create an account and get your API key
- Set it as an environment variable:
export ARC_API_KEY="your-api-key-here"
Or create a .env file:
ARC_API_KEY=your-api-key-here
2. Run an Agent
Using the CLI:
# Run a random agent on the ls20 game
arc-agi-3 --agent=random --game=ls20
# Run with tags for tracking
arc-agi-3 --agent=random --game=ls20 --tags=experiment,v1.0
# List available agents
arc-agi-3 --list-agents
Or programmatically:
from arc_agi_3 import Swarm, AVAILABLE_AGENTS
# Run a swarm of agents
swarm = Swarm(
agent="random",
ROOT_URL="https://three.arcprize.org",
games=["ls20"],
tags=["my-experiment"],
)
scorecard = swarm.main()
print(f"Final score: {scorecard.score}")
Available Agents
| Agent | Extra Required | Description |
|---|---|---|
random |
None | Random action selection |
llm |
openai |
Basic LLM agent using GPT-4o-mini |
fastllm |
openai |
LLM agent without observation step |
reasoningllm |
openai |
LLM with o4-mini reasoning |
guidedllm |
openai |
LLM with game-specific guidance |
reasoningagent |
openai |
Hypothesis-driven reasoning agent |
langgraphrandom |
langgraph |
Random agent using LangGraph workflow |
langgraphfunc |
langgraph |
LangGraph functional API agent |
langgraphtextonly |
langgraph |
LangGraph without image frames |
smolcodingagent |
smolagents |
SmolAgents CodeAgent |
smolvisionagent |
smolagents |
SmolAgents with vision |
Building Your Own Agent
Subclass the Agent base class:
from arc_agi_3 import Agent
from arc_agi_3._structs import FrameData, GameAction, GameState
class MyAgent(Agent):
MAX_ACTIONS = 80
def is_done(self, frames: list[FrameData], latest_frame: FrameData) -> bool:
return latest_frame.state is GameState.WIN
def choose_action(
self,
frames: list[FrameData],
latest_frame: FrameData,
) -> GameAction:
# Your logic here
if latest_frame.state in [GameState.NOT_PLAYED, GameState.GAME_OVER]:
return GameAction.RESET
# Choose an action based on the frame data
action = GameAction.ACTION1
action.reasoning = "My reasoning for this action"
return action
Environment Variables
| Variable | Description | Default |
|---|---|---|
ARC_API_KEY |
Your ARC-AGI-3 API key | Required |
SCHEME |
HTTP scheme | https |
HOST |
API host | three.arcprize.org |
PORT |
API port | (standard) |
RECORDINGS_DIR |
Directory for session recordings | . |
AGENTOPS_API_KEY |
AgentOps API key for observability | Optional |
OPENAI_API_KEY |
OpenAI API key for LLM agents | Required for LLM agents |
DEBUG |
Enable debug logging | False |
Data Structures
GameAction
Available actions:
RESET- Start or restart a gameACTION1- Simple action (typically Up/W)ACTION2- Simple action (typically Down/S)ACTION3- Simple action (typically Left/A)ACTION4- Simple action (typically Right/D)ACTION5- Simple action (typically Enter/Space)ACTION6- Complex action with x,y coordinates (Click/Point)ACTION7- Simple action
GameState
NOT_PLAYED- Game hasn't startedNOT_FINISHED- Game in progressWIN- Game wonGAME_OVER- Game lost
FrameData
Each frame contains:
game_id- The game identifierframe- 3D list of grid data (list of 2D grids)state- Current GameStatescore- Current score (0-254)available_actions- List of valid actions for this state
Links
License
MIT License - see the original ARC-AGI-3-Agents repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arc_agi_3-0.0.1.tar.gz.
File metadata
- Download URL: arc_agi_3-0.0.1.tar.gz
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dad64e387295c24cba5ecedbf0fe22a07771d2d29e2bb17b9417d25fd658ceb0
|
|
| MD5 |
9767cfdbf5b3d5e9e8465467888d4061
|
|
| BLAKE2b-256 |
ae6afbc30dfbed17a033a3f94385c7af395e692379593b4d252c37590e28e1ed
|
File details
Details for the file arc_agi_3-0.0.1-py3-none-any.whl.
File metadata
- Download URL: arc_agi_3-0.0.1-py3-none-any.whl
- Upload date:
- Size: 35.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5cdb7bf4262d87ce6e6c6bf49c592dce3146e9f33992e1d1d486a696064c8c3
|
|
| MD5 |
42dd131539d5936910fd17e2a5722ca8
|
|
| BLAKE2b-256 |
31dbbf8d5c5de77af6c12d203f35464564371a16c54007e3cd7a23a26f450619
|