Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8d7b376
Add experimental AG-UI supported chat endpoint and PPL query assist
kylehounslow Oct 6, 2025
352a8bb
Merge branch 'robusta-dev:master' into master
kylehounslow Oct 6, 2025
b382b4d
update readme
kylehounslow Oct 6, 2025
e699901
update poetry.lock
kylehounslow Oct 6, 2025
a5797d7
* bugfix: Only invoke front-end query execution if tool is available
kylehounslow Oct 7, 2025
caef97f
nit: apply 1st round of PR review fixes
kylehounslow Oct 7, 2025
48d134f
nit: apply 2nd round of PR AI review fixes
kylehounslow Oct 7, 2025
c961cdd
nit: more AI review fixes
kylehounslow Oct 7, 2025
0e9d5e2
nit: more AI review fixes
kylehounslow Oct 7, 2025
6388397
bugfix: check for correct fe_tool_name in _should_execute_suggested_q…
kylehounslow Oct 7, 2025
0fcebb8
bugfix: front/back-end tool parsing bug
kylehounslow Oct 7, 2025
84345e0
update opensearch_query_assist unit tests
kylehounslow Oct 7, 2025
e6814a1
bugfix: move page context to recent conversation history to apply rec…
kylehounslow Oct 7, 2025
c636726
nit: coderabbit fixes
kylehounslow Oct 7, 2025
db2ff1a
Add ag-ui server to Dockerfile
kylehounslow Oct 9, 2025
5e2d87e
nit: better formatting for TodoWrite messages
kylehounslow Oct 9, 2025
f38d258
Merge branch 'master' into master
arikalon1 Oct 9, 2025
40427cd
chore: Add OSD setup gist link in README
kylehounslow Oct 9, 2025
c262635
chore: update poetry.lock
kylehounslow Oct 9, 2025
6be5a61
nit: apply pre-commit lint fixes
kylehounslow Oct 9, 2025
99eb744
nit: apply mypy fixes (rename ag-ui/server.py)
kylehounslow Oct 9, 2025
4905aa9
nit: more mypy fixes
kylehounslow Oct 9, 2025
6ec74ba
nit: more mypy fixes
kylehounslow Oct 9, 2025
87ae8e5
nit: fix ruff checks
kylehounslow Oct 9, 2025
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
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ RUN git config --global core.symlinks false
RUN rm -rf /usr/local/lib/python3.11/site-packages/setuptools-65.5.1.dist-info
RUN rm -rf /usr/local/lib/python3.11/ensurepip/_bundled/setuptools-65.5.0-py3-none-any.whl

COPY ./experimental/ag-ui/server-agui.py /app/experimental/ag-ui/server-agui.py
COPY ./holmes /app/holmes
COPY ./server.py /app/server.py
COPY ./holmes_cli.py /app/holmes_cli.py
Expand Down
75 changes: 75 additions & 0 deletions experimental/ag-ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# AG-UI - Experimental HolmesGPT Server

