This guide will help you get Agent Arena up and running in minutes.
Before starting, ensure you have:
- Godot 4.2+ installed (download)
- Python 3.11+ (download)
- CMake 3.20+ (download)
- C++ compiler (MSVC 2019+, GCC 9+, or Clang 10+)
- Git for cloning dependencies
git clone https://github.com/JustInternetAI/AgentArena.git
cd agent-arenaOn Windows:
scripts\setup_godot_cpp.batOn Linux/macOS:
chmod +x scripts/setup_godot_cpp.sh
./scripts/setup_godot_cpp.shcd godot
mkdir build
cd build
cmake ..
cmake --build . --config ReleaseThe compiled library will be in bin/[platform]/.
cd ../../python
python -m venv venvOn Windows:
venv\Scripts\activateOn Linux/macOS:
source venv/bin/activatepip install -r requirements.txtOptional: Install with specific feature sets:
# Development tools
pip install -e ".[dev]"
# LLM backends
pip install -e ".[llm]"
# Vector stores
pip install -e ".[vector]"
# Everything
pip install -e ".[dev,llm,vector]"Agent Arena works with local LLM models. Download a compatible model:
-
Create a models directory:
mkdir -p models cd models -
Download a GGUF model (example - Llama 2 7B):
# Using wget or curl wget https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/resolve/main/llama-2-7b-chat.Q4_K_M.gguf -
Update the config to point to your model:
# In configs/backend/llama_cpp.yaml backend: model_path: "models/llama-2-7b-chat.Q4_K_M.gguf"
Create a test script test_agent.py:
from agent_runtime import Agent, AgentRuntime, ToolDispatcher
from backends import LlamaCppBackend, BackendConfig
from tools import register_world_query_tools, register_movement_tools
# Initialize backend
config = BackendConfig(
model_path="models/llama-2-7b-chat.Q4_K_M.gguf",
temperature=0.7,
max_tokens=256,
)
backend = LlamaCppBackend(config)
# Create tool dispatcher
dispatcher = ToolDispatcher()
register_world_query_tools(dispatcher)
register_movement_tools(dispatcher)
# Create agent
agent = Agent(
agent_id="test_agent",
backend=backend,
tools=list(dispatcher.schemas.keys()),
goals=["Explore the environment", "Collect resources"],
)
# Simulate perception
observation = {
"position": [0.0, 0.0, 0.0],
"visible_entities": [
{"id": "tree_1", "type": "tree", "position": [5.0, 0.0, 3.0]},
{"id": "rock_1", "type": "rock", "position": [8.0, 0.0, -2.0]},
],
}
agent.perceive(observation)
# Get decision
action = agent.decide_action()
print(f"Agent decided: {action}")
# Execute tool
if action and action.tool_name != "none":
result = dispatcher.execute_tool(action.tool_name, action.parameters)
print(f"Tool result: {result}")Run it:
python test_agent.py- Open Godot 4
- Import the project (select the
agent-arenafolder) - Wait for initial import to complete
- Open the test scene:
scenes/foraging/foraging.tscn - Press F5 to run the scene
Run the test suite:
cd tests
pytest -vSee docs/creating_agents.md for a detailed tutorial.
Edit configs/config.yaml to customize:
- Tick rate and determinism
- Agent runtime settings
- Logging configuration
- Scene parameters
See docs/adding_tools.md for instructions on creating custom tools.
cd python/evals
python run_eval.py --scene foraging --agents 5 --trials 10If you get "Failed to load model":
- Check that the model path is correct
- Ensure you have enough RAM (7B models need ~8GB)
- Try a smaller quantized model (Q4_K_S instead of Q4_K_M)
If CMake fails:
- Ensure godot-cpp was cloned properly:
git submodule update --init --recursive - Check CMake version:
cmake --version(need 3.20+) - On Windows, use Visual Studio 2019+ or 2022
If imports fail:
- Ensure virtual environment is activated
- Reinstall requirements:
pip install -r requirements.txt --force-reinstall
If Godot doesn't recognize the module:
- Check that the
.gdextensionfile is in the godot/ folder - Verify the compiled library is in
bin/[platform]/ - Restart Godot Editor
- Documentation: docs/
- GitHub Issues: github.com/JustInternetAI/AgentArena/issues
- Discussions: github.com/JustInternetAI/AgentArena/discussions
- Explore the architecture documentation
- Read about agent design patterns
- Check out example scenes
- Join the community!