Skip to content

feat(memory): add agent_memory table and memory-tools plugin - #4

Open
herjarsa wants to merge 3659 commits into
devfrom
feat/agent-memory-plugin
Open

feat(memory): add agent_memory table and memory-tools plugin#4
herjarsa wants to merge 3659 commits into
devfrom
feat/agent-memory-plugin

Conversation

@herjarsa

@herjarsaherjarsa commented Apr 25, 2026

Copy link
Copy Markdown
Owner

Issue for this PR

Closes # (new feature, no issue)

Type of change

  • New feature

What does this PR do?

Adds the �gent_memory table and memory-tools plugin for cloud backup/restore of OpenCode AgentMemory via Supabase.

Changes:

  1. �gent_memory table with FTS5 full-text search and tags support
  2. AgentMemory service in Effect (save, search, consolidate)
  3. memory-tools plugin with 5 tools:
    • memory.configure - Configure Supabase connection
    • memory.backup - Push local memories to cloud
    • memory.restore - Pull cloud memories to local (merge)
    • memory.status - Show sync status
    • memory.schedule - Get/set auto-sync interval

Cloud sync features:

  • Conflict resolution: newest wins by timestamp
  • Auto-scheduler with configurable intervals (5m, 15m, 1h, 1d, manual)
  • Works with existing OpenCode AgentMemory data

How did you verify your code works?

  • TypeScript compiles without errors in memory-tools package
  • All Bun.sqlite bindings use proper type casts
  • Plugin follows the correct Plugin interface from @opencode-ai/plugin
  • Code follows OpenCode module conventions (Effect, self-export pattern)

Checklist

  • I have not included unrelated changes in this PR

Brendonovichand others added 30 commits July 27, 2026 11:05
Co-authored-by: Jay <53023+jayair@users.noreply.github.com>
Co-authored-by: Jay <53023+jayair@users.noreply.github.com>
…#36872)
Co-authored-by: adityachaudhary99 <adityaachaudhary2003@gmail.com>
Co-authored-by: Luke Parker <10430890+Hona@users.noreply.github.com>
adamdotdevinand others added 27 commits August 12, 2026 11:45
Co-authored-by: Dax Raad <mail@thdxr.com>
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
…o smaller models like dsv4 flash (anomalyco#42045)
Co-authored-by: akenra <37288280+akenra@users.noreply.github.com>
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • Not all checklist items are checked. Please confirm you have tested locally and have not included unrelated changes.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@herjarsa@Brendonovich@Hona@usrnk1@MrMushrooooom@OpeOginni@develop7@vglafirov@rekram1-node@roborew@lakshyaag-tavily@devennavani@fwang@arvsrn@resetsix@NumerousJLs@MagnumGoYB@frederiknsgo@amypoolside@nexxeln