Deterministic reasoning runtime for AI agents, built on CLIPS via clipspy
Project description
Fathom
A modern Python-first expert system runtime built on CLIPS. Define rules in YAML. Evaluate in microseconds. Zero hallucinations.
Status: Design Draft License: MIT Language: Python 3.14+ Package Manager: uv
Why Fathom?
Every AI agent framework lets agents decide what to do by guessing. For most tasks, that's fine.
For some tasks, guessing is unacceptable:
- Policy enforcement — "Is this agent allowed to do this?" can't be a maybe.
- Data routing — "Which databases should this query hit?" can't hallucinate a source.
- Compliance — "Did this fleet operate within NIST 800-53 controls?" needs a provable answer.
- Classification — "What clearance level does this data require?" is not a prompt engineering problem.
Fathom provides deterministic, explainable, auditable reasoning using CLIPS — a battle-tested expert system — wrapped in a modern Python library with YAML-first rule authoring.
Quick Start
uv add fathom-rules
from fathom import Engine
engine = Engine()
engine.load_templates("templates/")
engine.load_rules("rules/")
engine.assert_fact("agent", {
"id": "agent-alpha",
"clearance": "secret",
"purpose": "threat-analysis",
"session_id": "sess-001"
})
engine.assert_fact("data_request", {
"agent_id": "agent-alpha",
"target": "hr_records",
"classification": "top-secret",
"action": "read"
})
result = engine.evaluate()
print(result.decision) # "deny"
print(result.reason) # "Agent clearance 'secret' insufficient for 'top-secret' data"
print(result.duration_us) # 47
Core Primitives
| Primitive | Purpose | CLIPS Construct |
|---|---|---|
| Templates | Define fact schemas with typed slots | deftemplate |
| Facts | Typed instances asserted into working memory | working memory |
| Rules | Pattern-matching logic with conditions and actions | defrule |
| Modules | Namespace rules with controlled execution order | defmodule |
| Functions | Reusable logic for conditions and actions | deffunction |
Key Differentiator: Working Memory
Unlike stateless policy engines (OPA, Cedar), Fathom maintains working memory across evaluations within a session:
- Cumulative reasoning — "This agent accessed PII from 3 sources — deny the 4th."
- Temporal patterns — "Denial rate spiked 400% in 10 minutes — escalate."
- Cross-fact inference — "Agent A passed data to Agent B, who is requesting external access — violation."
Integration
As a library:
from fathom import Engine
engine = Engine.from_rules("rules/")
result = engine.evaluate()
As a sidecar:
docker run -p 8080:8080 -v ./rules:/rules kraken/fathom:latest
curl -X POST localhost:8080/v1/evaluate -d '{"facts": [...], "ruleset": "access-control"}'
As an MCP tool:
from fathom.integrations.mcp import FathomMCPServer
server = FathomMCPServer(engine)
server.serve()
Rule Packs
Pre-built rule collections (planned):
fathom-owasp-agentic— OWASP Agentic Top 10 mitigationsfathom-nist-800-53— Access control, audit, information flowfathom-hipaa— PHI handling, minimum necessary, breach triggersfathom-cmmc— CMMC Level 2+ controls
Performance Targets
| Operation | Target |
|---|---|
| Single rule evaluation | < 100µs |
| 100-rule evaluation | < 500µs |
| Fact assertion | < 10µs |
| YAML compilation | < 50ms |
Related Projects
- Bosun — Agent governance built on Fathom (fleet analysis, compliance attestation)
- Nautilus — Intelligent data broker built on Fathom (multi-source routing, classification-aware scoping)
Development
git clone <repo-url>
cd fathom
uv sync
uv run pytest
See design.md for the full specification and roadmap.
License
MIT — see LICENSE for details.
Maintained by Kraken Networks
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fathom_rules-0.1.0.tar.gz.
File metadata
- Download URL: fathom_rules-0.1.0.tar.gz
- Upload date:
- Size: 298.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee4b47f3603cbce0a396bbd642e07e36b9aaccf634953eb8de46e56546f285c8
|
|
| MD5 |
3152afa491f463e5f7e7383dfe3bc2a7
|
|
| BLAKE2b-256 |
1a83d56cd146598ba09628bf9642bf4cced2de1a974da36add74b4bc7954d631
|
File details
Details for the file fathom_rules-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fathom_rules-0.1.0-py3-none-any.whl
- Upload date:
- Size: 68.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8471788eb457be8c00cb0ede5f44395565bccb4a2c24c96b74d9c64859cd9a1b
|
|
| MD5 |
a14882ec615e8b5c24c1d9f076711e0c
|
|
| BLAKE2b-256 |
372d103e5763b8f8d5452739923281f6641081d7ad2dbe8406cdc03321e90676
|