Skip to content

Context Gateway

Context Gateway automatically synchronizes agent definitions, skills, and commands from a single canonical source (.memtomem/) to multiple AI editor runtimes. Define an agent once — it works identically across 6 AI editors.

.memtomem/ # Canonical source
├── agents/ # Agent definitions
├── skills/ # Skill definitions
└── commands/ # Command definitions
↕ Auto-sync
.claude/agents/ # Claude Code
.claude/skills/ # Claude Code
.gemini/agents/ # Gemini CLI
.gemini/skills/ # Gemini CLI
~/.codex/agents/ # Codex CLI

If you already have agent/skill files from Claude Code or Gemini CLI, you can reverse-extract them to the canonical source:

Terminal window
mm context import # runtime files → .memtomem/
mm context sync # .memtomem/ → all runtimes

Each runtime uses different configuration formats. Context Gateway converts automatically:

RuntimeFormat
Claude Code / Gemini CLIMarkdown + YAML frontmatter
Codex CLITOML

Field loss during conversion is tracked by severity:

SeverityBehavior
ignoreSkip (field not supported in target runtime)
warnPrint warning, continue
errorAbort conversion
RuntimeAgentsSkillsCommands
Claude CodeYesYesYes
Gemini CLIYesYes
Codex CLIYes
CursorYes
WindsurfYes
Claude DesktopYes

Load agent definitions and skills through Context Gateway in LangGraph/CrewAI agents:

from memtomem.context import load_agent_definition
# Load agent definition from .memtomem/agents/
agent_def = load_agent_definition("analyzer")