AG-UI is an experimental extension to HolmesGPT that demonstrates [AG-UI](https://docs.ag-ui.com/introduction) capabilities (page context and state sharing, front-end tools execution, etc) through a specialized `/api/agui/chat` endpoint and a web-based "ExampleOps✨" observability demo interface. The AG-UI compatible `server.py` is adapted from the [existing server.py implementation](../../server.py)

_⚠️ **Disclaimer**: AG-UI is experimental within HolmesGPT. APIs and interfaces may change as the project evolves. The demonstration server and frontend is not intended for production use._

![ExampleOps demo video](https://github.com/kylehounslow/holmesgpt/blob/docs/experimental/ag-ui/docs/holmesgpt-agui-demo-1.gif?raw=true)

## Known Limitations:

1. Front-end tool auto-discovery and integration with LLM is not yet supported. Front-end tool discovery and execution is handled statically in the back-end.
1. Front-end tool results are not yet supported. No-op 200 response is returned to front-end.
1. Tested with Anthropic Claude Sonnet 3.7 and 4.0 on AWS Bedrock only.
1. `TodoWrite` tool rendering is not properly supported.

## 🛠️ Quick Start

### **0. Prerequisites**

- **HolmesGPT** with experimental AG-UI server.
- **Data Sources**: Prometheus (`:9090`) and/or OpenSearch (`:9200`)
- Recommended to run [opentelemetry-demo](https://github.com/open-telemetry/opentelemetry-demo) via docker-compose.
- **Node.js** 20+ (for frontend demonstration)

### **1. Set up datasources**

A simple way to generate synthetic Prometheus metrics, OpenSearch logs, traces and more, is to use: [opentelemetry-demo](https://github.com/open-telemetry/opentelemetry-demo)

```bash
git clone git@github.com:open-telemetry/opentelemetry-demo.git
cd opentelemetry-demo
docker compose up -d
```

### **2. Start HolmesGPT AG-UI Server on port 5050**

Assumes there is a local Prometheus server (containing metrics) at `localhost:9090` (e.g. [opentelemetry-demo](https://github.com/open-telemetry/opentelemetry-demo)) and using AWS Bedrock as LLM. See [HolmesGPT documentation](https://holmesgpt.dev/) for alternate configurations.

```bash
# Start HolmesGPT AG-UI compatible server
cd holmesgpt
export HOLMES_PORT=5050
export PROMETHEUS_URL=http://localhost:9090
export AWS_PROFILE=default
export AWS_REGION=us-east-1
export MODEL=bedrock/us.anthropic.claude-sonnet-4-20250514-v1:0
poetry run python experimental/ag-ui/server-agui.py
```

### **3. Run "ExampleOps✨" Demo Frontend**

ExampleOps✨ is a lightweight observability frontend that demonstrates AG-UI capabilities (page context, state sharing, front-end tools execution, etc).
Create .env file at `experimental/ag-ui/front-end/.env`. See example below and replace Prometheus/OpenSearch urls as needed:

```env
# AG-UI Agent Configuration
HOLMES_PORT=5050
AGENT_URL=http://localhost:${HOLMES_PORT}
# Prometheus Configuration
REACT_APP_PROMETHEUS_URL=http://localhost:9090

# OpenSearch Configuration
REACT_APP_OPENSEARCH_URL=http://localhost:9200
REACT_APP_OPENSEARCH_USER=user
REACT_APP_OPENSEARCH_PASSWORD=pass
```

```bash
cd experimental/ag-ui/front-end
npm install && npm start
```

## Running HolmesGPT in OpenSearch Dashboards
OpenSearch Dashboards (>=3.3) supports AG-UI compatible agents for its AI chat. For an example HolmesGPT configuration,
see [gist](https://gist.github.com/kylehounslow/07290ee15768a5b15a924831f7759217).
12 changes: 12 additions & 0 deletions experimental/ag-ui/front-end/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# AG-UI Front-End Configuration
PORT=5151
# AG-UI Agent Configuration
HOLMES_PORT=5050
AGENT_URL=http://localhost:${HOLMES_PORT}
# Prometheus Configuration
REACT_APP_PROMETHEUS_URL=http://localhost:9090

# OpenSearch Configuration
REACT_APP_OPENSEARCH_URL=http://localhost:9200
REACT_APP_OPENSEARCH_USER=admin
REACT_APP_OPENSEARCH_PASSWORD=admin
3 changes: 3 additions & 0 deletions experimental/ag-ui/front-end/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
package-lock.json
.env
1 change: 1 addition & 0 deletions experimental/ag-ui/front-end/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
42 changes: 42 additions & 0 deletions experimental/ag-ui/front-end/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# ExampleOps✨

A React TypeScript demo observability application with integrated HolmesGPT AG-UI chat assistant.

![ExampleOps demo video](https://github.com/kylehounslow/holmesgpt/blob/docs/experimental/ag-ui/docs/holmesgpt-agui-demo-1.gif?raw=true)

## Setup

1. Install dependencies:
```bash
npm install
```

2. Configure your agent endpoint:
```bash
cp .env.example .env
# Edit .env to set your AGENT_URL
```

3. Start the development server:
```bash
npm start
```

## Configuration

The app expects an AG-UI compatible agent service running at the base URL specified in `AGENT_URL`. The chat endpoint will be accessed at `${AGENT_URL}/api/agui/chat`. The agent should:

- Follow the AG-UI Protocol
- Accept POST requests with `RunAgentInput` payload
- Return Server-Sent Events (SSE) stream containing AG-UI events


## AG-UI Integration

The chat assistant uses:

- **HttpAgent**: For HTTP-based agent communication
- **AgentSubscriber**: For handling streaming events
- **Event Types**: TEXT_MESSAGE_START, TEXT_MESSAGE_CONTENT, TEXT_MESSAGE_END, etc.

See the [AG-UI documentation](https://docs.ag-ui.com) for more details.
45 changes: 45 additions & 0 deletions experimental/ag-ui/front-end/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "ag-ui-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@ag-ui/client": "^0.0.38",
"@ag-ui/core": "^0.0.38",
"@types/node": "^16.18.126",
"@types/react": "^18.3.24",
"@types/react-dom": "^18.3.7",
"chart.js": "^4.5.0",
"chartjs-adapter-date-fns": "^3.0.0",
"date-fns": "^2.30.0",
"react": "^18.3.1",
"react-chartjs-2": "^5.3.0",
"react-dom": "^18.3.1",
"react-markdown": "^9.0.1",
"react-scripts": "^5.0.1",
"typescript": "^4.9.5"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions experimental/ag-ui/front-end/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>ExampleOps✨</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading