← Home System Overview Architecture Data Pipeline Health System Usage System Workflows MCP Tools

Usage System — ManyAI Desktop

Blueprint · Last updated 2026-05-02

No Dedicated Usage Log

ManyAI Desktop does not have a structured usage log or cost tracking system. API calls are made directly from the renderer process to provider APIs; token counts and costs are not captured or stored.

Smart Routing Log

The closest equivalent to usage tracking is the smart routing call log stored in localStorage under key manyai_smart_routing_log. It is a rolling array of the last 300 call results, retained for routing optimization only.

Log Entry Shape

FieldTypeDescription
tstimestampTime of the API call
workflowTypestringWorkflow type that triggered the call
providerstringProvider key used
modelstringModel identifier used
successbooleanWhether the call succeeded
latencyMsnumberResponse time in milliseconds
modestringSmart routing mode (best-first / serial / parallel)

What the Log Is Used For

The log is consumed exclusively by smartRouter.scoreProvider() to calculate per-provider success rates and speed scores. It is not surfaced as a usage report and is not exported or synced outside the app.

Viewing Aggregated Stats

Settings → Smart Routing shows aggregate stats (success rate, average latency) derived from the rolling log. There is no raw call list view and no cost breakdown.

Future Consideration

Capturing token usage would require reading usage.total_tokens from provider API responses — most OpenAI-compatible APIs return this in the response body. A dedicated usage system could then calculate per-provider cost estimates.