[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-83897":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":13,"stars7d":13,"stars30d":13,"stars90d":14,"forks30d":14,"starsTrendScore":12,"compositeScore":15,"rankGlobal":9,"rankLanguage":9,"license":16,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":17,"hasPages":17,"topics":19,"createdAt":9,"pushedAt":9,"updatedAt":20,"readmeContent":21,"aiSummary":9,"trendingCount":14,"starSnapshotCount":14,"syncStatus":22,"lastSyncTime":23,"discoverSource":24},83897,"memforks","memforks-dev\u002Fmemforks","memforks-dev","Git for AI agent memory",null,"TypeScript",86,3,1,0,1.81,"Other",false,"main",[],"2026-06-12 02:04:36","# MemForks\n\n**Git for AI agent memory.** Branch-aware, verifiable, mergeable memory for autonomous agents.\n\n```\nmain:          c1 ── c2 ── c3 ─────────── c7 (HEAD)\n                          \\                \u002F\nhypothesis-A:              c4 ── c5 ──────      (merged via a resolver)\n                               \\\nhypothesis-B:                   c6              (abandoned, still queryable)\n```\n\n---\n\n## What it is\n\nMemForks is **version control for agent memory** — the same conceptual leap that Git made for code, applied to what AI agents learn and remember.\n\n| Layer | Responsibility |\n|-------|---------------|\n| **Storage** | Encrypted blob storage and semantic recall |\n| **Version control** | Immutable commit DAG, branch semantics, merge protocol |\n| **Settlement** | Cryptographic anchoring, resolver voting, finality |\n\nThe storage layer handles *where* memories live. MemForks handles *when* they were recorded, *which branch* they belong to, and *how* conflicting memories get reconciled.\n\n---\n\n## Quick start (2 commands)\n\n```bash\nnpm install -g @memfork\u002Fcli\n\nmemfork init --quick       # keygen → provision → memory tree (~30s)\nmemfork install cursor     # wire the memory MCP + MemForks rule into Cursor\n```\n\nThat's it. Restart Cursor — the agent now recalls and commits memory across sessions,\nscoped to the current Git branch, with every significant decision anchored on the ledger.\n\nFor Codex:\n\n```bash\nmemfork install codex      # writes ~\u002F.codex\u002Fconfig.toml + .codex-plugin\u002F\ncodex plugin add .codex-plugin\n```\n\n---\n\n## How the agent uses it\n\nOnce installed, no developer intervention is needed for day-to-day use.\n\n| What the agent does | How |\n|--------------------|-----|\n| Recall prior context | semantic recall scoped to `branch\u002F\u003Cbranch>` via MCP |\n| Save a learned fact | persist to `branch\u002F\u003Cbranch>` via MCP |\n| Anchor a decision | `memfork commit --branch \u003Cb> --facts \"…\"` |\n| Propose a memory merge | `memfork merge \u003Cfrom> \u003Cinto> --resolver \u003Cid>` |\n| Check the DAG | `memfork status` \u002F `memfork log` \u002F `memfork ui` |\n\nThe MCP server handles storage and recall natively as tool calls.\nThe `memfork` CLI handles the versioning layer.\n\n---\n\n## Repository structure\n\n```\ncontracts\u002F              On-chain smart-contract package\n  memforks::tree        MemoryTree object, branch heads, commit anchors\n  memforks::acl         Ownership and signer management\n  memforks::resolver    On-chain merge proposal + attestation protocol\n\nsdk\u002F                    @memfork\u002Fcore — TypeScript SDK\n  src\u002Fclient.ts         MemForksClient (connect, commit, recall, merge, …)\n  src\u002Findexer.ts        Ledger event subscription + polling\n\ncli\u002F                    @memfork\u002Fcli — the memfork binary\n  src\u002Fcommands\u002F\n    init.ts             memfork init [--quick]\n    install.ts          memfork install cursor|codex\n    doctor.ts           memfork doctor\n    ops.ts              status, log, recall, commit, merge, proposals, ui\n    provision.ts        auto-provisioning (keygen, provision, tree)\n  src\u002Fconfig.ts         layered config (env → ~\u002F.memfork\u002Fcredentials.json → .memfork\u002Fconfig.json)\n\nplugins\u002F\n  cursor\u002F               Cursor plugin\n    rules\u002Fmemforks.mdc  always-on agent guidance rule\n  codex\u002F                Codex plugin\n    .codex-plugin\u002F      plugin.json + skills\u002F\n\nadapters\u002F\n  langgraph\u002F            @memfork\u002Flanggraph — LangGraph BaseCheckpointSaver\n\nruntime\u002F\n  resolver\u002F             off-chain resolver daemon (jury \u002F LLM reconciliation)\n\napp\u002F                    DAG visualizer (React + Vite)\n\ntests\u002F\n  cli\u002F                  unit + integration + E2E tests for the CLI\n```\n\n---\n\n## Configuration\n\nMemForks uses a three-layer config — no `.env` files required for normal use.\n\n| Layer | File | Content | Committed? |\n|-------|------|---------|-----------|\n| Project | `.memfork\u002Fconfig.json` | treeId, network, branch | ✓ yes |\n| User | `~\u002F.memfork\u002Fcredentials.json` | private key, delegate key | ✗ never (chmod 600) |\n| CI\u002FCD | env vars (`MEMFORK_*`) | override any value | — |\n\nRun `memfork doctor` to verify all three layers resolve correctly.\n\n---\n\n## memfork init --quick explained\n\n`--quick` does full auto-provisioning — no external dashboard, no copy-pasting:\n\n1. Generates a fresh Ed25519 keypair\n2. Requests testnet tokens\n3. Provisions a storage account → `accountId`\n4. Generates an Ed25519 delegate keypair\n5. Registers the delegate → delegate registered\n6. Creates a MemoryTree → `treeId`\n7. Saves everything to `~\u002F.memfork\u002Fcredentials.json`\n\n---\n\n## memfork install explained\n\n`memfork install cursor` writes two files:\n\n**`~\u002F.cursor\u002Fmcp.json`** — configures the memory MCP server using Streamable HTTP transport with the delegate key from `~\u002F.memfork\u002Fcredentials.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"memory\": {\n      \"url\": \"https:\u002F\u002F\u003Cmcp-relayer>\u002Fapi\u002Fmcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer \u003CdelegateKey>\",\n        \"x-account-id\": \"\u003CaccountId>\"\n      }\n    }\n  }\n}\n```\n\nNo browser login. The credentials flow from provisioning directly into the MCP config.\n\n**`.cursor\u002Frules\u002Fmemforks.mdc`** — an always-on rule that tells the agent when to recall, remember, and commit.\n\n`memfork install codex` does the equivalent for `~\u002F.codex\u002Fconfig.toml`.\n\n---\n\n## LangGraph adapter\n\n```typescript\nimport { createMemForksCheckpointer } from \"@memfork\u002Flanggraph\";\nimport { resolveConfig } from \"@memfork\u002Fcli\";\n\nconst checkpointer = await createMemForksCheckpointer(resolveConfig());\n\nconst app = new StateGraph(MessagesAnnotation)\n  .addNode(\"agent\", myNode)\n  .compile({ checkpointer });\n```\n\nEach LangGraph thread maps to a MemForks branch. Cross-agent reconciliation via `checkpointer.proposeMerge()`.\n\n---\n\n## Development\n\n```bash\nnpm install          # install all workspace packages\nnpm run build        # build sdk + cli (links memfork globally)\nnpm test             # run cli unit + integration + E2E tests\n\n# Deploy contracts to a local network\n.\u002Fscripts\u002Fdeploy.sh\nsource .deployed.env\n\n# Start the DAG visualizer\ncd app && npm run dev\n```\n\n### Running tests\n\n```bash\ncd tests\u002Fcli\nnode --test          # 21 tests: config, install, E2E, provision\n```\n\n---\n\n## License\n\nApache-2.0\n",2,"2026-06-11 04:11:48","CREATED_QUERY"]