From 9ae05a73f7be03add886235fc05f876a6c364ddc Mon Sep 17 00:00:00 2001 From: Adil Hafeez Date: Wed, 4 Mar 2026 15:23:25 -0800 Subject: [PATCH] remove plano from docker-compose, use native planoai up in demos --- .../docker-compose.yaml | 22 ++------ .../multi_agent_crewai_langchain/run_demo.sh | 51 ++++++++++++++++++ .../travel_agents/docker-compose.yaml | 13 ----- .../travel_agents/run_demo.sh | 51 ++++++++++++++++++ .../http_filter/docker-compose.yaml | 15 +----- demos/filter_chains/http_filter/run_demo.sh | 46 ++++++++++++++++ .../mcp_filter/docker-compose.yaml | 17 +----- demos/filter_chains/mcp_filter/run_demo.sh | 46 ++++++++++++++++ .../llm_gateway/docker-compose.yaml | 17 +----- .../docker-compose.yaml | 20 +------ .../preference_based_routing/run_demo.sh | 52 +++++++++++++++++++ 11 files changed, 253 insertions(+), 97 deletions(-) create mode 100755 demos/agent_orchestration/multi_agent_crewai_langchain/run_demo.sh create mode 100755 demos/agent_orchestration/travel_agents/run_demo.sh create mode 100755 demos/filter_chains/http_filter/run_demo.sh create mode 100755 demos/filter_chains/mcp_filter/run_demo.sh create mode 100755 demos/llm_routing/preference_based_routing/run_demo.sh diff --git a/demos/agent_orchestration/multi_agent_crewai_langchain/docker-compose.yaml b/demos/agent_orchestration/multi_agent_crewai_langchain/docker-compose.yaml index a54888a6..2d9c180b 100644 --- a/demos/agent_orchestration/multi_agent_crewai_langchain/docker-compose.yaml +++ b/demos/agent_orchestration/multi_agent_crewai_langchain/docker-compose.yaml @@ -1,21 +1,5 @@ services: - plano: - build: - context: ../../../ - dockerfile: Dockerfile - ports: - - "8001:8001" - - "12000:12000" - environment: - - PLANO_CONFIG_PATH=/app/plano_config.yaml - - OPENAI_API_KEY=${OPENAI_API_KEY:?OPENAI_API_KEY environment variable is required but not set} - - OTEL_TRACING_GRPC_ENDPOINT=http://jaeger:4317 - - LOG_LEVEL=${LOG_LEVEL:-info} - volumes: - - ./config.yaml:/app/plano_config.yaml:ro - - /etc/ssl/cert.pem:/etc/ssl/cert.pem - crewai-flight-agent: build: dockerfile: Dockerfile @@ -23,7 +7,7 @@ services: ports: - "10520:10520" environment: - - LLM_GATEWAY_ENDPOINT=http://plano:12000/v1 + - LLM_GATEWAY_ENDPOINT=http://host.docker.internal:12000/v1 - AEROAPI_KEY=${AEROAPI_KEY:?AEROAPI_KEY environment variable is required but not set} - PYTHONUNBUFFERED=1 command: ["python", "-u", "crewai/flight_agent.py"] @@ -35,7 +19,7 @@ services: ports: - "10510:10510" environment: - - LLM_GATEWAY_ENDPOINT=http://plano:12000/v1 + - LLM_GATEWAY_ENDPOINT=http://host.docker.internal:12000/v1 command: ["python", "-u", "langchain/weather_agent.py"] anythingllm: @@ -48,7 +32,7 @@ services: environment: - STORAGE_DIR=/app/server/storage - LLM_PROVIDER=generic-openai - - GENERIC_OPEN_AI_BASE_PATH=http://plano:8001/v1 + - GENERIC_OPEN_AI_BASE_PATH=http://host.docker.internal:8001/v1 - GENERIC_OPEN_AI_MODEL_PREF=gpt-4o-mini - GENERIC_OPEN_AI_MODEL_TOKEN_LIMIT=128000 - GENERIC_OPEN_AI_API_KEY=sk-placeholder diff --git a/demos/agent_orchestration/multi_agent_crewai_langchain/run_demo.sh b/demos/agent_orchestration/multi_agent_crewai_langchain/run_demo.sh new file mode 100755 index 00000000..b7dc0fad --- /dev/null +++ b/demos/agent_orchestration/multi_agent_crewai_langchain/run_demo.sh @@ -0,0 +1,51 @@ +#!/bin/bash +set -e + +# Function to start the demo +start_demo() { + # Step 1: Check if .env file exists + if [ -f ".env" ]; then + echo ".env file already exists. Skipping creation." + else + # Step 2: Create `.env` file and set API keys + if [ -z "$OPENAI_API_KEY" ]; then + echo "Error: OPENAI_API_KEY environment variable is not set for the demo." + exit 1 + fi + if [ -z "$AEROAPI_KEY" ]; then + echo "Error: AEROAPI_KEY environment variable is not set for the demo." + exit 1 + fi + + echo "Creating .env file..." + echo "OPENAI_API_KEY=$OPENAI_API_KEY" > .env + echo "AEROAPI_KEY=$AEROAPI_KEY" >> .env + echo ".env file created with API keys." + fi + + # Step 3: Start Plano + echo "Starting Plano with config.yaml..." + planoai up config.yaml + + # Step 4: Start agents and services + echo "Starting agents using Docker Compose..." + docker compose up -d +} + +# Function to stop the demo +stop_demo() { + # Step 1: Stop Docker Compose services + echo "Stopping Docker Compose services..." + docker compose down + + # Step 2: Stop Plano + echo "Stopping Plano..." + planoai down +} + +# Main script logic +if [ "$1" == "down" ]; then + stop_demo +else + start_demo +fi diff --git a/demos/agent_orchestration/travel_agents/docker-compose.yaml b/demos/agent_orchestration/travel_agents/docker-compose.yaml index b4e65b28..f0fb78e5 100644 --- a/demos/agent_orchestration/travel_agents/docker-compose.yaml +++ b/demos/agent_orchestration/travel_agents/docker-compose.yaml @@ -1,18 +1,5 @@ services: - plano: - build: - context: ../../../ - dockerfile: Dockerfile - ports: - - "12000:12000" - - "8001:8001" - environment: - - PLANO_CONFIG_PATH=/config/config.yaml - - OPENAI_API_KEY=${OPENAI_API_KEY:?OPENAI_API_KEY environment variable is required but not set} - volumes: - - ./config.yaml:/app/plano_config.yaml - - /etc/ssl/cert.pem:/etc/ssl/cert.pem weather-agent: build: context: . diff --git a/demos/agent_orchestration/travel_agents/run_demo.sh b/demos/agent_orchestration/travel_agents/run_demo.sh new file mode 100755 index 00000000..b7dc0fad --- /dev/null +++ b/demos/agent_orchestration/travel_agents/run_demo.sh @@ -0,0 +1,51 @@ +#!/bin/bash +set -e + +# Function to start the demo +start_demo() { + # Step 1: Check if .env file exists + if [ -f ".env" ]; then + echo ".env file already exists. Skipping creation." + else + # Step 2: Create `.env` file and set API keys + if [ -z "$OPENAI_API_KEY" ]; then + echo "Error: OPENAI_API_KEY environment variable is not set for the demo." + exit 1 + fi + if [ -z "$AEROAPI_KEY" ]; then + echo "Error: AEROAPI_KEY environment variable is not set for the demo." + exit 1 + fi + + echo "Creating .env file..." + echo "OPENAI_API_KEY=$OPENAI_API_KEY" > .env + echo "AEROAPI_KEY=$AEROAPI_KEY" >> .env + echo ".env file created with API keys." + fi + + # Step 3: Start Plano + echo "Starting Plano with config.yaml..." + planoai up config.yaml + + # Step 4: Start agents and services + echo "Starting agents using Docker Compose..." + docker compose up -d +} + +# Function to stop the demo +stop_demo() { + # Step 1: Stop Docker Compose services + echo "Stopping Docker Compose services..." + docker compose down + + # Step 2: Stop Plano + echo "Stopping Plano..." + planoai down +} + +# Main script logic +if [ "$1" == "down" ]; then + stop_demo +else + start_demo +fi diff --git a/demos/filter_chains/http_filter/docker-compose.yaml b/demos/filter_chains/http_filter/docker-compose.yaml index 4946de8c..64962bce 100644 --- a/demos/filter_chains/http_filter/docker-compose.yaml +++ b/demos/filter_chains/http_filter/docker-compose.yaml @@ -11,19 +11,6 @@ services: environment: - LLM_GATEWAY_ENDPOINT=${LLM_GATEWAY_ENDPOINT:-http://host.docker.internal:12000/v1} - OPENAI_API_KEY=${OPENAI_API_KEY:?OPENAI_API_KEY environment variable is required but not set} - plano: - build: - context: ../../../ - dockerfile: Dockerfile - ports: - - "12000:12000" - - "8001:8001" - environment: - - PLANO_CONFIG_PATH=/config/config.yaml - - OPENAI_API_KEY=${OPENAI_API_KEY:?OPENAI_API_KEY environment variable is required but not set} - volumes: - - ./config.yaml:/app/plano_config.yaml - - /etc/ssl/cert.pem:/etc/ssl/cert.pem jaeger: build: context: ../../shared/jaeger @@ -41,7 +28,7 @@ services: environment: - STORAGE_DIR=/app/server/storage - LLM_PROVIDER=generic-openai - - GENERIC_OPEN_AI_BASE_PATH=http://plano:8001/v1 + - GENERIC_OPEN_AI_BASE_PATH=http://host.docker.internal:8001/v1 - GENERIC_OPEN_AI_MODEL_PREF=gpt-4o-mini - GENERIC_OPEN_AI_MODEL_TOKEN_LIMIT=128000 - GENERIC_OPEN_AI_API_KEY=sk-placeholder diff --git a/demos/filter_chains/http_filter/run_demo.sh b/demos/filter_chains/http_filter/run_demo.sh new file mode 100755 index 00000000..bed84f16 --- /dev/null +++ b/demos/filter_chains/http_filter/run_demo.sh @@ -0,0 +1,46 @@ +#!/bin/bash +set -e + +# Function to start the demo +start_demo() { + # Step 1: Check if .env file exists + if [ -f ".env" ]; then + echo ".env file already exists. Skipping creation." + else + # Step 2: Create `.env` file and set OpenAI key + if [ -z "$OPENAI_API_KEY" ]; then + echo "Error: OPENAI_API_KEY environment variable is not set for the demo." + exit 1 + fi + + echo "Creating .env file..." + echo "OPENAI_API_KEY=$OPENAI_API_KEY" > .env + echo ".env file created with OPENAI_API_KEY." + fi + + # Step 3: Start Plano + echo "Starting Plano with config.yaml..." + planoai up config.yaml + + # Step 4: Start services + echo "Starting services using Docker Compose..." + docker compose up -d +} + +# Function to stop the demo +stop_demo() { + # Step 1: Stop Docker Compose services + echo "Stopping Docker Compose services..." + docker compose down + + # Step 2: Stop Plano + echo "Stopping Plano..." + planoai down +} + +# Main script logic +if [ "$1" == "down" ]; then + stop_demo +else + start_demo +fi diff --git a/demos/filter_chains/mcp_filter/docker-compose.yaml b/demos/filter_chains/mcp_filter/docker-compose.yaml index 9ecc36e1..64962bce 100644 --- a/demos/filter_chains/mcp_filter/docker-compose.yaml +++ b/demos/filter_chains/mcp_filter/docker-compose.yaml @@ -11,21 +11,6 @@ services: environment: - LLM_GATEWAY_ENDPOINT=${LLM_GATEWAY_ENDPOINT:-http://host.docker.internal:12000/v1} - OPENAI_API_KEY=${OPENAI_API_KEY:?OPENAI_API_KEY environment variable is required but not set} - plano: - build: - context: ../../../ - dockerfile: Dockerfile - ports: - - "11000:11000" - - "12001:12001" - - "12000:12000" - - "8001:8001" - environment: - - PLANO_CONFIG_PATH=/config/config.yaml - - OPENAI_API_KEY=${OPENAI_API_KEY:?OPENAI_API_KEY environment variable is required but not set} - volumes: - - ./config.yaml:/app/plano_config.yaml - - /etc/ssl/cert.pem:/etc/ssl/cert.pem jaeger: build: context: ../../shared/jaeger @@ -43,7 +28,7 @@ services: environment: - STORAGE_DIR=/app/server/storage - LLM_PROVIDER=generic-openai - - GENERIC_OPEN_AI_BASE_PATH=http://plano:8001/v1 + - GENERIC_OPEN_AI_BASE_PATH=http://host.docker.internal:8001/v1 - GENERIC_OPEN_AI_MODEL_PREF=gpt-4o-mini - GENERIC_OPEN_AI_MODEL_TOKEN_LIMIT=128000 - GENERIC_OPEN_AI_API_KEY=sk-placeholder diff --git a/demos/filter_chains/mcp_filter/run_demo.sh b/demos/filter_chains/mcp_filter/run_demo.sh new file mode 100755 index 00000000..bed84f16 --- /dev/null +++ b/demos/filter_chains/mcp_filter/run_demo.sh @@ -0,0 +1,46 @@ +#!/bin/bash +set -e + +# Function to start the demo +start_demo() { + # Step 1: Check if .env file exists + if [ -f ".env" ]; then + echo ".env file already exists. Skipping creation." + else + # Step 2: Create `.env` file and set OpenAI key + if [ -z "$OPENAI_API_KEY" ]; then + echo "Error: OPENAI_API_KEY environment variable is not set for the demo." + exit 1 + fi + + echo "Creating .env file..." + echo "OPENAI_API_KEY=$OPENAI_API_KEY" > .env + echo ".env file created with OPENAI_API_KEY." + fi + + # Step 3: Start Plano + echo "Starting Plano with config.yaml..." + planoai up config.yaml + + # Step 4: Start services + echo "Starting services using Docker Compose..." + docker compose up -d +} + +# Function to stop the demo +stop_demo() { + # Step 1: Stop Docker Compose services + echo "Stopping Docker Compose services..." + docker compose down + + # Step 2: Stop Plano + echo "Stopping Plano..." + planoai down +} + +# Main script logic +if [ "$1" == "down" ]; then + stop_demo +else + start_demo +fi diff --git a/demos/getting_started/llm_gateway/docker-compose.yaml b/demos/getting_started/llm_gateway/docker-compose.yaml index 52723fbf..3273d55a 100644 --- a/demos/getting_started/llm_gateway/docker-compose.yaml +++ b/demos/getting_started/llm_gateway/docker-compose.yaml @@ -1,20 +1,5 @@ services: - plano: - build: - context: ../../../ - dockerfile: Dockerfile - ports: - - "12000:12000" - - "12001:12001" - environment: - - PLANO_CONFIG_PATH=/app/plano_config.yaml - - OPENAI_API_KEY=${OPENAI_API_KEY:?OPENAI_API_KEY environment variable is required but not set} - - OTEL_TRACING_GRPC_ENDPOINT=http://host.docker.internal:4317 - volumes: - - ./config.yaml:/app/plano_config.yaml:ro - - /etc/ssl/cert.pem:/etc/ssl/cert.pem - anythingllm: image: mintplexlabs/anythingllm restart: always @@ -25,7 +10,7 @@ services: environment: - STORAGE_DIR=/app/server/storage - LLM_PROVIDER=generic-openai - - GENERIC_OPEN_AI_BASE_PATH=http://plano:12000/v1 + - GENERIC_OPEN_AI_BASE_PATH=http://host.docker.internal:12000/v1 - GENERIC_OPEN_AI_MODEL_PREF=gpt-4o-mini - GENERIC_OPEN_AI_MODEL_TOKEN_LIMIT=128000 - GENERIC_OPEN_AI_API_KEY=sk-placeholder diff --git a/demos/llm_routing/preference_based_routing/docker-compose.yaml b/demos/llm_routing/preference_based_routing/docker-compose.yaml index 7c88594a..3273d55a 100644 --- a/demos/llm_routing/preference_based_routing/docker-compose.yaml +++ b/demos/llm_routing/preference_based_routing/docker-compose.yaml @@ -1,23 +1,5 @@ services: - plano: - build: - context: ../../../ - dockerfile: Dockerfile - ports: - - "12000:12000" - - "12001:12001" - environment: - - PLANO_CONFIG_PATH=/app/plano_config.yaml - - OPENAI_API_KEY=${OPENAI_API_KEY:?OPENAI_API_KEY environment variable is required but not set} - - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:?ANTHROPIC_API_KEY environment variable is required but not set} - - OTEL_TRACING_GRPC_ENDPOINT=http://host.docker.internal:4317 - - OTEL_TRACING_ENABLED=true - - RUST_LOG=debug - volumes: - - ./config.yaml:/app/plano_config.yaml:ro - - /etc/ssl/cert.pem:/etc/ssl/cert.pem - anythingllm: image: mintplexlabs/anythingllm restart: always @@ -28,7 +10,7 @@ services: environment: - STORAGE_DIR=/app/server/storage - LLM_PROVIDER=generic-openai - - GENERIC_OPEN_AI_BASE_PATH=http://plano:12000/v1 + - GENERIC_OPEN_AI_BASE_PATH=http://host.docker.internal:12000/v1 - GENERIC_OPEN_AI_MODEL_PREF=gpt-4o-mini - GENERIC_OPEN_AI_MODEL_TOKEN_LIMIT=128000 - GENERIC_OPEN_AI_API_KEY=sk-placeholder diff --git a/demos/llm_routing/preference_based_routing/run_demo.sh b/demos/llm_routing/preference_based_routing/run_demo.sh new file mode 100755 index 00000000..c9525c26 --- /dev/null +++ b/demos/llm_routing/preference_based_routing/run_demo.sh @@ -0,0 +1,52 @@ +#!/bin/bash +set -e + +# Function to start the demo +start_demo() { + # Step 1: Check if .env file exists + if [ -f ".env" ]; then + echo ".env file already exists. Skipping creation." + else + # Step 2: Create `.env` file and set API keys + if [ -z "$OPENAI_API_KEY" ]; then + echo "Error: OPENAI_API_KEY environment variable is not set for the demo." + exit 1 + fi + if [ -z "$ANTHROPIC_API_KEY" ]; then + echo "Warning: ANTHROPIC_API_KEY environment variable is not set. Anthropic features may not work." + fi + + echo "Creating .env file..." + echo "OPENAI_API_KEY=$OPENAI_API_KEY" > .env + if [ -n "$ANTHROPIC_API_KEY" ]; then + echo "ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY" >> .env + fi + echo ".env file created with API keys." + fi + + # Step 3: Start Plano + echo "Starting Plano with config.yaml..." + planoai up config.yaml + + # Step 4: Start services + echo "Starting services using Docker Compose..." + docker compose up -d +} + +# Function to stop the demo +stop_demo() { + # Step 1: Stop Docker Compose services + echo "Stopping Docker Compose services..." + docker compose down + + # Step 2: Stop Plano + echo "Stopping Plano..." + planoai down +} + +# Main script logic +if [ "$1" == "down" ]; then + stop_demo +else + start_demo +fi