- AI Engineering
- Posts
- [Hands-on] Build a Memory Layer for Claude Code & Gemini CLI
[Hands-on] Build a Memory Layer for Claude Code & Gemini CLI
.. PLUS: Orchestrate Multiple Coding Agents with Vibe Kanban
In today’s newsletter:
Build a Memory Layer for Coding Agents: Step-by-Step Guide
Vibe Kanban - Orchestrate Multiple Coding Agents
Reading time: 3 minutes.
Coding agents like Claude Code, Gemini CLI, Cursor, and VS Code plugins have a major limitation: they forget everything between sessions.
Without memory, they can’t retain project context, past fixes, or key decisions. What they need is a persistent memory layer to store and recall context across sessions, giving dev teams shared long-term memory across projects.
Let’s see how to set that up:
We’ll use Cipher, an open‑source memory layer for coding agents.
You can run Cipher as an MCP server so coding agents like Claude Code, Gemini CLI, or plugins for VS Code, Cursor, and Windsurf can connect directly and use its memory layer out of the box.
Step 1: Install Cipher and set up your environment:
Install Cipher (Node.js 18+)
Run npm install -g @byterover/cipher
to install globally. The -g
option ensures you can run Cipher from any folder in your system.
Set up
.env
with Ollama Base URL
Add OLLAMA_BASE_URL=http://localhost:11434 to your .env
file.
This tells Cipher where to find your local Ollama server.
You can also add other environment variables here (for example, API keys or custom configs).
Any model you run locally with Ollama such as nomic-embed-text or another open source embedding model can be referenced through this variable.
Create
memAgent/cipher.yml
(Configuration File)
This file defines:
Your embedding provider and model (for example, Ollama with nomic-embed-text).
The system prompt that guides your agent’s behavior.

Step 2: Add Cipher as MCP Server
Now we need to tell your coding agent (Claude Code or Gemini CLI) how to discover and connect to Cipher.
Update
settings.json
(for Gemini CLI)Add the following configuration:

"command": "cipher"
→ Runs Cipher as the MCP server."args"
→ Passes startup options:--mode mcp
→ Run in MCP (Model Context Protocol) mode.--agent ./memAgent/cipher.yml
→ Points to your cipher.yml config file.
"env"
→ You can set environment variables directly here. For example, setting OLLAMA_BASE_URL lets Cipher know where to reach your local Ollama instance for embeddings.
If using Claude Code
Add the same block into
.mcp.json
instead ofsettings.json
.
Step 3: Interact with Cipher through Gemini CLI
Now that the MCP server is running and connected, you can now chat with Gemini CLI.
For example, ask Gemini CLI to analyze your project structure. It will talk to Cipher MCP, map the structure, detect patterns, and save them locally.
This reusable context can then be shared across Claude Code, Cursor, or any other connected coding agent.
Check out the demo here:
By default, Cipher saves context locally. You can also plug it into vector or graph databases if you want persistence.
ByteRover takes this further: it stores context in the cloud, makes it shareable with your team, and accessible across all your agents.
Vibe Kanban lets you orchestrate Claude Code, Gemini CLI, Codex, and other AI coding agents in parallel, all from a single unified dashboard.
AI coding agents are taking on more of the hands-on work, while developers are spending more time planning, reviewing, and coordinating across tools.
Vibe Kanban streamlines this process, enabling you to switch between Claude Code, Gemini CLI, and Codex, and track task status from a single dashboard.
Key Features:
Easily switch between different coding agents
Orchestrate the execution of multiple coding agents in parallel or in sequence
Quickly review work and start dev servers
Track the status of tasks that your coding agents are working on
Centralize configuration of coding agent MCP configs
It’s your personal MCP for managing code-writing bots.
That’s a Wrap
That’s all for today. Thank you for reading today’s edition. See you in the next issue with more AI Engineering insights.
PS: We curate this AI Engineering content for free, and your support means everything. If you find value in what you read, consider sharing it with a friend or two.
Your feedback is valuable: If there’s a topic you’re stuck on or curious about, reply to this email. We’re building this for you, and your feedback helps shape what we send.
WORK WITH US
Looking to promote your company, product, or service to 150K+ AI developers? Get in touch today by replying to this email.