@opensearch-project/agent-health 0.1.1 → 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 +65 -16
- package/cli/dist/index.js +752 -226
- 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 +97 -56
- package/lib/dist/index.js +82 -6
- package/package.json +6 -4
- package/server/dist/app.js +3926 -2377
- package/server/dist/index.js +3926 -2377
- package/dist/assets/index-D5yuaEp4.js +0 -267
- package/dist/assets/index-D6wGwYUm.css +0 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](LICENSE.txt)
|
|
4
4
|
[](https://www.npmjs.com/package/@opensearch-project/agent-health)
|
|
5
|
-
[](https://
|
|
5
|
+
[](https://observability.opensearch.org/docs/agent-health/)
|
|
6
6
|
|
|
7
7
|
## What is Agent Health?
|
|
8
8
|
|
|
@@ -71,18 +71,35 @@ For detailed architecture documentation, see [docs/ARCHITECTURE.md](./docs/ARCHI
|
|
|
71
71
|
## CLI Commands
|
|
72
72
|
|
|
73
73
|
```bash
|
|
74
|
-
#
|
|
74
|
+
# Start server (default action)
|
|
75
|
+
npx @opensearch-project/agent-health
|
|
76
|
+
|
|
77
|
+
# Initialize a new project (creates agent-health.config.ts and .env.example)
|
|
78
|
+
npx @opensearch-project/agent-health init
|
|
79
|
+
|
|
80
|
+
# Check configuration and connectivity
|
|
75
81
|
npx @opensearch-project/agent-health doctor
|
|
76
82
|
|
|
77
|
-
# List
|
|
83
|
+
# List resources (agents, connectors, models, test-cases, benchmarks)
|
|
78
84
|
npx @opensearch-project/agent-health list agents
|
|
79
85
|
npx @opensearch-project/agent-health list connectors
|
|
80
86
|
|
|
81
|
-
# Run a test case against an agent
|
|
87
|
+
# Run a single test case against an agent
|
|
82
88
|
npx @opensearch-project/agent-health run -t demo-otel-001 -a demo
|
|
83
89
|
|
|
84
|
-
#
|
|
85
|
-
npx @opensearch-project/agent-health
|
|
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
|
|
93
|
+
|
|
94
|
+
# Export benchmark test cases as JSON
|
|
95
|
+
npx @opensearch-project/agent-health export -b "My Benchmark" -o test-cases.json
|
|
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
|
|
100
|
+
|
|
101
|
+
# One-time migration for existing benchmark runs
|
|
102
|
+
npx @opensearch-project/agent-health migrate --dry-run
|
|
86
103
|
```
|
|
87
104
|
|
|
88
105
|
For full CLI documentation, see [docs/CLI.md](./docs/CLI.md).
|
|
@@ -94,21 +111,19 @@ For full CLI documentation, see [docs/CLI.md](./docs/CLI.md).
|
|
|
94
111
|
|
|
95
112
|
Agent Health works out-of-the-box with demo data. Configure when you're ready to connect your own agent.
|
|
96
113
|
|
|
97
|
-
###
|
|
114
|
+
### Config File: `agent-health.config.ts`
|
|
98
115
|
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
# Create .env file
|
|
102
|
-
cp .env.example .env
|
|
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):
|
|
103
117
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
AWS_SECRET_ACCESS_KEY=your_secret_key
|
|
118
|
+
```bash
|
|
119
|
+
# Generate a config file with examples
|
|
120
|
+
npx @opensearch-project/agent-health init
|
|
108
121
|
```
|
|
109
122
|
|
|
110
|
-
|
|
123
|
+
Or create it manually:
|
|
124
|
+
|
|
111
125
|
```typescript
|
|
126
|
+
// agent-health.config.ts
|
|
112
127
|
export default {
|
|
113
128
|
agents: [
|
|
114
129
|
{
|
|
@@ -117,11 +132,29 @@ export default {
|
|
|
117
132
|
endpoint: "http://localhost:8000/agent",
|
|
118
133
|
connectorType: "rest", // or "agui-streaming", "subprocess"
|
|
119
134
|
models: ["claude-sonnet-4"],
|
|
135
|
+
useTraces: true, // Enable OpenTelemetry trace collection
|
|
120
136
|
}
|
|
121
137
|
],
|
|
122
138
|
};
|
|
123
139
|
```
|
|
124
140
|
|
|
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.
|
|
144
|
+
|
|
145
|
+
### Environment Variables (Optional)
|
|
146
|
+
|
|
147
|
+
**For LLM Judge evaluation** (uses AWS Bedrock):
|
|
148
|
+
```bash
|
|
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
|
|
156
|
+
```
|
|
157
|
+
|
|
125
158
|
**Full configuration guide:** [CONFIGURATION.md](./docs/CONFIGURATION.md)
|
|
126
159
|
|
|
127
160
|
---
|
|
@@ -284,10 +317,25 @@ Agent Health supports multiple agent types:
|
|
|
284
317
|
|
|
285
318
|
| Agent | Endpoint Variable | Setup |
|
|
286
319
|
|-------|-------------------|-------|
|
|
320
|
+
| **Observio** (sample) | `localhost:3001` | Included — see [observio-sample-agent/](./observio-sample-agent/) |
|
|
287
321
|
| Langgraph | `LANGGRAPH_ENDPOINT` | Simple localhost agent |
|
|
288
322
|
| HolmesGPT | `HOLMESGPT_ENDPOINT` | AG-UI compatible RCA agent |
|
|
289
323
|
| ML-Commons | `MLCOMMONS_ENDPOINT` | See [ML-Commons Setup](./docs/ML-COMMONS-SETUP.md) |
|
|
290
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
|
+
|
|
291
339
|
|
|
292
340
|
---
|
|
293
341
|
|
|
@@ -342,6 +390,7 @@ All commits require DCO signoff and all PRs must pass CI checks (tests, coverage
|
|
|
342
390
|
- [Getting Started](./GETTING_STARTED.md) - Step-by-step walkthrough from install to first evaluation
|
|
343
391
|
- [Configuration](./docs/CONFIGURATION.md) - Connect your agent and configure the environment
|
|
344
392
|
- [CLI Reference](./docs/CLI.md) - Command-line interface documentation
|
|
393
|
+
- [Observio Sample Agent](./observio-sample-agent/) - Reference agent for practicing agent health improvements
|
|
345
394
|
|
|
346
395
|
### Developer Guides
|
|
347
396
|
- [Development Guide](./CLAUDE.md) - Architecture, coding conventions, and contributing
|