Skip to content

Commit 675d243

Browse files
committed
docs(saas): §4.15 status — audit tables now exist and are written
user-console records turns and tool calls (best-effort by construction, keyed per-recorder); spend enforcement exists on the KPI leg. Current-state only. Claude-Session: https://claude.ai/code/session_01XMyuXoP35dmLmEwsvXxMKq
1 parent 4c68cfc commit 675d243

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

docs/saas.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -932,11 +932,16 @@ The data has three natures, each in the store that fits its access pattern:
932932
- **KPIs / analytics → ClickHouse.** High-cardinality product analytics (tokens/cost per
933933
org·user·model·project, tool counts, success rates) — dimensions that would blow up
934934
Prometheus cardinality. Dual-emitted from the recorder services, _derived_ not raw.
935-
**Status:** this is the one built leg — `agent_activity_kpi` is live with both writers
936-
(llm-router per LLM call, mcp-server per tool call) and a cost-aggregation API
937-
(`GET /v1/kpi/cost`). The Yugabyte audit rows (`agent_conversation_turns`,
938-
`agent_tool_calls`) have schemas but **no writers yet** (`mcp-server/TODO.md`), and
939-
`org_id`/`project_id` in KPI rows are zero until the identity contract carries them.
935+
**Status:** `agent_activity_kpi` is live with both writers (llm-router per LLM
936+
call, mcp-server per tool call), a caller-scoped cost-aggregation API
937+
(`GET /v1/kpi/cost`), and spend enforcement built on top of it (off by
938+
default). The Yugabyte audit tables now exist and are **written**
939+
user-console records turns and tool calls from the chat stream, keyed
940+
`(task_id, source, turn_index)` so multiple recorders can be reconciled. The
941+
record is **best-effort by construction** (bounded queue, written at turn
942+
end; losses counted, never silent) — anything compliance-grade needs a
943+
durable sink first (`user-console/TODO.md`). `org_id`/`project_id` in KPI
944+
rows remain zero until the identity contract carries them.
940945

941946
```sql
942947
-- YugabyteDB (Postgres-compatible). One row per model turn, written by llm-router.

0 commit comments

Comments
 (0)