Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions START_CLAUDE.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
@echo off
REM Agent Arena - Claude Agent (Anthropic API)
REM Starts the Python IPC server with Claude as the decision-making LLM
REM Then open Godot, load scenes/foraging.tscn, press F5, then SPACE

echo ========================================
echo Agent Arena - Claude Agent (Anthropic)
echo ========================================
echo.

REM Check for API key
if "%ANTHROPIC_API_KEY%"=="" (
echo ERROR: ANTHROPIC_API_KEY is not set!
echo.
echo To set it permanently ^(recommended, only need to do this once^):
echo 1. Start menu ^> search "environment variables"
echo 2. Edit the system environment variables ^> Environment Variables
echo 3. Under User variables ^> New
echo 4. Name: ANTHROPIC_API_KEY Value: sk-ant-...
echo.
echo Or set it for this session only:
echo set ANTHROPIC_API_KEY=sk-ant-...
echo.
echo Get a key at: https://console.anthropic.com
pause
exit /b 1
)

cd /d "%~dp0"

REM Check if .venv exists (project root venv)
if exist ".venv\" (
echo Activating .venv...
call .venv\Scripts\activate.bat
goto :check_deps
)

REM Check if python/venv exists (legacy venv)
if exist "python\venv\" (
echo Activating python\venv...
call python\venv\Scripts\activate.bat
goto :check_deps
)

echo ERROR: No Python virtual environment found!
echo Please run: python -m venv .venv
echo Then install dependencies: .venv\Scripts\pip install agent-arena-sdk anthropic
pause
exit /b 1

:check_deps
REM Check if required packages are installed
python -c "import agent_arena_sdk, anthropic" 2>nul
if errorlevel 1 (
echo.
echo Installing required packages...
pip install agent-arena-sdk anthropic
if errorlevel 1 (
echo.
echo Failed to install dependencies.
pause
exit /b 1
)
)

echo.
echo Model : claude-sonnet-4-20250514 (change with --model flag)
echo Server : http://127.0.0.1:5000
echo Debug : http://127.0.0.1:5000/debug
echo Cost : ~$0.10 per 100-tick run (Sonnet)
echo.
echo Next steps:
echo 1. Open Godot and load scenes/foraging.tscn
echo 2. Press F5 to run the scene
echo 3. Press SPACE to start the simulation
echo.
echo Press Ctrl+C to stop the server
echo ========================================
echo.

cd /d "%~dp0\starters\claude"
python run.py --debug %*

REM If server exits, pause so user can see error
if errorlevel 1 (
echo.
echo Server exited with error!
pause
)
9 changes: 5 additions & 4 deletions START_IPC_SERVER.bat
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
@echo off
REM Agent Arena - Foraging Demo Startup Script
REM Starts the Python IPC server with the beginner agent (new SDK pattern)
REM Then open Godot, load scenes/foraging.tscn, press F5, then SPACE
REM Agent Arena - IPC Server (Local LLM)
REM This is the original startup script. For clarity, you can also use:
REM START_LOCAL_LLM.bat - Same as this (local llama.cpp model)
REM START_CLAUDE.bat - Uses Anthropic Claude API instead

echo ========================================
echo Agent Arena - Foraging Demo (New SDK)
echo Agent Arena - Local LLM Agent
echo ========================================
echo.

Expand Down
62 changes: 62 additions & 0 deletions START_LOCAL_LLM.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
@echo off
REM Agent Arena - Local LLM Agent
REM Starts the Python IPC server with the local LLM agent (llama.cpp)
REM Then open Godot, load scenes/foraging.tscn, press F5, then SPACE

echo ========================================
echo Agent Arena - Local LLM Agent
echo ========================================
echo.

cd /d "%~dp0\python"

REM Check if venv exists
if not exist "venv\" (
echo ERROR: Python virtual environment not found!
echo Please run: python -m venv venv
echo Then install dependencies: venv\Scripts\pip install -r requirements.txt
pause
exit /b 1
)

REM Activate venv
echo Activating Python virtual environment...
call venv\Scripts\activate.bat

REM Check if required packages are installed
python -c "import fastapi, uvicorn" 2>nul
if errorlevel 1 (
echo.
echo ERROR: Required packages not installed!
echo Installing dependencies...
pip install fastapi uvicorn
if errorlevel 1 (
echo.
echo Failed to install dependencies.
pause
exit /b 1
)
)

echo.
echo Starting Local LLM Agent (llama.cpp)...
echo Server will be available at: http://127.0.0.1:5000
echo Debug inspector at: http://127.0.0.1:5000/debug
echo.
echo Next steps:
echo 1. Open Godot and load scenes/foraging.tscn
echo 2. Press F5 to run the scene
echo 3. Press SPACE to start the simulation
echo.
echo Press Ctrl+C to stop the server
echo ========================================
echo.

python run_foraging_demo.py

REM If server exits, pause so user can see error
if errorlevel 1 (
echo.
echo Server exited with error!
pause
)
20 changes: 5 additions & 15 deletions python/agent_runtime/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"""
Agent Arena - Agent Runtime Module
Agent Arena - Agent Runtime Module (DEPRECATED)

This module provides the core agent runtime infrastructure for LLM-driven agents.

NOTE: After LDX refactor (Issue #60), behavior base classes and memory systems
have been moved to starter templates. Use agent-arena-sdk for new projects.
DEPRECATED: Use agent_arena_sdk for new projects. Shared types (Observation,
EntityInfo, etc.) are re-exported from the SDK. V1-only classes (AgentDecision,
WorldObject, SimpleContext) are still available here.
"""

from .agent import Agent
from .arena import AgentArena
from .reasoning_trace import (
# Backwards compatibility
DecisionCapture,
Expand All @@ -27,17 +27,13 @@
from .runtime import AgentRuntime
from .schemas import (
AgentDecision,
Constraint,
EntityInfo,
Goal,
HazardInfo,
ItemInfo,
Metric,
MetricDefinition,
Objective,
Observation,
ResourceInfo,
ScenarioDefinition,
SimpleContext,
ToolSchema,
)
Expand All @@ -46,7 +42,6 @@
__all__ = [
# Core
"Agent",
"AgentArena",
"AgentRuntime",
"ToolDispatcher",
# Tracing (new API)
Expand All @@ -63,7 +58,7 @@
"InspectorStage",
"get_global_inspector",
"set_global_inspector",
# Observation/Decision schemas
# Observation/Decision schemas (re-exported from SDK)
"Observation",
"AgentDecision",
"SimpleContext",
Expand All @@ -72,11 +67,6 @@
"ResourceInfo",
"HazardInfo",
"ItemInfo",
# Scenario schemas
"ScenarioDefinition",
"Goal",
"Constraint",
"Metric",
# Objective system (Issue #60)
"Objective",
"MetricDefinition",
Expand Down
Loading
Loading