shared_state
Manage shared state across multiple agents using CRDTs for conflict-free reads, writes, and merges. Supports counters, registers, and sets for collaborative data.
Instructions
CRDT-based shared state for multi-agent collaboration. Supports conflict-free read/write/merge with G-Counter (token tracking), LWW-Register (agent status), and OR-Set (shared findings).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"op": "<op>"
},
"name": "shared_state"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | Operation: "read", "write", "merge", "snapshot", or "list" | |
| key | No | Container key name (required for read/write) | |
| type | No | CRDT type: "g-counter", "lww-register", or "or-set" (required for write) | |
| value | No | Value to write (semantics depend on type) | |
| action | No | Action for or-set: "add" or "remove" | |
| amount | No | Increment amount for g-counter (default: 1) | |
| nodeId | No | Agent/node identifier (required for write) | |
| element | No | Element to add/remove for or-set | |
| snapshot | No | State snapshot to merge (required for merge op) |