Skip to content

feat: Add native OpenCode local plugin support #2188

Description

@wuleiyuan

Feature Request: OpenCode Local Plugin Support

Problem

Currently @memtensor/memos-local-plugin only supports OpenClaw and Hermes Agent. There is no native plugin or adapter for OpenCode (v1.18.9+), which is a widely used open-source AI coding agent.

OpenCode users can only integrate MemOS via the MCP bridge (@memtensor/memos-api-mcp), which requires a cloud API key and internet connection. A local-first plugin would give OpenCode users the same 4-layer memory (Trace/Policy/World Model/Skill), self-evolution loop, and skill crystallization that OpenClaw and Hermes users enjoy.

Requested Solution

Add an OpenCode adapter to @memtensor/memos-local-plugin that integrates natively with OpenCode's plugin system, similar to how the OpenClaw adapter works:

  1. Plugin entry: Register via OpenCode's opencode.json plugin array (e.g. "@memtensor/memos-opencode-plugin")
  2. Local-first: SQLite storage, no cloud dependency
  3. Memory tools: Expose memory_search, memory_get, skill_list, skill_get etc. as OpenCode tools
  4. Data isolation: Store data at ~/.opencode/memos-plugin/

Why OpenCode?

  • OpenCode is provider-agnostic and model-agnostic (like Hermes)
  • It has a mature plugin system (the opencode.json plugin array)
  • It supports MCP servers natively, making it easy to extend
  • It's widely adopted in the AI coding community

Alternative

At minimum, provide a first-class MCP server (@memtensor/memos-mcp) that can be plugged into OpenCode's mcp config section without requiring a cloud API key — essentially a local-first MCP variant of the existing @memtensor/memos-api-mcp.

Related

Metadata

Metadata

Labels

area:pluginOpenClaw & Hermesstatus:needs-triageNeeds initial triage | 需要初步判断 & 问题复现

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions