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:
| Runtime | Configuration |
|---|---|
| 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 type | What it is | Example locations |
|---|---|---|
instructions:root | Project-wide instructions | AGENTS.md ↔ CLAUDE.md |
skill | Named, invocable capability | .claude/skills/, .codex/skills/, .ai/ |
subagent | Specialized agent for delegated work | .claude/agents/, .codex/agents/, .ai/ |
What AgentMesh adds to your repo
After agentmesh init, you will see:
| File / folder | Committed? | Purpose |
|---|---|---|
AGENTS.md | Yes | Canonical cross-runtime instructions |
.ai/ | Yes | Canonical skills and subagents |
agentmesh.lock | Yes | Resolved sync state (review in PRs like any lockfile) |
agentmesh.config.yaml | Optional | Overrides — only needed for non-default behavior |
.claude/settings.local.json | No (gitignored) | Claude hook entry on your machine |
.codex/hooks.json | No (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 initimports what you already have - Explicit hook installation — hooks are installed only when you run
initorinstall - Recoverable conflicts — auto-resolution with audit trail; restore losing versions with
agentmesh restore
Supported runtimes
| Runtime | v0.1 status |
|---|---|
| Claude Code | Bundled |
| Codex | Bundled |
| Cursor | Planned v0.2 |
| Copilot | Planned v0.2 |
| Gemini CLI | Planned v0.2 |
Getting started
- Install AgentMesh (official script for macOS, Linux, and Windows)
- Follow the Quick Start to initialize a repository
- 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.