Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .env.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# OpenSearch Connection
OPENSEARCH_URL=http://opensearch:9200
OPENSEARCH_USERNAME=admin
OPENSEARCH_PASSWORD=Admin1234!

# Authentication (disable for local development)
AG_UI_AUTH_ENABLED=false

# CORS
AG_UI_CORS_ORIGINS=http://localhost:5601

# Logging
AG_UI_LOG_FORMAT=human
AG_UI_LOG_LEVEL=INFO

# OS MCP Server
MCP_SERVER_URL=http://agent-server:9900/mcp

# Prevent timeouts for longer running sub-agents
AG_UI_MAX_CONSECUTIVE_TIMEOUTS=18000
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM python:3.12-slim
WORKDIR /app

# Install git for potentially pulling dependencies, and build requirements
RUN apt-get update && apt-get install -y git build-essential && rm -rf /var/lib/apt/lists/*

# Copy project files
COPY . .

# Install dependencies including the server package
RUN pip install --no-cache-dir -e .
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we can use uv as the package manager: https://docs.astral.sh/uv/guides/integration/docker/


# Expose the application port
EXPOSE 8001

# Run the server
CMD ["uvicorn", "server.ag_ui_app:app", "--host", "0.0.0.0", "--port", "8001"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we utilize the existing run_server.py?

32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,37 @@ AG_UI_LOG_LEVEL=INFO

## Quick Start

### Complete Setup (3-Component Stack)
### Complete Setup (Docker Compose) - Recommended

To run the full demo with OpenSearch, Agent Server, and Dashboards:
The easiest way to run the full 3-component stack (OpenSearch, Agent Server, and Dashboards) is using Docker Compose.

1. **Configure Environment**
```bash
cp .env.docker .env.docker # Note: Edit this if you need to add LLM provider credentials
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a specific env file for the Docker setup?

Couldn't we just use the example env file like this:

cp .env.example .env.docker

That way we'd only need to update one example file when introducing new variables, not two files.

Copy link
Collaborator

@jiapingzeng jiapingzeng Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, and note that LLM provider credentials are needed for the agent to work

```

2. **Start the Stack**
```bash
docker-compose up -d --build
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe docker-compose is from an older version, could we use a newer version which should be docker compose (no dash): https://docs.docker.com/compose/gettingstarted/

```

3. **Verify Health**
```bash
# Check Agent Server health
curl http://localhost:8001/health

# Check if Dashboards is up (it may take a minute)
curl -I http://localhost:5601
```

4. **Access the Chat**
- Open http://localhost:5601
- Click the chat icon (💬) in the top-right header
- Start asking questions about your data!

### Manual Setup (Option 2)

To run the components individually:

**Terminal 1 - OpenSearch**
```bash
Expand Down
48 changes: 48 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: '3.8'

services:
opensearch:
image: opensearchproject/opensearch:latest
environment:
- discovery.type=single-node
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=Admin1234!
- "DISABLE_SECURITY_PLUGIN=true"
ports:
- "9200:9200"
- "9600:9600"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9200 || exit 1"]
interval: 10s
timeout: 5s
retries: 5

agent-server:
build: .
env_file: .env.docker
environment:
- OPENSEARCH_URL=http://opensearch:9200
ports:
- "8001:8001"
depends_on:
opensearch:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8001/health"]
interval: 10s
timeout: 5s
retries: 5

opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:latest
ports:
- "5601:5601"
environment:
- OPENSEARCH_HOSTS=["http://opensearch:9200"]
- "DISABLE_SECURITY_DASHBOARDS_PLUGIN=true"
volumes:
- ./opensearch_dashboards.docker.yml:/usr/share/opensearch-dashboards/config/opensearch_dashboards.yml
depends_on:
opensearch:
condition: service_healthy
agent-server:
condition: service_started
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we also add the MCP server: https://github.com/opensearch-project/opensearch-mcp-server-py as it is required by agent server? Ok to address in another PR too.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that opensearch-mcp-server-py does not have an official Docker image yet but we can start it with uv.

15 changes: 15 additions & 0 deletions opensearch_dashboards.docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
server.host: "0.0.0.0"
opensearch.hosts: ["http://opensearch:9200"]
opensearch.ssl.verificationMode: none

# OpenSearch Agent Server Integration
uiSettings:
overrides:
"home:useNewHomePage": true

contextProvider:
enabled: true

chat:
enabled: true
agUiUrl: "http://localhost:8001/runs"