Skip to content
Retain7

Retain7 for OpenCode

Shared memory for OpenCode

OpenCode works well alone and badly across a team: its session knows nothing about the conventions another developer's agent learned, and what it learns stays in that terminal.

How it works

One memory, shared across your tools

Run opencode mcp add and opencode mcp auth once, globally, and OpenCode gains the memory tools in every repository. A line in your AGENTS.md makes it search before answering and hand off before stopping.

Saved in Cursor

Payments go through Dodo.

Found in OpenCode

The next session searches before it answers, so the decision is already in its context.

An example memory, not customer data.

Setup

Add Retain7 to OpenCode

A minute or two, once. The same steps are in the docs.

  1. Run these once in a terminal:

    opencode mcp add retain7 --url https://retain7.com/mcp --global
    opencode mcp auth retain7
  2. So every session checks the team memory before it answers, add this line to ~/.config/opencode/AGENTS.md:

    This team keeps its project memory in Retain7. Before answering how this project does something, call the retain7 memory_search tool.

Questions about OpenCode

Is the OpenCode setup per repository?

No. The --global flag adds Retain7 for every repository, and the project is chosen from each repository's git remote.

What is a handoff?

A short note an agent leaves when it stops: what was done, what is next and what failed. The next session in any tool starts from it.

Does it work offline?

No. Retain7 is a hosted service, so OpenCode needs a connection to search or save memories.

Can I export my memories?

Yes. Any project exports as JSON or Markdown, and deleting a project, team or account removes its data.

Give OpenCode a memory that lasts.

Free for 14 days on the Team plan. No card needed.