A multi-agent text adventure game built for Azure with Redis, LangGraph.js, and Agent Memory Server.
In this game, multiple AI agents (location, items, NPCs) independently react to player input. Each agent contributes specialized knowledge—locations provide environmental context, items offer interaction possibilities, NPCs deliver character-driven responses—while an arbiter synthesizes all agent responses into a single, coherent game experience. This collaborative approach creates richer, more dynamic storytelling than single-agent systems.
While this example is for a game, multi-agent collaboration (MAC) has powerful applications beyond gaming. For example, a customer support chatbot could use specialized agents to handle different aspects of a customer request—one agent analyzes technical issues, another handles billing questions, and a third manages escalations—with an arbiter providing unified responses to customers.
You can read more about multi-agent collaboration in the LangGraph documentation.
- Node.js v20.x (run
nvm useif you have nvm installed) - Docker
- OpenAI API key (required for AI functionality)
- Copy configuration files:
cp .env.example .env
cp functions/ana-api/local.settings.example.json functions/ana-api/local.settings.jsonThen edit both .env and local.settings.json to add your OpenAI API key.
- Start services
docker compose up- Install dependencies and start development:
npm install
npm run dev- Frontend: http://localhost:4280 (Static Web App CLI)
- Admin: http://localhost:4281 (Admin interface)
- API: http://localhost:7071/api/\* (Azure Functions)
- Agent Memory Server: http://localhost:8000 (Redis AMS)
- Redis: localhost:6379
This is a TypeScript monorepo built with npm workspaces:
shared/ana-types/(@ana/types) - Pure TypeScript types and Zod schemasshared/ana-common/(@ana/common) - Shared utilities, Redis/LLM clients, admin functionsshared/ana-domain/(@ana/domain) - Entity classes and game state managementshared/ana-agents/(@ana/agents) - Complete multi-agent LangGraph system
static-web-apps/ana-web/(@ana/web) - Svelte 5 frontend with terminal-style game interfacefunctions/ana-api/(@ana/api) - Azure Functions v4 API endpointsstatic-web-apps/ana-admin/(@ana/admin) - Admin interface for logs and template management
containers/agent-memory-server/- Containerized Agent Memory Server (working memory)data/redis/- Persistent Redis data storage for local developmentinfrastructure/- Infrastructure as Code (Bicep templates for Azure deployment)