Skip to main content

AgentMesh: Synchronize AI Coding Runtime Context

What is AgentMesh?​

AgentMesh is an open-source Rust CLI that keeps project-level AI configuration in sync across coding tools. Instead of maintaining separate copies of instructions, skills, and subagents in .claude/, .codex/, and other runtime folders, AgentMesh maintains one canonical model and propagates changes bidirectionally.

The goal: write once, run everywhere — the same way web standards let you write HTML once and run it in every browser.

The problem AgentMesh solves​

Every AI coding runtime uses its own config layout:

RuntimeConfiguration
Claude Code.claude/, CLAUDE.md
Codex.codex/, AGENTS.md
Cursor.cursor/rules
Copilot.github/copilot-instructions.md

If your team uses more than one tool — or you switch between them — you end up duplicating skills and instructions, chasing drift, and reviewing noisy diffs across dotfolders. AgentMesh sits between runtimes and keeps them aligned.

How it works (v0.1)​

AgentMesh v0.1 ships with two bundled adapters: Claude Code and Codex.

You edit a skill in .claude/skills/
↓
Runtime hook fires (~100ms)
↓
AgentMesh updates .ai/ (canonical) + .codex/ (other runtimes)
↓
agentmesh.lock records resolved state

Most of the time you never run a command. Sync is triggered by runtime hooks. A per-repo watcher daemon catches direct file edits, git pull, and other cases hooks miss.

What gets synchronized​

Entity typeWhat it isExample locations
instructions:rootProject-wide instructionsAGENTS.md ↔ CLAUDE.md
skillNamed, invocable capability.claude/skills/, .codex/skills/, .ai/
subagentSpecialized agent for delegated work.claude/agents/, .codex/agents/, .ai/

What AgentMesh adds to your repo​

After agentmesh init, you will see:

File / folderCommitted?Purpose
AGENTS.mdYesCanonical cross-runtime instructions
.ai/YesCanonical skills and subagents
agentmesh.lockYesResolved sync state (review in PRs like any lockfile)
agentmesh.config.yamlOptionalOverrides — only needed for non-default behavior
.claude/settings.local.jsonNo (gitignored)Claude hook entry on your machine
.codex/hooks.jsonNo (recommended gitignore)Codex hook entry on your machine

User-visible files stay pristine — no AgentMesh metadata blocks in your skills or instructions.

Key design principles​

  • Local-first — no hosted sync service; everything runs on your machine
  • Non-destructive adoption — agentmesh init imports what you already have
  • Explicit hook installation — hooks are installed only when you run init or install
  • Recoverable conflicts — auto-resolution with audit trail; restore losing versions with agentmesh restore

Supported runtimes​

Runtimev0.1 status
Claude CodeBundled
CodexBundled
CursorPlanned v0.2
CopilotPlanned v0.2
Gemini CLIPlanned v0.2

Getting started​

  1. Install AgentMesh (official script for macOS, Linux, and Windows)
  2. Follow the Quick Start to initialize a repository
  3. Read Repository Setup for teammate onboarding and gitignore recommendations

Most days you will not run AgentMesh commands. The CLI is for setup, inspection, and recovery — see the CLI Reference.