Answer "where is my order?" from current state.
GET /v1/entity/order/ORD-20260404-1001
{
"status": "delivered",
"freshness_seconds": 12.4
}
Event-native metrics layer
Every metric declares which events move it, and the serving layer keeps reads fresh by invalidating its cache when events arrive — a measured 1.1 s p50 event-to-metric freshness. Query live entities and metrics over typed contracts, from Python or TypeScript. Consumers are whoever needs the number now: people, dashboards, services, and AI agents.
Problem
BI on a replica answers yesterday's questions, and most workflows still read from stale warehouse snapshots, ad hoc service calls, or a cache that quietly serves 30-second-old numbers. That breaks down fastest in support, operations, and merchandising, where a six-hour-old answer is often worse than no answer at all. AgentFlow turns live operational data into a serving layer with typed entities, metrics, query endpoints, and explicit freshness signals.
User journeys
GET /v1/entity/order/ORD-20260404-1001
{
"status": "delivered",
"freshness_seconds": 12.4
}
GET /v1/health
GET /v1/slo
healthy
error_budget_remaining: 0.91
POST /v1/query
{
"question": "top products by revenue today",
"limit": 5
}
Why AgentFlow
Responses carry freshness and health context so agents can caveat or escalate instead of bluffing.
The same core API is reachable from Python and TypeScript without custom wrappers per workflow.
Schema contracts, diffs, and version-aware responses make downstream agent tooling safer to evolve.
Run the local demo path now, or extend toward the full streaming stack without rewriting the API surface.
Performance baseline
Source: docs/benchmark-baseline.json, checked on 2026-04-18.
Get started
Start with the demo path, inspect the API surface, then move into the benchmark, contracts, and operational routes. The quickest way to get signal is to query a seeded order and one live metric.
pip install agentflow-client
from agentflow import AgentFlowClient
client = AgentFlowClient(
"http://localhost:8000",
api_key="dev-key",
)
print(client.get_metric("revenue", "24h").value)
Links