About Agent Coherence
Agent Coherence is an MCP server published by cohexa-ai in the Agents category: the data integrity layer that stops AI agents from silently corrupting shared state — across sessions, time, and concurrent runs. Conduid read 11 tools from its source: swg_accept, swg_decline, swg_gate, swg_reacquire, swg_read, swg_release and 5 more. No package is published for it, so it installs from a source checkout.
The repository has 15 stars and 6 forks, and its last commit was on 30 Nov 2026. Conduid has no tagged release on record for it. Its topics include agent-memory, autogen, cache-coherence, crewai, langchain and llm-agent.
Install
git clone https://github.com/cohexa-ai/agent-coherenceTools (11)
swg_acceptAs the successor, accepts a handoff without writing the path| Parameter | Type | Description |
|---|---|---|
| path * | string |
swg_declineAs the successor, declines a handoff; the giver may write the path again| Parameter | Type | Description |
|---|---|---|
| path * | string |
swg_gateEffect fence — re-checks the `(version, owner_generation)` pair from your `swg_read` right before an irreversible external action (a webhook, a deploy, an opened PR), and denies if the value moved OR the grant it was read under was reclaimed OR a peer's write-claim preempted it (which moves neither comparand — the fence also re-checks that the grant still stands)| Parameter | Type | Description |
|---|---|---|
| expected_generation | integer | |
| expected_version * | integer | |
| path * | string |
swg_reacquireRecovery — clears the stale view + mandatory fresh read after a deny; drops every hold the session has| Parameter | Type | Description |
|---|---|---|
| path * | string |
swg_readTracked read — registers the agent's view of the file. If the bytes on disk are not what the coordinator recorded, the read returns a `stale_view` deny with no version. Retry `swg_reacquire` + `swg_read` for up to about a minute first, since a peer's commit may still be reaching disk; if it stays denied past that, the bytes on disk were never recorded (an out-of-band edit, a commit whose disk write failed, or a write whose commit did not reach the coordinator), and reading again does not clear it, so `swg_write` the reacquired content to record it| Parameter | Type | Description |
|---|---|---|
| path * | string |
swg_releaseGives back the session's write grant on one file and keeps its other holds, so agents waiting for that file need not wait for the grant to expire| Parameter | Type | Description |
|---|---|---|
| path * | string |
swg_statusThree-state coordination health: `on` / `off` / `unknown`, plus this session's `session_agent_id`, the id another session names to hand it a path; the server's mode (`on_held`); the files this session holds (`held`); and who holds each tracked file for writing (`holder_agent_id`, `held_by`)swg_transferHands this session's claim on one or more paths to the session whose `session_agent_id` it names; until the handoff ends, this session's `swg_write` / `swg_write_cas` on those paths gets a typed `handed_off` deny (Targeted grant handoff)| Parameter | Type | Description |
|---|---|---|
| paths * | array | |
| successor * | string |
swg_withdrawAs the giver, withdraws a handoff, on the user's or host's explicit instruction only| Parameter | Type | Description |
|---|---|---|
| path * | string |
swg_writeGuarded write — a stale view or a foreign edit gets a typed `stale_view` deny with `recover: reacquire`, never a silent overwrite. With `SWG_ON_HELD=refuse`, a file another agent holds gets an `other_holder` deny with `recover: wait_then_reacquire`, and nothing is written. On this package's coordinator, a write made while another session's compare-and-swap commit of the file is still reaching disk gets a `commit_landing` deny with `recover: read_then_merge`, in either mode, and nothing is written. A write keeps its write grant until `swg_release`| Parameter | Type | Description |
|---|---|---|
| content * | string | |
| path * | string |
swg_write_casSingle-shot version-checked write for concurrent same-key contention| Parameter | Type | Description |
|---|---|---|
| expected_version * | integer | |
| new_content * | string | |
| path * | string |
Security checks
6 checks have not been run yet.