Sync
Moneypenny uses CRDTs (Conflict-free Replicated Data Types) at the SQLite level to sync data between agents. No central server required — agents merge state directly from each other’s database files.
Moneypenny exposes sync operations through MCP, so you can check status, push, pull, and connect to cloud sync with natural language in any MCP-compatible client (Claude Desktop, Cursor, etc.) or through the CLI.
What Syncs
| Table | Syncs | Rationale |
|---|---|---|
facts | Yes | Shared knowledge across agents |
fact_links | Yes | Graph relationships between facts |
skills | Yes | Reusable procedures propagate fleet-wide |
policies | Yes | Governance rules propagate fleet-wide |
| Messages | No | Conversations are agent-local |
| Scratch | No | Session working memory is ephemeral |
| External events | No | Raw ingest data stays with the importing agent |
How It Works
Each agent database has a unique site ID and a monotonic write clock. When you sync, CRDT metadata is used to merge changes without conflicts:
- Export pending changes as a binary payload
- Transfer the payload (local file copy or network)
- Apply the payload to the target database
- CRDT merge resolves any concurrent writes
Checking Status
mp sync statusAsk your MCP-connected agent:
Show me the sync status
Shows the site ID, database version, and per-table sync status.
Syncing
Bidirectional sync with all configured peers:
mp sync nowAsk your MCP-connected agent:
Sync with all peers now
One-way push (this agent → peer):
mp sync push --to researchmp sync push --to /path/to/other.dbAsk your MCP-connected agent:
Push my changes to the research agent
One-way pull (peer → this agent):
mp sync pull --from researchmp sync pull --from /path/to/other.dbAsk your MCP-connected agent:
Pull changes from research
Configuration
Configure peers and cloud sync in moneypenny.toml:
[sync]tables = ["facts", "fact_links", "skills", "policies"]peers = ["research", "ops-bot"]interval_secs = 300 # auto-sync every 5 minutes; 0 = manual only# cloud_url = "sqlite-cloud-url?apikey=..."Cloud Sync
For remote sync without direct file access:
mp sync connect "your-cloud-sync-url?apikey=..."mp sync nowAsk your MCP-connected agent:
Connect to cloud sync at your-cloud-sync-url?apikey=…
Cloud sync uses the same CRDT merge — the cloud backend is a relay, not an authority.
Scoped Knowledge
Sync moves rows, but visibility is controlled by fact scope:
- Private facts sync but remain invisible to agents below the trust threshold
- Shared facts are visible to all agents after sync
- Protected facts require elevated trust
Scope enforcement happens at query time via SQL filters — the sync layer moves all data; the policy layer controls who can read it.