omx agent
Ask OnlyMetrix a data question. The agent runs deterministic CLI commands to investigate, then narrates the findings.
The LLM picks which tools to run. The Rust engine executes them. Every step is auditable.
Usage
bash
omx agent "why did revenue drop 15%?"
omx agent "what metrics are failing?" --explain
omx agent "check reliability" --jsonFlags
| Flag | Description |
|---|---|
--explain | Show each investigation step with tool name, summary, and duration |
--json | Machine-readable JSON output |
Example: Investigation Mode
bash
omx agent "why did revenue drop?" --explainRunning investigation...
Step 1: reliability_check (50ms)
> 6/11 healthy, 5 failing, 5 degraded
Step 2: query_metric (9ms)
> quarterly_revenue — 9 rows
Step 3: query_metric (7ms)
> revenue_by_country — 10 rows
Step 4: query_metric (3ms)
> total_revenue = 17.7M
Step 5: run_analysis (12ms)
> analysis complete
Answer:
Revenue metrics are degraded due to 7,901 invoices with negative
total amounts. Key metrics affected: quarterly_revenue,
revenue_by_country, total_amount, and total_revenue.
Inspect: SELECT * FROM invoices WHERE total_amount < 0 LIMIT 10
Commands run: 5
Session: 120b8bca-f9c1-4b3d-9244-08b1b491b92eHow It Works
- Your question goes to
POST /v1/chatwithinvestigation_mode: true - The Rust agent runs a tool loop (max 4 turns)
- Available tools:
query_metric,list_metrics,reliability_check,run_analysis - Each tool call is executed in-process by the Rust engine — no SQL generation
- The LLM composes a narrative from the structured results
- Every step is returned in the
steps[]array with tool name, args, summary, and duration
JSON Output
bash
omx agent "check reliability" --jsonjson
{
"type": "finding",
"narrative": "6 of 11 metrics are healthy...",
"steps": [
{
"tool": "reliability_check",
"args": {},
"summary": "6/11 healthy, 5 failing",
"duration_ms": 48
}
],
"session_id": "abc-123"
}