Agentic Chat Example Server
Follow these steps to run the LangGraph agent backend that powers the Agentic Chat example. Commands assume you are in the monorepo root unless noted.
1. Build the Monorepo Packages
From the TypeScript workspace root (AG-Kit/typescript-sdk):
pnpm install
pnpm run build
2. Prepare Server Environment Variables
In this directory (AG-Kit/typescript-sdk/packages/examples/agents/server):
- Copy
.env.example to .env (or create .env manually)
- Set the required variables:
OPENAI_API_KEY
OPENAI_MODEL
OPENAI_BASE_URL
3. Install, Build, and Start the Server
Still inside AG-Kit/typescript-sdk/packages/examples/agents/server, run:
pnpm install
pnpm run build
pnpm run start
The server exposes endpoints under /v1/aibot/bots/ that the web frontend consumes.
Docker Deployment
Prerequisites
Before building the Docker image, ensure you have:
-
Built the entire monorepo locally
cd ../../../
pnpm install
pnpm build
-
Prepared Environment Variables
cp .env.example .env
Building and Running with Docker
Docker Features
- Workspace Support: Includes all workspace dependencies in the image
- Pre-built: All dependencies and built files are included
- Performance: Alpine Linux base image for smaller size
- Simple: No build process required in container