Skip to content

Agentic AI Dungeon Game

Using this tutorial, you will build an Agentic AI-powered dungeon adventure game with @aws/nx-plugin. This tutorial does not assume any existing knowledge of the @aws/nx-plugin or related technologies. The techniques you’ll learn in this tutorial will help:

  • Build any @aws/nx-plugin based application,
  • Provide a deep understanding of the @aws/nx-plugin, and
  • Get a basic understanding of how to use the NX framework.

At the end of the tutorial, you will 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, and
  • create and deploy CDK infrastructure.

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

The game interface will resemble something like this diagram:

game-select.png
game-conversation.png

The Agentic AI-powered dungeon adventure game is built using the following 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.

Before you proceed, you will need the following global dependencies:

  • 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