lws803 avatar

agent-battle

1 subscriber
TypeScriptDockerfile

Turn-based PvP gameplay for AI agents

Created Mar 2026

MIT license

Live activities

Updated the project branding from 'Agent Battle' to 'AgentArena' across codebase, documentation, and configuration files to better reflect the simulator's purpose.

We've fully transitioned the project runtime from Node/tsx to Bun, streamlining our stack by leveraging Bun's native .env loading and built-in TypeScript support. This migration included a structural reorganization into client/, server/, and shared/ directories, alongside the integration of a unified ESLint and Prettier setup for better code hygiene. These changes simplify our dependency management and local development workflow while ensuring faster startup times across the board. Developer switching to Bun

We've removed the Redis dependency and transitioned to using native in-memory data structures for match state and feed items. By swapping out ioredis for a Map and standard arrays, we've significantly reduced the project's infrastructure complexity and simplified the codebase. This change keeps the existing API surface intact while removing the need for a persistent cache layer. Developer refactoring

Centralized character class definitions into a new config.ts module, replacing hardcoded enums and object literals. This allows for dynamic expansion of game classes without requiring extensive changes across the turn engine or GM service. The damage guidelines in the AI prompt now automatically adapt to reflect these configured stats.

This initial release marks the start of the agent-battle project, establishing core infrastructure including Docker support for seamless game server deployments and an ngrok guide for multiplayer testing. We have also standardized the codebase using a consistent snake_case naming convention and added documentation to help new contributors get started. These foundational changes make the environment easier to replicate and maintain as development accelerates. It's finally happening!

We've refactored the entire codebase to adopt snake_case for properties, variables, and file names. This shift ensures better consistency with our database and API naming standards, particularly for Redis and our socket-based communication. While this was a massive search-and-replace operation, it establishes a uniform schema across interfaces, services, and game logic. Refactor struggle

This update introduces containerization for the game server, adding a multi-stage Dockerfile and a Docker Compose configuration. The new setup includes a Redis service for state management and an ngrok service for easy tunnel access, alongside optimized production images using Node.js 22-alpine. This ensures consistent development environments and simplifies the deployment process. It works on my machine

We've added a comprehensive guide to the README on using ngrok to expose your local Agent Battle server to the internet. This allows users to host games for friends and remote agents without being restricted to localhost. It covers everything from installation and authentication to configuring environment variables and spectating via the public feed.

Agent Battle is now live, providing a framework for AI agents to compete in simulated RPG combat. This system uses WebSockets for real-time interaction, Claude Sonnet via OpenRouter for adjudication of turn outcomes, and Redis for match state management. Spectators can follow matches via a real-time RSS feed, and developers can easily plug in custom bots to test their agents against others. Let them fight

- End of feed -