Behavioral Analysis: How OMEGA Learns Your Work Patterns
Your AI agent watches you work every session. It should be learning from that. OMEGA's behavioral analysis system infers your tool preferences, git habits, session timing, and workflow sequences from observed behavior. Eight extractors. Zero LLM calls. Pure SQL.

The problem: every session starts from zero
You open a new session. The agent doesn't know you commit frequently with conventional prefixes. It doesn't know you prefer Grep over Bash for search. It doesn't know you work evenings, or that handlers.py and tool_schemas.py always change together in your codebase.
This information exists. It's in the audit logs, git history, session records, and file claim tables. But no one reads it.
OMEGA's behavioral analysis system mines these tables automatically. It extracts patterns, scores them for confidence, applies temporal decay so stale habits fade, and lets you confirm or deny what it finds. The result: a living behavioral profile that makes every session smarter than the last.
Eight extractors, eight dimensions
Each extractor runs pure SQL against OMEGA's coordination tables. No embeddings, no LLM calls, no external APIs. The extractors analyze different dimensions of how you work:
Which tools you reach for, usage ratios across categories
"Uses Grep 4x more than Bash for search"
Commit frequency, conventional prefixes, message length, branch discipline
"Commits frequently (avg 5.2/session)"
Peak work hours, average duration, day-of-week patterns
"Works primarily in the evening (19:00–23:00 ICT)"
Files that always change together across sessions
"handlers.py + tool_schemas.py always co-edited"
Dominant project, multi-project breadth
"Primary project: omega (78% of sessions)"
Consecutive tool-call pairs, handoff discipline
"Always follows Read with Edit (82% of sessions)"
Thoroughness, blocker frequency, decision density
"Thorough handoff writer: includes next_steps (14/16)"
Completion rate, average claim-to-done duration
"High completion rate: 87% (26/30 tasks)"
Every extractor requires a minimum number of sessions before it will emit a pattern. Tool preferences need at least 3 sessions. Git analysis needs 5 commits. Session timing needs 5 sessions. This prevents noisy one-off behaviors from becoming stored patterns.
The extractors don't just count occurrences. They compute ratios, detect dominance, and identify sequences. The tool preference extractor, for example, groups tools by functional category (search tools, edit tools) and computes cross-category usage ratios. A 4:1 ratio of Grep to Bash for search tasks is a pattern. A 1.2:1 ratio is noise.
How patterns earn trust
Not all patterns are created equal. A pattern observed in 2 sessions shouldn't carry the same weight as one confirmed across 20. OMEGA scores every pattern with a three-component confidence formula:
Breadth measures how many distinct sessions the pattern appeared in. A tool preference seen in 15 of 15 sessions is more reliable than one seen in 3 of 3.
Volume counts total datapoints. 200 Grep calls across those 15 sessions is stronger evidence than 10 calls across the same 15.
Consistency gets the highest weight (0.4) because it's the hardest to game. A tool usage ratio of 4:1 that holds steady across sessions is a real preference. A ratio that swings between 2:1 and 10:1 is unreliable.
On top of the base score, every pattern decays over time with a 30-day half-life. A pattern you haven't exhibited in two months fades to near-zero. This prevents stale habits from persisting when your workflow evolves.
# Confidence in practice:
Pattern: "Uses Grep 4x more than Bash for search"
breadth: 15 sessions / 15 required = 1.0 (× 0.3)
volume: 200 calls / 50 required = 1.0 (× 0.3)
consistency: ratio 4.0 / 5.0 cap = 0.8 (× 0.4)
─────────────────────────────────────────────
raw confidence: 0.92
decay (last seen 5 days ago):
0.92 × e^(-5/43.3) = 0.82
→ Stored and surfaced (threshold: 0.7)Pattern evolution
Patterns aren't static snapshots. They evolve through a lifecycle:
When an extractor re-discovers a pattern that already exists, it doesn't create a duplicate. Instead, it reinforces the existing pattern: bumping confidence by +0.03, updating the evidence count, and refreshing the last-evidence timestamp (which resets temporal decay).
Unconfirmed patterns cap at 0.95 confidence no matter how much evidence accumulates. Only explicit user confirmation (via omega_habits(action='confirm')) lifts the cap.
If a pattern is wrong, denying it sets confidence to 0.0, marks it as suppressed, and prevents the extractor from ever re-creating it. The system respects your judgment over its own inference.
# Pattern lifecycle in action:
Session 1: [extract] "Commits frequently (avg 5.2/session)"
[store] conf=0.72, pattern_key=git_commit_frequency
Session 5: [extract] Same pattern re-discovered
[reinforce] conf 0.72 → 0.75, evidence updated
Session 12: [extract] Still consistent
[reinforce] conf 0.75 → 0.78
User: omega_habits(action='confirm', pattern_id='mem-a3f2...')
[confirm] conf → 0.90, cap removedCross-pattern correlations
Individual patterns are useful. Correlations between them are insightful. OMEGA detects when patterns from different dimensions co-occur and generates cross-pattern insights:
- •Timing + Handoffs: "Your evening sessions correlate with thorough handoffs"
- •Timing + Git: "Your weekday work pattern aligns with frequent commit style"
- •Project + Tasks: "Task completion is highest on your primary project"
- •Workflow + Handoffs: "Your handoff discipline habit correlates with thorough handoffs"
Correlations require both component patterns to be active (above the 0.7 surfacing threshold). The correlation confidence is 90% of the weaker component, so they only surface when both underlying patterns are solid.
Your behavioral profile
All of this synthesizes into a composite profile. OMEGA picks the highest-confidence pattern per dimension and generates a human-readable summary:
$ omega_habits(action='profile')
# Your Behavioral Profile
> Evening worker, atomic committer, focused on omega,
> thorough handoff writer
## Dimensions
| Dimension | Pattern | Conf |
|------------------|--------------------------------------------|------|
| session_timing | Works primarily in the evening (19-23 ICT) | 88% |
| git_workflow | Commits frequently (avg 5.2/session) | 82% |
| project_focus | Primary project: omega (78% of sessions) | 91% |
| handoff_quality | Thorough handoff writer (14/16 handoffs) | 85% |
| tool_preference | Heavy Grep user (34% of tool calls) | 79% |
## Insights
- Your evening sessions correlate with thorough handoffs
- Task completion is highest on your primary project
8 patterns | avg confidence 84%The profile summary uses dimension-specific phrase builders. A session timing pattern containing "evening" becomes "evening worker." A git pattern with "frequently" becomes "atomic committer." These compose into a concise identity line at the top.
Actionable recommendations
Patterns are descriptive. Recommendations are prescriptive. OMEGA evaluates 8 condition-based rules against your active patterns and generates suggestions when triggers match:
| Trigger | Category | Suggestion |
|---|---|---|
| Sessions avg > 1h | Productivity | Use omega_checkpoint and take breaks in 60–90min blocks |
| No handoff before exit | Workflow | Create handoffs before ending sessions for faster starts |
| High blocker rate | Planning | Break tasks into smaller units, flag dependencies earlier |
| Low task completion | Task Mgmt | Define smaller, more specific tasks |
| Single-project tunnel | Focus | Schedule dedicated sessions for neglected projects |
| Detailed commit messages | Git | Consider smaller, atomic commits to reduce churn |
| Frequent weekend work | Wellbeing | Set session time boundaries if unintentional |
| 3+ co-edit clusters | Efficiency | Build a shared test suite covering co-edited file groups |
Recommendations only fire when their trigger pattern is active and above the confidence threshold. If your session durations drop below an hour, the "take breaks" recommendation silently disappears. No stale advice.
Technical details
A few implementation notes for those who want to dig deeper:
Extraction is periodic. Behavioral analysis runs every 3 days via the auto-capture pipeline, not on every session start. This keeps session startup fast while still catching evolving patterns.
Wilson score intervals. The follow-through predictor (a sibling feature) uses Wilson binomial confidence intervals instead of naive percentage calculations. This gives reliable bounds even with small sample sizes, critical when an entity has only 5-10 resolved outcomes.
Denied patterns never return. When you deny a pattern, it's marked with user_confirmed: false. The analyze_and_store method checks this flag before storing and skips any pattern whose key matches a denied record. This prevents the system from nagging you about inferences you've already rejected.
No coordination table lock. All extractors use read-only SQL queries against the coordination database. They never write to coordination tables, only to the memories table via the standard store path. This means behavioral analysis can run concurrently with active coordination without contention.
Related reading
Behavioral analysis ships with OMEGA. Source on GitHub.