@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 CHANGED
@@ -1,27 +1,37 @@
1
1
  # Agent Health
2
2
 
3
- [![CI](https://github.com/opensearch-project/agent-health/actions/workflows/ci.yml/badge.svg)](https://github.com/opensearch-project/agent-health/actions/workflows/ci.yml)
4
3
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE.txt)
5
4
  [![npm version](https://img.shields.io/npm/v/@opensearch-project/agent-health.svg)](https://www.npmjs.com/package/@opensearch-project/agent-health)
5
+ [![Documentation](https://img.shields.io/badge/View_Documentation-blue?logo=readthedocs&logoColor=white)](https://observability.opensearch.org/docs/agent-health/)
6
6
 
7
- [![Unit Tests](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/opensearch-project/agent-health/badges/unit-tests.json)](https://github.com/opensearch-project/agent-health/actions/workflows/ci.yml)
8
- [![Unit Coverage](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/opensearch-project/agent-health/badges/unit-coverage.json)](https://github.com/opensearch-project/agent-health/actions/workflows/ci.yml)
9
- [![Integration Tests](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/opensearch-project/agent-health/badges/integration-tests.json)](https://github.com/opensearch-project/agent-health/actions/workflows/ci.yml)
10
- [![E2E Tests](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/opensearch-project/agent-health/badges/e2e-tests.json)](https://github.com/opensearch-project/agent-health/actions/workflows/ci.yml)
7
+ ## What is Agent Health?
11
8
 
12
- An evaluation and observability framework for AI agents. Features real-time trace visualization, "Golden Path" trajectory comparison, and LLM-based evaluation scoring.
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
- Try It by running:
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
- npx @goyamegh/agent-health@latest
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 for the web UI.
30
+ Opens http://localhost:4001 with pre-loaded sample data for exploration.
21
31
 
22
- ### Architecture
23
-
24
- ![Agent Health Architecture](docs/diagrams/architecture.png)
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
+ ![Agent Health Architecture](docs/diagrams/architecture.png)
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
- ## Quick Start
71
+ ## CLI Commands
59
72
 
60
73
  ```bash
61
- # Start the web UI
74
+ # Start server (default action)
62
75
  npx @opensearch-project/agent-health
63
76
 
64
- # Open http://localhost:4001
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
- ```bash
70
- # Check configuration
80
+ # Check configuration and connectivity
71
81
  npx @opensearch-project/agent-health doctor
72
82
 
73
- # List available agents and connectors
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
- # Initialize a new project
81
- npx @opensearch-project/agent-health init
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
- For full CLI documentation, see [docs/CLI.md](./docs/CLI.md).
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
- Add your AWS credentials:
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
- ## Configuration (Optional)
112
+ Agent Health works out-of-the-box with demo data. Configure when you're ready to connect your own agent.
109
113
 
110
- All optional settings have sensible defaults. Configure only what you need.
114
+ ### Config File: `agent-health.config.ts`
111
115
 
112
- ### Agent Endpoints
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
- LANGGRAPH_ENDPOINT=http://localhost:3000
118
- HOLMESGPT_ENDPOINT=http://localhost:5050/api/agui/chat
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
- ### Storage (Persistence)
123
-
124
- For persisting test cases, experiments, and runs. Features gracefully degrade if not configured.
125
-
126
- ```bash
127
- OPENSEARCH_STORAGE_ENDPOINT=https://your-cluster.opensearch.amazonaws.com
128
- OPENSEARCH_STORAGE_USERNAME=admin
129
- OPENSEARCH_STORAGE_PASSWORD=your_password
130
- OPENSEARCH_STORAGE_TLS_SKIP_VERIFY=false # Set to true for self-signed certificates
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
- ### Traces (Observability)
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
- For agent execution traces. Features gracefully degrade if not configured.
145
+ ### Environment Variables (Optional)
136
146
 
147
+ **For LLM Judge evaluation** (uses AWS Bedrock):
137
148
  ```bash
138
- OPENSEARCH_LOGS_ENDPOINT=https://your-logs-cluster.opensearch.amazonaws.com
139
- OPENSEARCH_LOGS_USERNAME=admin
140
- OPENSEARCH_LOGS_PASSWORD=your_password
141
- OPENSEARCH_LOGS_TLS_SKIP_VERIFY=false # Set to true for self-signed certificates
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
- See `.env.example` for all available options.
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
- - [Getting Started](./GETTING_STARTED.md) - Installation, demo mode, and usage walkthrough
361
- - [ML-Commons Agent Setup](./docs/ML-COMMONS-SETUP.md) - Configure ML-Commons agent
362
- - [Development Guide](./CLAUDE.md) - Architecture and coding conventions
363
- - [AG-UI Protocol](https://docs.ag-ui.com/sdk/js/core/types#runagentinput)
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