The Observability Dashboard
You can access usage analytics by navigating to the Observability or Settings page in the Portal. The dashboard displays:- Daily Burn Rate: A chart showing your API cost over the last 30 days.
- Task Breakdown: The cost split by operation type (e.g. how much did you spend on Brain Dumps vs Consistency Checks vs Relationship Suggestions).
- Model Breakdown: The cost split by model (e.g. Grok-4 vs Kimi-k2.5).
- Token Counts: Split by prompt (input) and completion (output) tokens.
Budgets and Hard Limits
To protect self-hosters from runaway loops or excessive usage, AllCodex supports user-scoped budgets:- Daily Warning Alert: Set a soft warning threshold (e.g. $1.00/day). The Portal navigation bar will display a warning badge when your daily spending crosses this threshold.
- Hard Spending Limit: Set a hard daily budget (e.g. $2.00/day). Once this limit is reached, AllKnower will block all subsequent AI calls for the remainder of the day, returning a
403 Forbiddenerror with a budget exceeded message. - Worry-Free Defaults: The default budget is set to a conservative $0.50/day.
Database Tracking Schema
Observability metrics are tracked in AllKnower’s PostgreSQL database using three primary tables:llm_call_log
Logs every single API request sent to OpenRouter.
- Fields:
id,userId,taskType(e.g.brain_dump),model,promptTokens,completionTokens,cost,timestamp.
model_pricing
Maintains a cache of OpenRouter model prices (input cost per 1M tokens, output cost per 1M tokens) to calculate transaction costs locally.
- AllKnower automatically pulls fresh pricing from OpenRouter via
POST /usage/refresh-pricingduring non-production updates.
user_budgets
Stores the warning and limit thresholds for each user.
- Fields:
id,userId,dailyWarningLimit,dailyHardLimit.