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:
# 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
| Category | Metrics |
|---|---|
| Business | Revenue, conversions, AOV, discount rate |
| Performance | Response time, throughput, error rate |
| Cost | LLM tokens, API calls, infrastructure |
| Agent | Sessions, negotiations, bundle uptake |
Dashboards
# 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, chart, table, gauge, heatmap
Distributed Tracing
Trace requests across services:
# 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
[1050ms] │ ├─ LLM Decision (OpenAI)
│ │ │ tokens: 847
│ │ │ decision: counter_offer
│ │ │ latency: 130ms
[1100ms] │ └─ Response: counter_offer @ $162
[32000ms] ├─ ACP Checkout Finalize
[32200ms] │ ├─ Process Payment (Stripe)
│ │ │ status: succeeded
[32500ms] │ └─ Create Order
│ │ order_id: order_789
[32550ms] └─ Session complete
outcome: conversion
revenue: $162.00
duration: 32.5s
Alerting
Set up proactive alerting:
# 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"
# Acknowledge alert
$ hyperfold alerts ack alert_xyz123 --message="Investigating"
View detailed logs with Chain of Thought Logs.