AI-driven text adventure: the agent chooses actions in a small dungeon (LLM required).
From the elizaOS repository root:
bun install
export OPENAI_API_KEY=your_key_herecd packages/examples/text-adventure
bun install
# Quieter logs
LOG_LEVEL=fatal bun run game.ts
# Optional persistent DB
PGLITE_DATA_DIR=./adventure-db LOG_LEVEL=fatal bun run game.tsbun testThe test suite exercises the local dungeon engine with a deterministic no-LLM
playthrough. Running the interactive or autonomous CLI still requires
OPENAI_API_KEY.
- Multiple rooms, items, and enemies
- Autonomous or guided play (see
game.tsfor flags) - Uses
ModelType.TEXT_SMALLfor action selection
packages/examples/chat/chat.ts— CLI chatpackages/examples/tic-tac-toe/game.ts— no-LLM minimax demopackages/examples/game-of-life/game.ts— no-LLM multi-agent simulation