New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@jcmrs/opencode-vmem

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jcmrs/opencode-vmem

Persistent memory plugin for AI agents with episodic, semantic, and procedural memory

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

@jcmrs/opencode-vmem

npm version CI

A portable, persistent memory plugin for AI/LLM/Agent contexts. Provides episodic, semantic, and procedural memory capabilities.

Features

  • Episodic Memory - Captures and stores observations from tool executions
  • Semantic Memory - Extracts and stores facts, preferences, and profiles
  • Procedural Memory - Learns workflows and suggests relevant procedures
  • Semantic Search - Embedding-based similarity search with hybrid fallback
  • Context Injection - Builds relevant context for AI sessions
  • Export & Archive - Export to JSON/Markdown, archive old memories

Installation

npm install @jcmrs/opencode-vmem

Or install directly from GitHub:

npm install jcmrs/opencode-vmem

Quick Start

import { Mind } from '@jcmrs/opencode-vmem';

const mind = await Mind.open('/path/to/project');

await mind.observe({
  type: 'tool_execution',
  content: 'User prefers TypeScript over JavaScript',
  tool: 'bash'
});

const results = await mind.search('typescript preferences', 5);
console.log(results);

Tools (Agent-Callable)

ToolDescription
mind_searchSearch memories by query
mind_stateGet memory system statistics
mind_forgetMark a memory for deletion
mind_add_cardAdd a memory card
mind_contextBuild current memory context
mind_suggestGet procedure suggestions

Commands (User-Callable)

CommandDescription
/mind:statsDisplay memory statistics
/mind:search <query>Search memories
/mind:contextShow current context
/mind:forget <id>Mark memory for deletion
/mind:add <entity> <slot> <value>Add memory card
/mind:cardsList all memory cards
/mind:exportExport memory (json/md/plain)
/mind:archiveArchive current memory
/mind:helpShow help

See docs/commands.md for detailed command documentation.

Configuration

Create .opencode/vmem.json in your project:

{
  "capture": {
    "enabled": true,
    "minOutputLength": 50
  },
  "embedding": {
    "enabled": true,
    "model": "Xenova/nomic-embed-text-v1"
  },
  "context": {
    "maxTokens": 3000,
    "format": "markdown"
  }
}

See docs/configuration.md for all options.

Architecture

.opencode/
├── memory/
│   ├── mind.mv2        # Main memory store (MV2 format)
│   ├── cards.json      # Memory cards (extracted facts)
│   ├── procedures.json # Learned procedures
│   └── tombstones.json # Soft-deleted frames
├── archives/           # Archived memories
└── vmem.json           # Configuration

Memory Types

Episodic (Observations)

Raw events captured from tool executions:

  • Tool inputs and outputs
  • User interactions
  • Session context

Semantic (Memory Cards)

Extracted knowledge:

  • fact - Verified information
  • preference - User preferences
  • profile - User/Project profiles
  • goal - Stated objectives

Procedural (Workflows)

Learned patterns:

  • State-Action-Result tuples
  • Workflow templates
  • Success/failure rates

Search Modes

ModeDescription
lexLexical search (exact words)
semSemantic search (embeddings)
autoHybrid (tries semantic, falls back to lexical)

Development

# Clone and install
git clone https://github.com/jcmrs/opencode-vmem.git
cd opencode-vmem
npm install

# Run tests
npm test

# Run smoke test
npm run smoke

# Build
npm run build

# Validate real-world usage
npm run validate

CI/CD

This project uses GitHub Actions for:

  • Multi-platform testing (Ubuntu, Windows, macOS)
  • Node.js 18 and 20 support
  • Automated smoke tests
  • Coverage reporting

License

MIT

Keywords

opencode

FAQs

Package last updated on 20 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts