A skill that adds intelligent memory management on top of MuninnDB for AI agents.
This skill extends MuninnDB with:
| Feature | What It Does |
|---|---|
| Session Memory Extraction | Automatically extract key insights, decisions, and facts from conversations |
| Smart Deduplication | Check if memory already exists before storing |
| Project-Based Vaults | Auto-detect vault from working directory (e.g., my-project/ → my-project vault) |
| Config Management | CLI tools for managing config and vaults (config.sh, vaults.sh) |
| Security-First Design | API keys stored separately, never exposed to the LLM |
| Cross-Platform | Bash scripts for macOS/Linux, PowerShell for Windows |
- Cognitive Memory - Temporal priority, Hebbian learning, ACT-R scoring
- Multi-Vault - Isolated namespaces per project
- REST API - Port 8475 for storage/retrieval
- MCP Tools - Native integration with Claude, Cursor, etc.
This skill wraps MuninnDB with workflow automation and security that MuninnDB doesn't provide out of the box.
This skill can also set up your project's agents.md with MuninnDB instructions:
# Add MuninnDB instructions to agents.md in current directory
~/.opencode/skill/muninn-memory/scripts/setup-agents-md.sh
# Or specify a directory
~/.opencode/skill/muninn-memory/scripts/setup-agents-md.sh /path/to/projectThis will:
- Create
agents.mdif it doesn't exist - Append MuninnDB instructions if
agents.mdexists but doesn't have them - Skip if MuninnDB section already present
The instructions tell agents to proactively check MuninnDB before answering questions.
npx skills add webboty/muninn-memory-skill# Clone the repository
git clone https://github.com/webboty/muninn-memory-skill.git ~/.opencode/skill/muninn-memory
# Copy example configs and customize
cp ~/.opencode/skill/muninn-memory/examples/config.json.example ~/.opencode/skill/muninn-memory/config.jsonAfter installing the skill, you MUST create config files. The skill will not work without them:
# Find where the skill is installed (depends on agent)
# Common locations:
# - ~/.agents/skills/muninn-memory/
# - ~/.opencode/skill/muninn-memory/
# - .agents/skills/muninn-memory/
# Copy and edit the example
cp examples/config.json.example config.json# Set your API endpoint
./config.sh set-api-endpoint http://localhost:8475
# Or manually edit config.json:
# - api.endpoint: your MuninnDB URL
# - default_vault: vault name to use by default# Create a vault config
./vaults.sh create my-vault
# Add your API key (generate via: muninn api-key create --vault my-vault)
./vaults.sh add-key my-vault "mk_your_key_here"./config.sh add-project "my-project" "my-vault"Note: The skill may be installed in different locations depending on the agent. Common paths:
~/.agents/skills/muninn-memory/(npx install)~/.opencode/skill/muninn-memory/(manual).agents/skills/muninn-memory/(project local)
Replace <skill-dir> below with your actual installation path.
# Set your API endpoint
<skill-dir>/config.sh set-api-endpoint http://localhost:8475
# Set your default vault
<skill-dir>/config.sh set-default-vault default
# Map a project to a vault
<skill-dir>/config.sh add-project "my-project" "my-project"# Create vault config
<skill-dir>/vaults.sh create my-project
# Add API key (generate via: muninn api-key create --vault my-project)
<skill-dir>/vaults.sh add-key my-project "mk_your_key_here"The skill activates when you say:
- "remember that..." / "store this..."
- "recall memories about..."
- "extract memories from this session"
- "what do you know about..."
When you say "extract memories from this session", the skill:
- Gathers recent conversation context
- Analyzes for decisions, facts, preferences, insights
- Checks for duplicates before storing
- Stores to the correct vault based on project
The skill automatically resolves the right vault:
- User specifies explicitly: "save to project-x vault"
- Detects from working directory:
/path/to/my-project/→my-projectvault - Falls back to default vault
- API keys stored in
vaults/*.json(not in main config) - Keys injected via bash at runtime - LLM never sees them
.gitignoreexcludes real config files from git
<skill-dir>/config.sh show # Show config
<skill-dir>/config.sh set-api-endpoint <url> # API endpoint
<skill-dir>/config.sh set-preference <api|mcp> # Engine preference
<skill-dir>/config.sh set-default-vault <v> # Default vault
<skill-dir>/config.sh add-project <p> <v> # Project → vault mapping<skill-dir>/vaults.sh list # List vaults
<skill-dir>/vaults.sh create <vault> # Create vault config
<skill-dir>/vaults.sh add-key <v> <key> # Add API key
<skill-dir>/vaults.sh remove <vault> # Remove vault
<skill-dir>/vaults.sh show <vault> # Show vault detailsvaults.sh list # List vaults
vaults.sh create <vault> # Create vault config
vaults.sh add-key <v> <key> # Add API key
vaults.sh remove <vault> # Remove vault
vaults.sh show <vault> # Show vault details| Protocol | Port | Use Case |
|---|---|---|
| REST | 8475 | API calls |
| Web UI | 8476 | Browser dashboard |
| MCP | 8750 | AI agent tools |
Where the skill is installed (varies by agent):
~/.agents/skills/muninn-memory/(vianpx skills add)~/.opencode/skill/muninn-memory/(manual install).agents/skills/muninn-memory/(project-local)
muninn-memory/
├── SKILL.md # Skill instructions (for AI agent)
├── README.md # This file (for humans)
├── config.sh # Config manager (Bash)
├── vaults.sh # Vault manager (Bash)
├── scripts/
│ ├── check.ps1 # Health check (PowerShell)
│ ├── config.ps1 # Config manager (PowerShell)
│ └── vaults.ps1 # Vault manager (PowerShell)
├── vaults/ # Vault configs (API keys here)
└── examples/ # Example configs
├── config.json.example
└── vault.json.example
On Windows, use WSL or PowerShell scripts in scripts/:
powershell -ExecutionPolicy Bypass -File scripts\check.ps1
powershell -ExecutionPolicy Bypass -File scripts\config.ps1 show- Never commit real API keys - Use
.gitignoreto excludeconfig.jsonandvaults/ - Keys stay local - The LLM uses keys via bash/curl, never sees them directly
- Separate configs - Vault-specific keys are in
vaults/*.json, not in main config
- MuninnDB running (v0.3.6+)
- Access to REST API (port 8475)
- API keys for vault authentication (or dev mode without auth)
MIT License - Feel free to use and modify!