Skip to content

Configuration

Agent Health works out of the box with demo data and file-based storage. Configure it when you’re ready to connect your own agent or use production services.

Most users can start immediately with no configuration:

Terminal window
npx @opensearch-project/agent-health@latest

This works because:

  • Travel Planner demo test cases are built-in
  • File-based storage is used by default (no OpenSearch needed)
  • Demo Judge provides mock evaluation (no AWS credentials needed)

Settings are loaded in this order (later overrides earlier):

1. Built-in defaults
|
2. Environment variables (.env file)
|
3. JSON config file (agent-health.config.json) — auto-created
|
4. TypeScript config file (agent-health.config.ts) — optional, for custom agents/connectors

On first startup, Agent Health creates agent-health.config.json in your working directory:

{
"storage": {
"type": "file",
"dataDir": ".agent-health-data"
},
"server": {
"port": 4001
},
"debug": false
}

Settings saved through the UI are persisted to this file automatically.

Create agent-health.config.ts for custom agents, models, or connectors. Generate one with:

Terminal window
npx @opensearch-project/agent-health init

Or create manually:

agent-health.config.ts
import { defineConfig } from '@opensearch-project/agent-health';
export default defineConfig({
agents: [
{
key: 'my-agent',
name: 'My Custom Agent',
connectorType: 'rest',
endpoint: 'http://localhost:8080/chat',
models: ['claude-sonnet-4'],
useTraces: true,
},
],
storage: {
endpoint: process.env.OPENSEARCH_STORAGE_ENDPOINT,
username: 'admin',
password: process.env.OPENSEARCH_STORAGE_PASSWORD,
},
});
OptionTypeDescription
keystringUnique identifier
namestringDisplay name
endpointstringURL or command name
connectorTypestring'agui', 'rest', 'subprocess', 'claude-code', 'mock'
modelsstring[]Supported model keys
headersRecord<string, string>HTTP headers
useTracesbooleanEnable trace collection
connectorConfiganyConnector-specific config
descriptionstringDescription
enabledbooleanEnable/disable agent
OptionTypeDescription
agentsUserAgentConfig[]Custom agents (merged with defaults)
modelsUserModelConfig[]Custom models (merged with defaults)
connectorsAgentConnector[]Custom connectors
storageStorageConfigOpenSearch storage config
observabilityObservabilityConfigOpenSearch logs config
testCasesstring | string[]Test case file patterns
reportersReporterConfig[]Output reporters
judgeJudgeConfigJudge model configuration
extendsbooleanExtend defaults (true) or replace (false)

These agents work without configuration:

AgentKeyConnectorNotes
Demo AgentdemomockSimulated responses for testing
Claude Codeclaude-codeclaude-codeRequires claude CLI installed
Langgraphlanggraphagui-streamingAG-UI protocol
ML-Commonsmlcommons-localagui-streamingLocal OpenSearch
HolmesGPTholmesgptagui-streamingAI investigation agent

Required for the Bedrock LLM judge and Claude Code agent.

VariableDescriptionDefault
AWS_PROFILEAWS profile to usedefault
AWS_REGIONAWS regionus-west-2
AWS_ACCESS_KEY_IDExplicit access key (alternative to profile)
AWS_SECRET_ACCESS_KEYExplicit secret key
AWS_SESSION_TOKENSession token (for temporary credentials)

Override the default file-based storage with an OpenSearch cluster.

VariableDescriptionDefault
OPENSEARCH_STORAGE_ENDPOINTStorage cluster URL
OPENSEARCH_STORAGE_USERNAMEUsername
OPENSEARCH_STORAGE_PASSWORDPassword
OPENSEARCH_STORAGE_TLS_SKIP_VERIFYSkip TLS verificationfalse

For viewing agent traces and logs.

VariableDescriptionDefault
OPENSEARCH_LOGS_ENDPOINTLogs cluster URL
OPENSEARCH_LOGS_USERNAMEUsername
OPENSEARCH_LOGS_PASSWORDPassword
OPENSEARCH_LOGS_TRACES_INDEXTraces index patternotel-v1-apm-span-*
OPENSEARCH_LOGS_INDEXLogs index patternml-commons-logs-*
VariableDescriptionDefault
DEBUGEnable verbose debug loggingfalse

Check your configuration with the doctor command:

Terminal window
npx @opensearch-project/agent-health doctor
$ agent-health doctor
✓ Config File: Found: agent-health.config.ts
✓ AWS Credentials: Profile: Bedrock
✓ Agents: 3 agents configured
⚠ OpenSearch Storage: Not configured
⚠ OpenSearch Observability: Not configured