{"id":"37f93818-853a-41bd-975c-d954e123afc2","slug":"krakennet-fathom","kind":"mcp","name":"fathom","summary":"Deterministic reasoning runtime for AI agents. YAML rules, microsecond evaluation, zero hallucinations. Built on CLIPS.","owner":"KrakenNet","repoUrl":"https://github.com/KrakenNet/fathom","license":"MIT","licenseTier":"permissive","trust":"community","stars":3,"match":null,"fewStars":true,"format":"mcp","createdAt":"2026-04-16T15:53:27.000Z","addedAt":"2026-10-21T08:41:03.967Z","logoUrl":"https://avatars.githubusercontent.com/u/84548662?v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["utilities"],"tags":["ai-agents","clips","compliance","deterministic","expert-system","fastapi","guardrails","langchain"],"runtime":"python","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-26T01:43:09.843Z","sample":false,"url":"https://conduits.dev/tools/krakennet-fathom","language":"Python","transports":["stdio"],"install":{"pypi":"fathom-rules"},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# Fathom\n\n> A modern Python-first expert system runtime built on CLIPS. Define rules in YAML. Evaluate in microseconds. Zero hallucinations.\n\n[![PyPI](https://img.shields.io/pypi/v/fathom-rules.svg)](https://pypi.org/project/fathom-rules/)\n[![Docs](https://img.shields.io/badge/docs-krakennet.github.io%2Ffathom-blue)](https://krakennet.github.io/fathom/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)\n[![CI](https://github.com/KrakenNet/fathom/actions/workflows/ci.yml/badge.svg)](https://github.com/KrakenNet/fathom/actions/workflows/ci.yml)\n[![Downloads](https://img.shields.io/pypi/dm/fathom-rules.svg)](https://pypi.org/project/fathom-rules/)\n[![codecov](https://codecov.io/gh/KrakenNet/fathom/branch/main/graph/badge.svg)](https://codecov.io/gh/KrakenNet/fathom)\n[![Discord](https://img.shields.io/badge/Discord-join-5865F2?logo=discord&logoColor=white)](https://discord.gg/E6Cf8WFDf)\n\n> **Part of the [Kraken](https://github.com/KrakenNet) stack:** [**Fathom**](https://github.com/KrakenNet/fathom) (reasoning engine) · [Nautilus](https://github.com/KrakenNet/nautilus) (policy data broker) · [Stargraph](https://github.com/KrakenNet/stargraph) (agent-graph framework).\n\n**Current version:** 0.14.0 <!-- x-release-please-version -->\n\n**License:** MIT\n\n**Language:** Python 3.12+ (primary), Go and TypeScript SDKs in progress\n\n**Package Manager:** uv\n\n**Maintained by:** [Kraken Networks](https://github.com/KrakenNet)\n\n---\n\n## Why Fathom?\n\nEvery AI agent framework lets agents decide what to do by guessing. For most tasks, that's fine.\n\nFor some tasks, guessing is unacceptable:\n\n- **Policy enforcement** — \"Is this agent allowed to do this?\" can't be a maybe.\n- **Data routing** — \"Which databases should this query hit?\" can't hallucinate a source.\n- **Compliance** — \"Did this fleet operate within NIST 800-53 controls?\" needs a provable answer.\n- **Classification** — \"What clearance level does this data require?\" is not a prompt engineering problem.\n\nFathom provides **deterministic, explainable, auditable reasoning** using CLIPS — a battle-tested expert system — wrapped in a modern Python library with YAML-first rule authoring.\n\n## Install\n\n```bash\nuv add fathom-rules\n```\n\n## Quick Start\n\n```python\nfrom fathom import Engine\n\n# Loads templates/, modules/, functions/, and rules/ from a project directory\nengine = Engine.from_rules(\"policy/\")\n\nengine.assert_fact(\"agent\", {\n    \"id\": \"agent-alpha\",\n    \"clearance\": \"secret\",\n    \"purpose\": \"threat-analysis\",\n    \"session_id\": \"sess-001\",\n})\n\nengine.assert_fact(\"data_request\", {\n    \"agent_id\": \"agent-alpha\",\n    \"target\": \"hr_records\",\n    \"classification\": \"top-secret\",\n    \"action\": \"read\",\n})\n\nresult = engine.evaluate()\nprint(result.decision)       # \"deny\"\nprint(result.reason)         # \"Agent clearance is below the data classification (no read up)\"\nprint(result.duration_us)    # ~90 (microseconds; varies by machine)\n```\n\nSee the [Getting Started guide](docs/getting-started.md) for a full walkthrough.\n\n## What Ships Today\n\n**Core runtime (Python)**\n\n- YAML compiler for templates, rules, modules, and functions\n- Forward-chaining evaluation with rule + module traces\n- Working memory persistence across evaluations within a session\n- Classification-aware operators (`below`, `meets_or_exceeds`, `within_scope`, `in_compartment`, `has_compartments`) and the `fathom-dominates` built-in\n- Temporal operators (`count_exceeds`, `rate_exceeds`, `changed_within`, `last_n`, `distinct_count`, `sequence_detected`)\n- Rule-assertion actions (`then.assert` + `bind`) and user-defined Python functions (`Engine.register_function`)\n- Structured JSON audit log with append-only sinks\n- Ed25519 attestation service for signed evaluation results\n- [Fleet reasoning](docs/how-to/fleet.md) with Redis and Postgres backends for shared working memory\n\n**Integrations**\n\n- **FastAPI REST server** with bearer-token auth and rule-path jailing\n- **gRPC server** with bearer-token auth (see `protos/fathom.proto`)\n- **MCP tool server** (`FathomMCPServer`) for agent discovery\n- **Framework adapters** — LangChain callback handler, CrewAI before-tool-call\n  hook, OpenAI Agents SDK tool guardrail, Google ADK before-tool callback.\n  Each is allowlist-only: the call proceeds when the decision is exactly\n  `allow`, and every other outcome raises `PolicyViolation` (ADK returns an\n  error dict instead)\n- **CLI** — `fathom validate`, `fathom compile`, `fathom test`, `fathom bench`, `fathom info`, `fathom status`, `fathom verify-artifact`, `fathom verify-chain`, `fathom repl`, `fathom mcp`, `fathom convert`\n- **Docker sidecar** (Debian slim + uv)\n- **Prometheus metrics** export (`/metrics` endpoint)\n- **Policy Studio** — browser UI over a real engine, shipped as its own\n  package (`packages/fathom-studio/`, run with `uv run fathom-studio`). See\n  [Running Policy Studio](docs/how-to/policy-studio.md)\n\n**Rule packs**\n\nLoad one by name with `Engine.load_pack(\"<name>\")`:\n\n- `owasp-agentic` — OWASP Agentic Top 10 mitigations\n- `nist-800-53` — Access control, audit, information flow\n- `hipaa` — PHI handling, minimum necessary, breach triggers\n- `cmmc` — CMMC Level 2+ controls\n- `ssvc` — SSVC supplier, deployer, and CISA vulnerability-triage trees (144 rules)\n- `schema-denoising` — promotes a relation to stable schema once enough extracted facts carry it\n- `conflict-detection` — reports contradictions between claims about the same subject as `conflict` facts\n\n**SDKs (in progress)**\n\n- `fathom-go` — REST + gRPC client (`packages/fathom-go/`); unit and\n  integration suites run in CI, not yet published to a Go proxy\n- `fathom-ts` — `@fathom-rules/sdk` (`packages/fathom-ts/`); hand-written\n  client covering 4 of the 10 REST endpoints, vitest suite required in CI,\n  not yet published to npm\n\nIntegrations that are scaffolded, partial, or planned are catalogued in\n[Planned Integrations](docs/reference/planned-integrations.md).\n\n## Core Primitives\n\n| Primitive     | Purpose                                            | CLIPS Construct |\n| ------------- | -------------------------------------------------- | --------------- |\n| **Templates** | Define fact schemas with typed slots               | `deftemplate`   |\n| **Facts**     | Typed instances asserted into working memory       | working memory  |\n| **Rules**     | Pattern-matching logic with conditions and actions | `defrule`       |\n| **Modules**   | Namespace rules with controlled execution order    | `defmodule`     |\n| **Functions** | Reusable logic for conditions and actions          | `deffunction`   |\n\n## Key Differentiator: Working Memory\n\nUnlike stateless policy engines (OPA, Cedar), Fathom maintains working memory across evaluations within a session:\n\n- **Cumulative reasoning** — \"This agent accessed PII from 3 sources — deny the 4th.\"\n- **Temporal patterns** — \"Denial rate spiked 400% in 10 minutes — escalate.\"\n- **Cross-fact inference** — \"Agent A passed data to Agent B, who is requesting external access — violation.\"\n\n## Integration Shapes\n\n**As a library**\n\n```python\nfrom fathom import Engine\nengine = Engine.from_rules(\"rules/\")\nresult = engine.evaluate()\n```\n\n**As a REST sidecar**\n\n```bash\n# ./rules/access-control/ holds a ruleset (templates/, rules/, ...);\n# the image serves rulesets from /rules (FATHOM_RULESET_ROOT).\nexport TOKEN=change-me\ndocker run -p 8080:8080 -e FATHOM_API_TOKEN=\"$TOKEN\" \\\n  -v \"$PWD/rules:/rules:ro\" ghcr.io/krakennet/fathom:latest\ncurl -X POST localhost:8080/v1/evaluate \\\n  -H \"Authorization: Bearer $TOKEN\" -H \"Content-Type: application/json\" \\\n  -d '{\"facts\": [], \"ruleset\": \"access-control\"}'\n```\n\n**As a gRPC sidecar**\n\n```bash\n# Server: fathom.integrations.grpc_server.serve(), TLS by default\n# (docs/reference/configuration.md#grpc-tls). It has no reflection, so\n# grpcurl reads protos/fathom.proto — regenerate Go/TS clients from it too.\ngrpcurl -import-path protos -proto fathom.proto \\\n  -H \"authorization: Bearer $TOKEN\" \\\n  -d '{\"ruleset\": \"access-control\", \"facts\": []}' \\\n  localhost:50051 fathom.v1.FathomService/Evaluate\n```\n\n**As an MCP tool**\n\n```python\nfrom fathom.integrations.mcp_server import FathomMCPServer\nserver = FathomMCPServer(\"rules/\")\nserver.run()  # stdio\n```\n\n## Documentation\n\nDocs live under [`docs/`](docs/) and build with MkDocs Material (Diátaxis information architecture).\n\nEntry points:\n\n- [Getting Started](docs/getting-started.md)\n- [Tutorials](docs/tutorials/index.md)\n- [How-to Guides](docs/how-to/index.md)\n- [Concepts](docs/concepts/index.md)\n- [Reference](docs/reference/index.md)\n- [Configuration](docs/reference/configuration.md) — every `FATHOM_*` variable and the gRPC TLS setup\n\n## Performance Targets\n\n| Operation              | Target         |\n| ---------------------- | -------------- |\n| Single rule evaluation | < 100µs        |\n| 100-rule evaluation    | < 500µs        |\n| Fact assertion         | < 25µs         |\n| YAML compilation       | < 2ms per rule |\n\nMeasured by `scripts/benchmark.py` and enforced on every pull request by CI's\n`bench` job, which fails the build if a median regresses past its target.\nCompilation is stated per rule because it scales with pack size: the packaged\nSSVC pack is 144 rules. The numbers above are what the benchmark reports on a\ndeveloper machine; CI enforces them with a 2x allowance (`--slack 2.0`)\nbecause GitHub's shared runners measured 1.2x to 1.9x slower than that machine\nacross five consecutive runs of the same job. Run `python scripts/benchmark.py`\nwith no slack to hold your own hardware to the published numbers directly.\n\n## Related Projects\n\n- **[Bosun](https://github.com/krakenNet/bosun):** Agent governance built on Fathom (fleet analysis, compliance attestation)\n- **[Nautilus](https://github.com/krakenNet/nautilus):** Intelligent data broker built on Fathom (multi-source routing, classification-aware scoping)\n- **[Stargraph](https://github.com/KrakenNet/stargraph):** Workgraph, AI orchestration framework built on Fathom\n\n## Development\n\n```bash\ngit clone https://github.com/KrakenNet/fathom.git\ncd fathom\nuv sync --all-extras            # --all-extras is required for the full test suite\n\nuv run pytest                   # engine, integrations, and Studio suites\nuv run ruff check src/ tests/   # lint\nuv run mypy src/                # type check\nuv run pytest --cov=fathom      # coverage report\nuv run mkdocs serve             # docs preview\n```\n\nRun the live REST server locally:\n\n```bash\nuv run uvicorn fathom.integrations.rest:app --reload\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for full development guidelines and [CHANGELOG.md](CHANGELOG.md) for release notes.\n\n## Stability\n\nFathom is pre-1.0. [VERSIONING.md](VERSIONING.md) names the surfaces that are\ncovered — `fathom.__all__`, the YAML authoring keys, the REST/gRPC/MCP\ncontracts, the CLI, the rule packs and pack format, the framework\nintegrations, the Rego converter, and the Redis/Postgres fleet stores — states what a `0.x` minor and patch bump each mean for\nthem, and defines the deprecation period. The symbol list there is checked\nagainst the package on every test run.\n\n## Star History\n\n<a href=\"https://star-history.com/#KrakenNet/fathom&Date\">\n  <img src=\"https://api.star-history.com/svg?repos=KrakenNet/fathom&type=Date\" alt=\"Star History Chart\" width=\"600\">\n</a>\n\n## License\n\nMIT — see [LICENSE](LICENSE) for details.\n\n---\n\nMaintained by [Kraken Networks](https://github.com/KrakenNet) · [krakennetworks.com](https://krakennetworks.com) · [krakn.ai](https://krakn.ai)\n"}