Observability

Monitor agent performance, trace requests, and set up alerting.

Overview

Hyperfold provides comprehensive observability through metrics, logs, traces, and alerts. Monitor agent performance, track negotiations, and get alerted to issues before they impact revenue.

Observability data is stored in Google Cloud Operations Suite (formerly Stackdriver) and accessible via CLI, API, and web console.

Key Metrics

Track key performance indicators:

bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# View agent metrics
$ hyperfold metrics agents
AGENT METRICS (24h)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NEGOTIATOR: sales-bot-01
Sessions: 1,247
Conversions: 412 (33.0%)
Revenue: $67,840
Avg Order Value: $164.66
Avg Discount: 12.3%
Margin: 46.2%
Response Time: p50: 120ms p95: 340ms p99: 890ms
Error Rate: 0.3%
LLM Tokens: 2.4M tokens ($48.00)
FULFILLMENT: fulfillment-01
Orders Processed: 389
Shipments Created: 385
Avg Processing: 4.2 minutes
Carrier Split: USPS 45%, FedEx 35%, UPS 20%
# Export metrics to JSON
$ hyperfold metrics agents --output=json --since=7d > metrics.json

Metric Categories

CategoryMetrics
BusinessRevenue, conversions, AOV, discount rate
PerformanceResponse time, throughput, error rate
CostLLM tokens, API calls, infrastructure
AgentSessions, negotiations, bundle uptake

Dashboards

bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Open metrics dashboard
$ hyperfold dashboard open
> Opening https://console.hyperfold.io/dashboard...
# Available dashboards:
# - Agent Performance
# - Revenue Analytics
# - Negotiation Insights
# - Inventory Status
# - System Health
# Create custom dashboard
$ hyperfold dashboard create --name="Sales Overview" \
--widgets='[
{"type": "counter", "metric": "sessions_today"},
{"type": "counter", "metric": "revenue_today"},
{"type": "chart", "metric": "conversion_rate", "period": "7d"},
{"type": "table", "metric": "top_products", "limit": 10}
]'
# Widget types:
# - counter: Single value with trend
# - chart: Time series visualization
# - table: Tabular data
# - gauge: Progress toward goal
# - heatmap: Activity patterns

Distributed Tracing

Trace requests across services:

bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# View traces for a session
$ hyperfold traces get --session=sess_abc123
TRACE: sess_abc123
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[0ms] Session started
│ buyer: openai_gpt4_buyer
│ customer: cust_xyz (Gold)
[45ms] ├─ ACP Search "waterproof running shoes"
│ │ products_found: 8
│ │ semantic_confidence: 0.91
│ │
[120ms] │ └─ Vector Search (Vertex AI)
│ │ query_embedding: 1536 dims
│ │ results: 8
│ │ latency: 75ms
[890ms] ├─ ACP Quote prod_aero_x2 @ $120
│ │ context: {tier: gold, history: 12 orders}
│ │
[920ms] │ ├─ Get Product (Firestore)
│ │ │ cache_hit: true
│ │ │ latency: 12ms
│ │
[980ms] │ ├─ Calculate Dynamic Price
│ │ │ floor: $92, target: $162
│ │ │ adjustments: [gold -10%, competitor -0%]
│ │
[1050ms] │ ├─ LLM Decision (OpenAI)
│ │ │ tokens: 847
│ │ │ decision: counter_offer
│ │ │ latency: 130ms
│ │
[1100ms] │ └─ Response: counter_offer @ $162
[32000ms] ├─ ACP Checkout Finalize
│ │
[32200ms] │ ├─ Process Payment (Stripe)
│ │ │ spt_token: spt_live_xxx
│ │ │ amount: $162.00
│ │ │ status: succeeded
│ │
[32500ms] │ └─ Create Order
│ │ order_id: order_789
│ │ status: confirmed
[32550ms] └─ Session complete
outcome: conversion
revenue: $162.00
duration: 32.5s

Alerting

Set up proactive alerting:

bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Configure alerts
$ hyperfold alerts create \
--name="High Error Rate" \
--condition="error_rate > 5%" \
--window="5m" \
--channels="slack:#alerts,email:ops@company.com"
> Alert created: alert_xyz123
# Alert conditions:
# - error_rate > X%
# - response_time_p95 > Xms
# - conversion_rate < X%
# - revenue_24h < $X
# - inventory_low (product specific)
# List active alerts
$ hyperfold alerts list
ACTIVE ALERTS
NAME CONDITION STATUS LAST TRIGGERED
High Error Rate error_rate > 5% OK Never
Slow Response p95 > 500ms OK Dec 18, 14:30
Low Conversion conversion < 20% ALERT Now
# View alert history
$ hyperfold alerts history --alert="High Error Rate"
ALERT HISTORY: High Error Rate
DATE STATUS DURATION DETAILS
Dec 15, 09:15 ALERT 12 min Peak: 8.2%, Root cause: DB timeout
Dec 10, 14:30 ALERT 3 min Peak: 5.4%, Transient spike
Dec 05, 11:00 ALERT 45 min Peak: 12%, Deployment issue
# Acknowledge alert
$ hyperfold alerts ack alert_xyz123 --message="Investigating"
View detailed logs with Log Analysis.