{
  "markdown": "# model-ledger\n\n**git for models** — know what models you have deployed, where they run, what they depend on, and what changed.\n\n[![CI](https://github.com/block/model-ledger/actions/workflows/ci.yml/badge.svg)](https://github.com/block/model-ledger/actions/workflows/ci.yml)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n[![Python](https://img.shields.io/badge/python-3.10+-blue.svg)](https://python.org)\n[![PyPI](https://img.shields.io/pypi/v/model-ledger)](https://pypi.org/project/model-ledger/)\n[![Downloads](https://img.shields.io/pypi/dm/model-ledger)](https://pypistats.org/packages/model-ledger)\n[![Docs](https://img.shields.io/badge/docs-block.github.io/model--ledger-7a1a1a.svg)](https://block.github.io/model-ledger/)\n\n📖 **[Documentation](https://block.github.io/model-ledger/)** &middot;\n[Quickstart](https://block.github.io/model-ledger/quickstart/) &middot;\n[Concepts](https://block.github.io/model-ledger/concepts/) &middot;\n[Governance](https://block.github.io/model-ledger/governance/)\n\n---\n\nmodel-ledger is a model inventory for any organization with deployed models. It\n**discovers** models, heuristic rules, and ETL across your platforms, maps the\n**dependency graph** automatically, and records **every change as an immutable event**.\nUnlike registries tied to a single platform (MLflow, SageMaker, W&B), it spans all of\nthem — as one connected graph — and it's built to be driven by AI agents through a\nnative MCP server.\n\nBenchmarked at production scale: full inventory reconstruction over a ledger of 28.8k\nmodels and 212k events runs in under a second ([CHANGELOG, v0.7.4](CHANGELOG.md)).\n\n## Install\n\n```bash\npip install model-ledger\n```\n\n## The graph builds itself\n\nEvery model is a `DataNode` with typed input and output ports. When an output port name\nmatches an input port name, `connect()` creates the dependency edge — no hand-wiring.\n\n```python\nfrom model_ledger import Ledger, DataNode\n\nledger = Ledger()\n\nledger.add([\n    DataNode(\"segmentation\", platform=\"etl\",      outputs=[\"customer_segments\"]),\n    DataNode(\"fraud_scorer\", platform=\"ml\",       inputs=[\"customer_segments\"], outputs=[\"risk_scores\"]),\n    DataNode(\"fraud_alerts\", platform=\"alerting\", inputs=[\"risk_scores\"]),\n])\nledger.connect()\n\nledger.trace(\"fraud_alerts\")\n# ['segmentation', 'fraud_scorer', 'fraud_alerts']\n```\n\nEvery mutation is recorded as an immutable **Snapshot** — an append-only event log that\ngives you full history and point-in-time reconstruction, because nothing is overwritten.\n\n## Talk to your inventory\n\nThe MCP server is a first-class surface — point Claude (or any MCP agent) at it:\n\n```bash\npip install \"model-ledger[mcp]\"\nclaude mcp add model-ledger -- model-ledger mcp --demo\n```\n\n> **You:** if we deprecate `customer_features`, what breaks?\n>\n> **Claude:** 3 models consume it directly, 2 more transitively.\n\n## Documentation\n\nEverything lives at **[block.github.io/model-ledger](https://block.github.io/model-ledger/)** —\nand it can't drift, because the API reference is generated from source and every example\nruns in CI:\n\n- **[Quickstart](https://block.github.io/model-ledger/quickstart/)** — install to your first dependency trace in 60 seconds\n- **[Concepts](https://block.github.io/model-ledger/concepts/)** — DataNode, Snapshot, and Composite, in three ideas\n- **[Agents (MCP)](https://block.github.io/model-ledger/guides/agents/)** — the eight-tool agent surface, with a worked transcript\n- **[Connectors](https://block.github.io/model-ledger/guides/connectors/)** — discover from SQL, REST, GitHub, or your own platform\n- **[Backends](https://block.github.io/model-ledger/guides/backends/)** — in-memory, SQLite, JSON, Snowflake, or remote HTTP\n- **[Governance](https://block.github.io/model-ledger/governance/)** — how the primitives map to SR 11‑7/SR 26‑2, the EU AI Act, and NIST AI RMF\n- **[API reference](https://block.github.io/model-ledger/reference/)** — generated from the source\n\n## Architecture\n\n```mermaid\nflowchart LR\n    subgraph Sources\n        C1[SQL / REST / GitHub / Prefect<br/>connectors]\n    end\n    subgraph Core\n        L[Ledger<br/>append-only event log,<br/>point-in-time reconstruction]\n        G[Dependency graph]\n        V[Compliance profiles<br/>SR 11-7/SR 26-2 · EU AI Act · NIST AI RMF]\n    end\n    subgraph Surfaces\n        S1[Python SDK]\n        S2[CLI]\n        S3[REST API]\n        S4[MCP server · 8 tools]\n    end\n    B1[(in-memory · SQLite · JSON ·<br/>Snowflake · remote HTTP)]\n    C1 --> L\n    L --> G\n    L --> V\n    L --- B1\n    S1 --> L\n    S2 --> L\n    S3 --> L\n    S4 --> L\n```\n\n## For organizations\n\nThe OSS core handles discovery, graph building, change tracking, storage, the agent\nprotocol, and compliance validation — the SR 11‑7/SR 26‑2, EU AI Act Annex IV, and\nNIST AI RMF profiles ship in `model_ledger.validate`. Your internal package provides\nonly the thin layer on top: connector configs, custom connectors for internal\nplatforms, and credentials. Thin config, not reimplemented logic.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/block/model-ledger/blob/main/CONTRIBUTING.md).\nAll commits require DCO sign-off.\n\n## Security\n\nSee [SECURITY.md](SECURITY.md) for how to report vulnerabilities privately.\n\n## License\n\nApache-2.0. See [LICENSE](https://github.com/block/model-ledger/blob/main/LICENSE).\n\nCreated and maintained by [Vignesh Narayanaswamy](https://github.com/vigneshnarayanaswamy) at Block.\n\n<!-- mcp-name: io.github.block/model-ledger -->\n",
  "bytes": 5493,
  "sha": "23dd47e60169377fef6bc04a9cca7032b79b59a16197030e23156061a5f2cf15",
  "repo_slug": "block/model-ledger",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_block_model_ledger_72bc022d/readme"
}