Nexus maintains a persistent knowledge base that compounds across sessions. The Memory System stores facts, procedures, and episodic memories for cross-session recall.
Facts and general knowledge:
- User preferences and settings
- Project information and conventions
- Technical concepts and definitions
- Best practices and patterns
Stored in .nexus/memory/semantic/ as vector embeddings for semantic search.
Specific events and experiences:
- Task outcomes and learnings
- Decisions and rationales
- Errors and their resolutions
- Success factors and failures
Stored in .nexus/memory/episodic/ as structured records.
Persistent knowledge base in markdown:
- Project documentation
- Skill documentation
- Session summaries
- Insights and patterns
Stored in .nexus/wiki/ as markdown files with FTS5 full-text search.
The wiki is your primary memory interface. It's a living knowledge base that grows with every session.
.nexus/wiki/
├── index.md # Wiki index
├── user/
│ └── profile.md # User model (preferences, patterns)
├── projects/
│ └── <project-name>/
│ ├── overview.md # Project overview
│ ├── decisions.md # Architectural decisions
│ └── todos.md # Open items
├── skills/
│ └── <skill-id>.md # Skill documentation
├── concepts/
│ └── <slug>.md # Technical concepts
├── insights/
│ └── patterns.md # Reusable patterns
└── sessions/
└── YYYY-MM-DD-<slug>.md # Session summaries
Nexus has built-in wiki tools:
wiki_read— Read a wiki pagewiki_write— Write/update a wiki pagewiki_log— Append to chronological logwiki_search— Search across wiki contentwiki_list— List pages by categorywiki_lint— Health-check the wikiwiki_ingest— Ingest external documentswiki_save_session— Archive session transcriptswiki_recall— FTS5 full-text search (primary memory retrieval)wiki_similar— Find related pageswiki_observe— Record user observations
At session start, Nexus recalls relevant prior context:
❯ I'm working on the authentication system
Nexus automatically runs wiki_recall to surface relevant information about authentication from previous sessions.
❯ I prefer TypeScript over JavaScript for new projects
Nexus records this observation and updates your user profile:
# User Profile
> Model of user preferences, patterns, and behaviors
Updated: 2025-01-20
## Preferences
- Prefers TypeScript over JavaScript
- Likes concise code
- Values test coverage
## Patterns
- Starts with documentation
- Uses git frequently
- Asks for explanations❯ We decided to use PostgreSQL instead of MongoDB because...
Nexus documents the decision in the project's decisions.md:
# Architectural Decisions
> Key architectural decisions and their rationales
Updated: 2025-01-20
## Database Choice (2025-01-20)
**Decision**: Use PostgreSQL instead of MongoDB
**Rationale**:
- Better for complex queries
- ACID compliance
- Mature tooling
- Team experience
**Trade-offs**:
- Less flexible schema
- Requires migrationsAt session end, Nexus saves a summary:
# 2025-01-20-auth-refactor
> Refactored authentication system
**What was asked**: Refactor the authentication system to use JWT tokens
**What was built**:
- Implemented JWT token generation
- Added token refresh logic
- Updated API endpoints
- Added unit tests
**Files modified**:
- src/auth/jwt.ts (new)
- src/api/auth.ts (modified)
- tests/auth.test.ts (new)
**Decisions**:
- Used RS256 for token signing
- Set 1-hour token expiration
- Implemented refresh token rotation
**Open items**:
- Add rate limiting
- Implement token revocationNexus uses FTS5 full-text search with BM25 ranking to recall relevant information:
❯ /wiki recall "authentication"
Searches across all wiki pages and returns the most relevant matches with scores.
Nexus builds a model of you over time:
- Preferences — What you like and dislike
- Patterns — How you typically work
- Decision history — Choices you've made
- Feedback signals — What you approve or disapprove
This model is used to personalize Nexus's behavior.
Nexus periodically nudges you to refresh important facts:
❯ Reminder: You last worked on this project 2 weeks ago. Key context:
- Using PostgreSQL for database
- Authentication uses JWT tokens
- Next milestone: Add rate limiting
Nexus recalls context across sessions:
- At session start, it runs
wiki_recallwith your opening message - It loads your user profile
- It loads the active project overview if relevant
- It surfaces relevant skills and patterns
Nexus compresses memory to manage size:
- Old sessions are archived
- Duplicate information is merged
- Less-used memories become less prominent
- Frequently-used memories are strengthened
- Let Nexus manage the wiki — Don't manually edit wiki files. Let Nexus write them.
- Use wiki_recall — Ask Nexus to recall relevant context before starting a task.
- Review session summaries — Check that session summaries capture important information.
- Run wiki_lint — Periodically health-check the wiki for orphans and stale pages.
- Ingest external docs — Use
wiki_ingestto add external documentation to your wiki.
- Skills System — How Nexus learns from tasks
- Modes — Create specialized agents
- Tools — Available tools and how to use them