Dev.to AI 🤖 Ai 👁 2 📖 3 min read

Agent Memory Part 1: Sharing Context Between Meta Muse and Grok Bot Using a Private GitHub Repo

--- title: "Agent Memory Part 1: Sharing Context Between Meta Muse and Grok Bot Using a Private GitHub Repo" published: true description: "Why I moved from a hosted MCP memory server to a lean private GitHub repository t

Agent Memory Part 1: Sharing Context Between Meta Muse and Grok Bot Using a Private GitHub Repo

 ---
title: "Agent Memory Part 1: Sharing Context Between Meta Muse and Grok Bot Using a Private GitHub Repo"
published: true
description: "Why I moved from a hosted MCP memory server to a lean private GitHub repository to share memory and files between AI agents for free, plus token math, pros, cons, and what comes next."

tags: ai, mcp, github, agents

If you split daily work across more than one AI assistant, in my case Meta Muse and Grok Bot, you run into two problems quickly. Neither agent knows what you decided in the other, and neither can see files generated inside the other workspace.

My old workaround was manual:

  1. Finish a session in Agent A.
  2. Export a summary into context.md alongside any generated files.
  3. Upload everything into Agent B and tell it to read the files before continuing.

That breaks down fast. Context files go stale, you waste tokens stuffing entire logs into new chats, and file versions get out of sync.

Testing Hosted MCP Memory First

My first attempt at fixing this was connecting both agents to Supermemory via its remote MCP endpoint (https://mcp.supermemory.ai/mcp). Both Muse and Grok Bot support OAuth MCP connectors, so setup took less than five minutes.

The workflow immediately felt better. Decisions written in Muse were available in Grok Bot without downloading or uploading anything again. However, within 10 minutes of real usage, I hit the free tier credit limit.

Rather than paying for a subscription right away, I paused to ask a better engineering question. What do I actually need for reliable memory across agents, and what happens if I build it myself?

Moving Shared Memory to a Lean Private GitHub Repo

Because both Muse and Grok Bot already support GitHub connectors, I replaced Supermemory with a dedicated private repository structured around minimal token overhead:

agent_memory/
├── docs/               # Canonical documents, notes, and working files
└── memory/             # Shared cross agent memory layer
    ├── PROFILE.md      # Stable preferences, background, stack, and goals
    └── HANDOFF.md      # Rolling log capped at the last 5 to 8 sessions

Instead of creating separate files for every project or letting logs grow forever, keeping memory to two concise files keeps read overhead around 1,000 tokens per session. Both agents follow progressive disclosure: they read memory/PROFILE.md and memory/HANDOFF.md at the start of a task, and only open docs/ when we are actively working on a file inside it.

At the end of a session, the active agent commits a dated summary to memory/HANDOFF.md and prunes the oldest entry so the file size stays constant.

Pros and Cons of Git Memory Storage

What works well:

  • Zero recurring cost: You rely on infrastructure you already have with no usage caps or write time LLM extraction charges.
  • Predictable token usage: Capping HANDOFF.md as a rolling window and lazy loading docs/ keeps context consumption flat.
  • Auditable history: Every memory update is a Git commit. You can inspect diffs, see which agent changed what, and roll back bad edits.
  • Files and memory live together: Working documents and session notes stay in the exact same repo.

Where it falls short:

  • No vector similarity search: Agents rely on explicit file paths rather than querying across unstructured notes by meaning.
  • No automatic conflict resolution: Hosted memory engines extract atomic facts and mark old ones as superseded. With Markdown in Git, your standing instructions must enforce pruning so files do not bloat.

Up Next: Part 2 with Hosted Hindsight

Running on GitHub gives me a free, reliable baseline for daily work. It also highlights the exact architectural differences between deterministic file storage and modern memory engines.

In Part 2 of this series, I will set up full infrastructure to run Hindsight, an open source agent memory server that combines vector search, keyword search, and temporal knowledge graphs, and compare how it behaves against this GitHub setup.

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.