Skip to content

Agentic AI Dungeon Game

You will build an Agentic AI-powered dungeon adventure game during this tutorial. This tutorial does not assume any existing knowledge of the @aws/nx-plugin or related technologies. The techniques you’ll learn in this tutorial are fundamental to building any @aws/nx-plugin based application, and fully understanding it will give you a deep understanding of the @aws/nx-plugin and a basic understanding of how to use NX.

Users who complete this tutorial can expect to walk away with the knowledge to:

  • use the @aws/nx-plugin to create new applications
  • use NX to manage/build their codebase
  • build APIs using tRPC
  • build Agents using Strands
  • build MCP servers in TypeScript
  • use Tanstack router to create new pages
  • use Tanstack query to call backend APIs
  • create and deploy CDK infrastructure

In this tutorial, you’ll build an Agentic AI-powered dungeon adventure game with @aws/nx-plugin.

You can see what it will look like when you’re finished here:

game-select.png
game-conversation.png

The Agentic AI-powered dungeon adventure game will be built using the following component architecture:

dungeon-game-architecture.png
  • React/Vite frontend website utilising:
    • Amazon Cognito/Identity Pools for secure API calls
    • Tanstack router which supports type-safe file based routing
    • Generated SDKs for calling the Game API
  • tRPC API which uses ElectroDB/DynamoDB for managing the game state
  • Strands Agent hosted on Amazon Bedrock AgentCore for running the game
  • TypeScript MCP Server hosted on Amazon Bedrock AgentCore for the agent to manage the player’s inventory
  • CDK infrastructure to deploy the application

The following global dependencies are needed before proceeding:

  • Git
  • Node >= 22 (We recommend using something like NVM to manage your node versions)
    • verify by running node --version
  • PNPM >= 10 (you can also use Yarn >= 4, Bun >= 1, or NPM >= 10 if you prefer)
    • verify by running pnpm --version, yarn --version, bun --version or npm --version
  • UV >= 0.5.29
    1. install Python 3.12 by running: uv python install 3.12.0
    2. verify with uv python list --only-installed
  • AWS Credentials configured to your target AWS account (where your application will be deployed)
  • Docker is required for building the AgentCore components
  • Ensure your AWS account has enabled access to the Strands default model within Bedrock for your target region via the steps outlined in this guide. At the time of writing this is Anthropic Claude Sonnet 4.