Behavioral Learning
How MemNexus detects patterns and learns from your behavior over time.
MemNexus doesn't just store memories — it analyzes them to detect recurring patterns, preferences, and behavioral trends. Over time, this turns raw memory into actionable intelligence.
What behavioral learning means
As you store memories, MemNexus can identify:
- Topic patterns — Which topics you work with most frequently
- Co-occurrence patterns — Which topics appear together
- Temporal patterns — When you're most active, how long sessions last
- Preference patterns — Recurring choices and decisions
- Workflow patterns — Common sequences of actions
Pattern detection
MemNexus uses graph algorithms to detect patterns across your memory graph.
Topic co-occurrence
When two topics frequently appear in the same memories, MemNexus detects a co-occurrence pattern. For example, if "debugging" and "core-api" appear together in 15 memories, that's a strong signal they're related.
mx patterns detect
mx patterns get
Community detection
Using algorithms like Louvain and label propagation, MemNexus identifies communities — clusters of topics that form natural groups.
mx topics detect-communities --algorithm louvain
Example output:
- Infrastructure community: deployment, docker, kubernetes, ci-cd
- Backend community: core-api, express, neo4j, authentication
- Frontend community: react, tailwind, next-js, components
Behavioral patterns
MemNexus can compile behavioral patterns — recurring themes in how you work:
mx patterns compile
This analyzes your memory history and extracts patterns like:
- "User frequently debugs CORS issues with API gateway"
- "User prefers TypeScript over JavaScript"
- "User's deployment process involves manual health checks"
How agents use patterns
When an AI agent has access to your patterns via MCP, it can:
- Anticipate needs — If you're working on deployment, proactively recall your deployment checklist
- Avoid known issues — If CORS problems are a recurring pattern, warn about them early
- Match preferences — Apply your known technology preferences without asking
- Suggest improvements — Identify areas where patterns suggest inefficiency
Example agent interaction
You: I need to set up a new API endpoint.
Agent (with pattern access):
Based on your patterns, I'll follow your standard approach: Express router with Zod validation, repository pattern for database access, and OpenAPI JSDoc annotations. I also see you've had issues with CORS on new endpoints before — I'll include the CORS headers from the start.
The agent knew all of this from your memory patterns, not from being told.
Progressive learning
Behavioral learning improves over time:
- Week 1: Basic preferences detected (language, tools)
- Month 1: Workflow patterns emerge (deployment process, debugging approach)
- Month 3: Deep understanding (architectural preferences, common pitfalls, team conventions)
The more memories you store, the richer the pattern detection becomes.
Privacy considerations
Behavioral patterns are derived from your memories and stored in your account. They are:
- Private — Only accessible with your API key
- Deletable — You can delete patterns at any time
- Transparent — You can inspect all detected patterns via the CLI or API
See Privacy & Security for more details.