Run with Docker Compose 🚀🧑💻
Setup CAIPE to run in a docker environment on a laptop or a virtual machine like EC2 instance.
Prerequisites
-
Clone the repository
git clone https://github.com/cnoe-io/ai-platform-engineering.git
cd ai-platform-engineering -
Configure environment variables
cp .env.example .envUpdate
.envwith your configuration. For detailed.envexamples and LLM provider setup, see:- Setup LLM Providers for LLM configuration
- Quick Start Guide for detailed
.envexamples and agent-specific configurations
-
Configure A2A Authentication (Optional)
The A2A protocol supports two authentication methods. Choose one based on your security requirements:
Option A: OAuth2 Authentication (Recommended for Production)
Add the following to your
.envfile:A2A_AUTH_OAUTH2=true
JWKS_URI=https://your-identity-provider.com/.well-known/jwks.json
AUDIENCE=your-audience
ISSUER=https://your-identity-provider.com
OAUTH2_CLIENT_ID=your-client-idGetting OAuth2 Tokens:
Use the provided utility to obtain OAuth2 JWT tokens:
# Add these additional environment variables for token generation
OAUTH2_CLIENT_SECRET=your-client-secret
TOKEN_ENDPOINT=https://your-identity-provider.com/oauth/token
# Run the utility to get a token
python ai_platform_engineering/utils/oauth/get_oauth_jwt_token.pyLocal Development with Keycloak:
For local development, you can run a Keycloak OAuth server:
# Start local Keycloak server
cd deploy/keycloak
docker compose upThen configure your environment:
A2A_AUTH_OAUTH2=true
JWKS_URI=http://localhost:7080/realms/caipe/protocol/openid-connect/certs
AUDIENCE=caipe
ISSUER=http://localhost:7080/realms/caipe
OAUTH2_CLIENT_ID=caipe-cli
OAUTH2_CLIENT_SECRET=your-client-secret-from-keycloak
TOKEN_ENDPOINT=http://localhost:7080/realms/caipe/protocol/openid-connect/tokenKeycloak Setup Steps:
- Access Keycloak admin console at http://localhost:7080
- Login with
admin/admin - Switch to the
caiperealm - Create a new client called
caipe-cli - Copy the client secret and use it in your environment variables
Generate JWT Token with Keycloak:
After setting up Keycloak, generate a JWT token using your client credentials:
export OAUTH2_CLIENT_ID=caipe-cli
export OAUTH2_CLIENT_SECRET=<YOUR CLIENT SECRET> # randomly generated from Keycloak
export TOKEN_ENDPOINT=http://localhost:7080/realms/caipe/protocol/openid-connect/token
python ai_platform_engineering/utils/oauth/get_oauth_jwt_token.pyOption B: Shared Key Authentication (For Development/Testing)
Add the following to your
.envfile:A2A_AUTH_SHARED_KEY=your-secret-keyNote: If neither authentication method is enabled, the A2A agent will run without authentication. This is not recommended for production environments.
🏁 Getting Started
-
Launch with Docker Compose
docker compose up -
Connect to the A2A agent
Once the Docker Compose services are running, connect using one of these methods:
Option A: Using Docker (host network)
docker run -it --network=host ghcr.io/cnoe-io/agent-chat-cli:stableOption B: Using uvx
uvx --no-cache git+https://github.com/cnoe-io/agent-chat-cli.git a2a💡 For more connection options and troubleshooting, see the Quick Start Guide.
-
[Optional] Connect via Backstage Agent-Forge Plugin
Run the Agent Forge plugin with Docker:
docker run -d \
--name backstage-agent-forge \
-p 13000:3000 \
-e NODE_ENV=development \
ghcr.io/cnoe-io/backstage-plugin-agent-forge:latestOr with Docker Compose:
COMPOSE_PROFILES="agentforge" docker compose upOnce the container is started, open agent-forge in your browser:
http://localhost:13000💡 Learn more about Agent Forge Backstage Plugin.
🛠️ For Docker Compose profiles, agent selection, and advanced configuration, check out the Quick Start Guide.