@cloudbase/ag-examples-agents-server
v0.0.5-test
Published
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.
Maintainers
Keywords
Readme
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 installpnpm run build
2. Prepare Server Environment Variables
In this directory (AG-Kit/typescript-sdk/packages/examples/agents/server):
- Copy
.env.exampleto.env(or create.envmanually) - Set the required variables:
OPENAI_API_KEYOPENAI_MODELOPENAI_BASE_URL
3. Install, Build, and Start the Server
Still inside AG-Kit/typescript-sdk/packages/examples/agents/server, run:
pnpm installpnpm run buildpnpm 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
# From the typescript-sdk root directory cd ../../../ pnpm install pnpm buildPrepared Environment Variables
# Copy and configure environment variables cp .env.example .env # Edit .env and set your OPENAI_API_KEY
Building and Running with Docker
Build the Docker Image
# From the server directory docker build -t ag-kit-server .Run the Container
# Run with environment variables docker run -p 9000:9000 \ -e OPENAI_API_KEY=your_api_key_here \ -e NODE_ENV=production \ ag-kit-server # Or run with .env file docker run -p 9000:9000 --env-file .env ag-kit-serverAccess the Server
- Server will be available at
http://localhost:9000 - Health check endpoint:
http://localhost:9000/health
- Server will be available at
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
