Give Claude Code a memory that never forgets
Features
- Automatic context — Relevant memories are loaded at the start of every session, so Claude already knows what you've been working on
- Mid-session memory — As you work, relevant memories are surfaced automatically based on what you're asking about
- Session capture — When you end a session, your conversation is automatically summarized and stored with tool-aware compression
- Session recall — Pick up exactly where you left off with
/claude-cognis:recall
- Personal + team memory — Your memories are private by default; team knowledge is shared across everyone on the same repo
- Semantic search — Find past decisions, patterns, and context using natural language queries
- Codebase indexing — Analyze and store your project's architecture so Claude understands your codebase from the first message
- Memory stats — See what Cognis has stored with
/claude-cognis:memory-stats
- Smart context assembly — Cognis intelligently combines short-term and long-term memory to build the most relevant context
Quick Start
1. Get your API key at studio.lyzr.ai
2. Install the plugin
In Claude Code, run:
/plugin marketplace add Lyzr-Cognis/claude-cognis
/plugin install claude-cognis
3. Set your API key
export LYZR_API_KEY="your-api-key"
Or save it permanently in ~/.cognis-claude/settings.json:
{ "apiKey": "your-api-key" }
That's it. Cognis will automatically load memories when you start a session and save them when you stop.
Architecture
How It Works
Hooks
Cognis uses Claude Code's hook system to work automatically in the background.
| Hook | Trigger | What it does |
|---|
SessionStart | Every new session | Loads relevant personal and team memories into context |
UserPromptSubmit | Each user message | Surfaces relevant memories mid-session based on what you're working on |
Stop | Session ends | Summarizes the conversation and saves it to memory with tool-aware compression |
Skills
Natural language triggers — just talk to Claude and the right skill activates.
| Skill | Trigger phrases | What it does |
|---|
cognis-search | "what did I work on?", "find that decision about..." | Searches your memories using semantic search |
cognis-save | "remember this", "save this as project knowledge" | Saves specific information to persistent memory |
MCP Tools
For advanced usage, Cognis exposes 8 tools via the Model Context Protocol.
| Tool | Description |
|---|
add_memory | Store information in long-term memory |
search_memories | Semantic search across personal and/or team memories |
get_memories | List stored memories without a search query |
update_memory | Update an existing memory's content or metadata |
delete_memory | Delete a specific memory by ID |
delete_all_memories | Clear all memories for a session (requires confirmation) |
get_context | Intelligent context assembly combining short-term and long-term memory |
search_summaries | Search past session summaries and key decisions |
Commands
| Command | Description |
|---|
/claude-cognis:index | Analyze and index the current codebase |
/claude-cognis:recall | Recall last session context to pick up where you left off |
/claude-cognis:memory-stats | Show memory statistics and recent session history |
/claude-cognis:project-config | Configure per-project settings |
/claude-cognis:logout | Remove stored API credentials |
Configuration
Global Settings
Stored in ~/.cognis-claude/settings.json: