Insights
Personalized analytics — usage metrics, contextual cards, AI-generated summaries, and the mobile home feed.
Sophon's insights engine watches what you do — sessions, messages, tokens, tool invocations, workflow runs, cron jobs, memory growth — and turns it into something you can glance at. The Dashboard home shows an AI-written summary of your week; mobile's home tab streams a feed of cards ("3-day streak", "you used web.search 14 times Monday"); the agent can query insights directly and bring them into a conversation.
What it computes
The engine computes 15+ metrics rolled up across time buckets (day / week / month):
- Sessions — total, active, longest, shortest
- Messages — sent, received, by agent, by channel
- Tokens — consumed, by provider, by agent, cost estimate
- Tool invocations — top tools, tools by risk, tools per agent
- Workflows — runs, success rate, average duration
- Cron jobs — fires, success rate
- Memory — entries added, entries forgotten, top entities
- Approvals — requested, approved, rejected, timed out
- Documents — uploaded, indexed size, top tags
- Streaks — days with at least one session
Metrics are cached 30 minutes. The cache is user-scoped — your metrics never see anyone else's data.
Insight cards
Raw metrics are dull. The engine produces cards — rule-based contextual callouts:
| Card category | Trigger example |
|---|---|
| Activity | "Activity trending up: 3 days of ≥ 10 sessions each" |
| Usage | "You've used browser.navigate 27 times this week — consider enabling the web-scrape skill" |
| Productivity | "Workflow morning-briefing saved an estimated 2.3 hours this month" |
| Milestone | "First week milestone — welcome to Sophon" / "1-year anniversary" |
| Anomaly | "Token usage spiked 3× yesterday vs last Monday" |
Cards surface in the Dashboard home section and mobile home feed. Each card shows the metric it's based on; you can dismiss cards you don't want to see again.
AI-generated summary
The engine periodically composes a short narrative of your activity using the configured LLM:
"This week you spent most of your time in code-review sessions with the reviewer agent — 47 messages total. Your morning-briefing workflow fired every weekday and you approved all 5 summary emails. Token spend is down 12% from last week, tracking closer to your budget."
The summary is cached 2 hours (to save tokens), with a fallback to a rule-based template if the LLM call fails or times out. It's user-scoped, so your summary reflects only your activity.
Home feed (mobile)
The mobile app's Home tab is built around insights:
- Hero card — greeting ("Good morning, Enes"), current streak, quick stats
- Daily thought — rotating curated quote (one of 12 built-ins)
- AI summary — the narrative from above, truncated for mobile
- Insight cards — scrolling list
- On this day — LLM-generated reflection from historical activity one year / one month / one week ago
- Active tasks — live list from the task ledger
- Recent sessions — jump back in
Pull-to-refresh recomputes metrics immediately (bypasses the 30-min cache).
Dashboard
Home on the Dashboard mirrors the mobile feed with more detail:
- Hero greeting + headline stats
- AI summary (full length)
- Insight cards
- Charts — session timeline, token usage, tool usage breakdown, workflow success rate
Settings → Insights lets you:
- Enable / disable specific card categories
- Adjust sensitivity of anomaly detection
- Bypass the AI summary (keep only rule-based cards)
- Clear card dismissals
The insights.query tool
Agents can query insights during a conversation:
insights.query({
category: "tokens", // or "sessions", "tools", "workflows", "memory", …
window: "week", // day / week / month / all
format: "summary" // summary (LLM), raw (JSON), cards
})Useful for questions like:
"How often did we use the
gmail.send_emailtool this month?" "What's my session streak?" "Which workflow has failed most often?"
The agent pulls the metric and answers without needing its own analytics implementation.
CLI
sophon insights metrics # all metrics for the current week
sophon insights metrics --window month
sophon insights summary # AI narrative
sophon insights cards # active insight cards
sophon insights query --category tokens --window dayREST API
GET /api/insights/metrics?window=week
GET /api/insights/summary
GET /api/insights/cards
POST /api/insights/cards/{id}/dismissAll endpoints are user-scoped — they return only the calling user's insights.
Configuration
{
"Sophon": {
"Insights": {
"MetricsCacheDuration": "00:30:00",
"SummaryCacheDuration": "02:00:00",
"AiSummaryEnabled": true,
"AnomalyDetectionEnabled": true,
"CardCategories": ["activity", "usage", "productivity", "milestone", "anomaly"]
}
}
}Limits and gotchas
- User-scoped only. There's no tenant-level aggregation for admins today. Enterprise admins can query usage reports via the Admin → Audit pipeline instead.
- AI summary costs tokens — the summary uses a fast-tier model with a 2-hour cache, so costs are small, but they're not zero. Disable
AiSummaryEnabledif you don't want it. - Anomaly detection is rule-based, not ML. It catches obvious spikes (3× vs prior) but won't catch subtle drift.
- On this day needs at least 7 days of history to start being interesting.
- Metrics are eventually consistent — events (tool invocations, token usage) can take up to 30 minutes to appear in metrics due to the cache.
Where to go next
- Mobile App — the home feed that Insights powers
- Tasks — task-level history that feeds metrics
- Audit Logging — admin-level aggregation for compliance