@opensearch-project/agent-health 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +108 -72
- package/cli/dist/index.js +1132 -351
- package/dist/assets/index-4BAkkFzo.js +267 -0
- package/dist/assets/index-C3K5cBQr.css +1 -0
- package/dist/index.html +2 -2
- package/dist/opensearch-logo-dark.svg +5 -0
- package/dist/opensearch-logo-light.svg +5 -0
- package/dist/test-first-run-improved.html +469 -0
- package/lib/dist/config/index.js +107 -107
- package/lib/dist/index.js +151 -13
- package/package.json +12 -4
- package/server/dist/app.js +12726 -7693
- package/server/dist/index.js +12728 -7697
- package/dist/assets/index-BheBjDce.css +0 -1
- package/dist/assets/index-aT-TLVpA.js +0 -244
package/README.md
CHANGED
|
@@ -1,27 +1,37 @@
|
|
|
1
1
|
# Agent Health
|
|
2
2
|
|
|
3
|
-
[](https://github.com/opensearch-project/agent-health/actions/workflows/ci.yml)
|
|
4
3
|
[](LICENSE.txt)
|
|
5
4
|
[](https://www.npmjs.com/package/@opensearch-project/agent-health)
|
|
5
|
+
[](https://observability.opensearch.org/docs/agent-health/)
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
[](https://github.com/opensearch-project/agent-health/actions/workflows/ci.yml)
|
|
9
|
-
[](https://github.com/opensearch-project/agent-health/actions/workflows/ci.yml)
|
|
10
|
-
[](https://github.com/opensearch-project/agent-health/actions/workflows/ci.yml)
|
|
7
|
+
## What is Agent Health?
|
|
11
8
|
|
|
12
|
-
|
|
9
|
+
Agent Health is an evaluation and observability framework for AI agents. It helps you measure agent performance through "Golden Path" trajectory comparison—where an LLM judge evaluates agent actions against expected outcomes.
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
**Who uses Agent Health:**
|
|
12
|
+
- AI teams building autonomous agents (RCA, customer support, data analysis)
|
|
13
|
+
- QA engineers testing agent behavior across scenarios
|
|
14
|
+
- Platform teams monitoring agent performance in production
|
|
15
|
+
|
|
16
|
+
**Key capabilities:**
|
|
17
|
+
- Real-time agent execution streaming and visualization
|
|
18
|
+
- LLM-based evaluation with pass/fail scoring
|
|
19
|
+
- Batch experiments comparing agents and models
|
|
20
|
+
- OpenTelemetry trace integration for performance analysis
|
|
21
|
+
- Pluggable connectors for different agent types (REST, SSE, CLI)
|
|
22
|
+
|
|
23
|
+
## Quick Start
|
|
15
24
|
|
|
16
25
|
```bash
|
|
17
|
-
|
|
26
|
+
# Start Agent Health with demo data (no configuration needed)
|
|
27
|
+
npx @opensearch-project/agent-health
|
|
18
28
|
```
|
|
19
29
|
|
|
20
|
-
Opens http://localhost:4001
|
|
30
|
+
Opens http://localhost:4001 with pre-loaded sample data for exploration.
|
|
21
31
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
32
|
+
**Next steps:**
|
|
33
|
+
- [Getting Started Guide](./GETTING_STARTED.md) - Step-by-step walkthrough
|
|
34
|
+
- [Connect Your Agent](./docs/CONFIGURATION.md) - Configure your own agent
|
|
25
35
|
|
|
26
36
|
## Features
|
|
27
37
|
|
|
@@ -34,9 +44,6 @@ Opens http://localhost:4001 for the web UI.
|
|
|
34
44
|
- **Reports**: Evaluation reports with LLM judge reasoning
|
|
35
45
|
- **Connectors**: Pluggable protocol adapters for different agent types
|
|
36
46
|
|
|
37
|
-
For a detailed walkthrough, see [Getting Started](./GETTING_STARTED.md).
|
|
38
|
-
|
|
39
|
-
|
|
40
47
|
### Supported Connectors
|
|
41
48
|
|
|
42
49
|
| Connector | Protocol | Description |
|
|
@@ -51,97 +58,104 @@ For creating custom connectors, see [docs/CONNECTORS.md](./docs/CONNECTORS.md).
|
|
|
51
58
|
|
|
52
59
|
---
|
|
53
60
|
|
|
61
|
+
## Architecture
|
|
62
|
+
|
|
63
|
+

|
|
64
|
+
|
|
65
|
+
Agent Health uses a client-server architecture where all clients (UI, CLI) access OpenSearch through a unified HTTP API. The server handles agent communication via pluggable connectors and proxies LLM judge calls to AWS Bedrock.
|
|
54
66
|
|
|
67
|
+
For detailed architecture documentation, see [docs/ARCHITECTURE.md](./docs/ARCHITECTURE.md).
|
|
55
68
|
|
|
56
69
|
---
|
|
57
70
|
|
|
58
|
-
##
|
|
71
|
+
## CLI Commands
|
|
59
72
|
|
|
60
73
|
```bash
|
|
61
|
-
# Start
|
|
74
|
+
# Start server (default action)
|
|
62
75
|
npx @opensearch-project/agent-health
|
|
63
76
|
|
|
64
|
-
#
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
### CLI Commands
|
|
77
|
+
# Initialize a new project (creates agent-health.config.ts and .env.example)
|
|
78
|
+
npx @opensearch-project/agent-health init
|
|
68
79
|
|
|
69
|
-
|
|
70
|
-
# Check configuration
|
|
80
|
+
# Check configuration and connectivity
|
|
71
81
|
npx @opensearch-project/agent-health doctor
|
|
72
82
|
|
|
73
|
-
# List
|
|
83
|
+
# List resources (agents, connectors, models, test-cases, benchmarks)
|
|
74
84
|
npx @opensearch-project/agent-health list agents
|
|
75
85
|
npx @opensearch-project/agent-health list connectors
|
|
76
86
|
|
|
77
|
-
# Run a test case against an agent
|
|
87
|
+
# Run a single test case against an agent
|
|
78
88
|
npx @opensearch-project/agent-health run -t demo-otel-001 -a demo
|
|
79
89
|
|
|
80
|
-
#
|
|
81
|
-
npx @opensearch-project/agent-health
|
|
82
|
-
|
|
90
|
+
# Run a benchmark (batch of test cases)
|
|
91
|
+
npx @opensearch-project/agent-health benchmark -f ./test-cases.json -a my-agent
|
|
92
|
+
npx @opensearch-project/agent-health benchmark -n "My Benchmark" -a my-agent --export results.json
|
|
83
93
|
|
|
84
|
-
|
|
94
|
+
# Export benchmark test cases as JSON
|
|
95
|
+
npx @opensearch-project/agent-health export -b "My Benchmark" -o test-cases.json
|
|
85
96
|
|
|
97
|
+
# Generate reports (HTML, PDF, JSON)
|
|
98
|
+
npx @opensearch-project/agent-health report -b "My Benchmark"
|
|
99
|
+
npx @opensearch-project/agent-health report -b "My Benchmark" -f pdf -o report.pdf
|
|
86
100
|
|
|
101
|
+
# One-time migration for existing benchmark runs
|
|
102
|
+
npx @opensearch-project/agent-health migrate --dry-run
|
|
103
|
+
```
|
|
87
104
|
|
|
105
|
+
For full CLI documentation, see [docs/CLI.md](./docs/CLI.md).
|
|
88
106
|
|
|
89
|
-
## Authentication (Required)
|
|
90
107
|
|
|
91
|
-
AWS credentials are required for the Bedrock LLM Judge to score evaluations.
|
|
92
108
|
|
|
93
|
-
Create a `.env` file:
|
|
94
|
-
```bash
|
|
95
|
-
cp .env.example .env
|
|
96
|
-
```
|
|
97
109
|
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
AWS_REGION=us-east-1
|
|
101
|
-
AWS_ACCESS_KEY_ID=your_access_key
|
|
102
|
-
AWS_SECRET_ACCESS_KEY=your_secret_key
|
|
103
|
-
AWS_SESSION_TOKEN=your_session_token # if using temporary credentials
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
---
|
|
110
|
+
## Configuration
|
|
107
111
|
|
|
108
|
-
|
|
112
|
+
Agent Health works out-of-the-box with demo data. Configure when you're ready to connect your own agent.
|
|
109
113
|
|
|
110
|
-
|
|
114
|
+
### Config File: `agent-health.config.ts`
|
|
111
115
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
Agent endpoints default to localhost. Override if your agent runs elsewhere:
|
|
116
|
+
This is the primary way to configure custom agents, models, and hooks. Create it in your working directory (the directory you run `npx` or `agent-health` from):
|
|
115
117
|
|
|
116
118
|
```bash
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
MLCOMMONS_ENDPOINT=http://localhost:9200/_plugins/_ml/agents/{agent_id}/_execute/stream
|
|
119
|
+
# Generate a config file with examples
|
|
120
|
+
npx @opensearch-project/agent-health init
|
|
120
121
|
```
|
|
121
122
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
123
|
+
Or create it manually:
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
// agent-health.config.ts
|
|
127
|
+
export default {
|
|
128
|
+
agents: [
|
|
129
|
+
{
|
|
130
|
+
key: "my-agent",
|
|
131
|
+
name: "My Agent",
|
|
132
|
+
endpoint: "http://localhost:8000/agent",
|
|
133
|
+
connectorType: "rest", // or "agui-streaming", "subprocess"
|
|
134
|
+
models: ["claude-sonnet-4"],
|
|
135
|
+
useTraces: true, // Enable OpenTelemetry trace collection
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
};
|
|
131
139
|
```
|
|
132
140
|
|
|
133
|
-
|
|
141
|
+
The config file is auto-detected from the current working directory. Supported file names (in priority order): `agent-health.config.ts`, `agent-health.config.js`, `agent-health.config.mjs`. See [`agent-health.config.example.ts`](./agent-health.config.example.ts) for all available options including authentication hooks.
|
|
142
|
+
|
|
143
|
+
> **Tip:** Run `npx @opensearch-project/agent-health doctor` to verify your configuration is loaded correctly.
|
|
134
144
|
|
|
135
|
-
|
|
145
|
+
### Environment Variables (Optional)
|
|
136
146
|
|
|
147
|
+
**For LLM Judge evaluation** (uses AWS Bedrock):
|
|
137
148
|
```bash
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
149
|
+
# Create .env file
|
|
150
|
+
cp .env.example .env
|
|
151
|
+
|
|
152
|
+
# Add AWS credentials
|
|
153
|
+
AWS_REGION=us-east-1
|
|
154
|
+
AWS_ACCESS_KEY_ID=your_access_key
|
|
155
|
+
AWS_SECRET_ACCESS_KEY=your_secret_key
|
|
142
156
|
```
|
|
143
157
|
|
|
144
|
-
|
|
158
|
+
**Full configuration guide:** [CONFIGURATION.md](./docs/CONFIGURATION.md)
|
|
145
159
|
|
|
146
160
|
---
|
|
147
161
|
|
|
@@ -303,10 +317,25 @@ Agent Health supports multiple agent types:
|
|
|
303
317
|
|
|
304
318
|
| Agent | Endpoint Variable | Setup |
|
|
305
319
|
|-------|-------------------|-------|
|
|
320
|
+
| **Observio** (sample) | `localhost:3001` | Included — see [observio-sample-agent/](./observio-sample-agent/) |
|
|
306
321
|
| Langgraph | `LANGGRAPH_ENDPOINT` | Simple localhost agent |
|
|
307
322
|
| HolmesGPT | `HOLMESGPT_ENDPOINT` | AG-UI compatible RCA agent |
|
|
308
323
|
| ML-Commons | `MLCOMMONS_ENDPOINT` | See [ML-Commons Setup](./docs/ML-COMMONS-SETUP.md) |
|
|
309
324
|
|
|
325
|
+
### Observio Sample Agent
|
|
326
|
+
|
|
327
|
+
Agent Health includes **Observio**, a reference ReAct agent you can use as a practice target for evaluating and improving agent performance. It's a great starting point if you don't have your own agent yet.
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
# Start Observio
|
|
331
|
+
cd observio-sample-agent && npm install && npm run start:ag-ui
|
|
332
|
+
|
|
333
|
+
# Evaluate it with Agent Health
|
|
334
|
+
npx @opensearch-project/agent-health run -t demo-otel-001 -a observio
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
See the [Observio README](./observio-sample-agent/README.md) for setup details and improvement areas.
|
|
338
|
+
|
|
310
339
|
|
|
311
340
|
---
|
|
312
341
|
|
|
@@ -357,7 +386,14 @@ All commits require DCO signoff and all PRs must pass CI checks (tests, coverage
|
|
|
357
386
|
|
|
358
387
|
## Documentation
|
|
359
388
|
|
|
360
|
-
|
|
361
|
-
- [
|
|
362
|
-
- [
|
|
363
|
-
- [
|
|
389
|
+
### User Guides
|
|
390
|
+
- [Getting Started](./GETTING_STARTED.md) - Step-by-step walkthrough from install to first evaluation
|
|
391
|
+
- [Configuration](./docs/CONFIGURATION.md) - Connect your agent and configure the environment
|
|
392
|
+
- [CLI Reference](./docs/CLI.md) - Command-line interface documentation
|
|
393
|
+
- [Observio Sample Agent](./observio-sample-agent/) - Reference agent for practicing agent health improvements
|
|
394
|
+
|
|
395
|
+
### Developer Guides
|
|
396
|
+
- [Development Guide](./CLAUDE.md) - Architecture, coding conventions, and contributing
|
|
397
|
+
- [Connectors Guide](./docs/CONNECTORS.md) - Create custom connectors for your agent type
|
|
398
|
+
- [ML-Commons Setup](./docs/ML-COMMONS-SETUP.md) - OpenSearch ML-Commons integration
|
|
399
|
+
- [Architecture](./docs/ARCHITECTURE.md) - System design and patterns
|