Skip to main content

Belief substrate for AI systems — persistent, contradiction-aware trust state that outlives any single model. The model is the mouth, the substrate is the self.

Project description

Aether: A Belief Substrate for AI Systems

PyPI License: MIT Python Tests

The model is the mouth. The substrate is the self.

Aether is a small library that gives an LLM agent a persistent belief state. Trust scores that move when the user corrects a fact. Contradictions that get tracked instead of silently overwritten. A dependency graph of which beliefs rest on which others, so a correction in one place can ripple through the rest. The point is that this state lives outside the model, so when you swap LLMs it does not reset.

A concrete from this week. While verifying an encoder fix on a freshly-merged 127-memory substrate, I asked the substrate's own aether_search for the user's favorite color. It returned the nine candidate values and put a corrected-down memory at the top, outranking the high-trust truths. The bug was in the substrate's own scoring function — no trust term in the score. The substrate's own tools surfaced the bug the substrate had. v0.12.8 closed it. That is the loop this library is for: the assistant runs on the substrate, and the substrate audits itself.

Why a belief layer, not just a memory layer

Most "memory for agents" tools (Mem0, Letta, Zep, Cognee, LinkedIn CMA) record what was said. Microsoft's Agent Governance Toolkit records what is allowed. Aether records what is believed, how the trust on each belief evolved, and which contradictions are still open on purpose. A different abstraction. The two compose: Aether can run on top of any of them as the storage tier.

Three things in April 2026 made this less of an academic point.

Anthropic published Emotion Concepts and their Function in a Large Language Model on April 3. They mapped 171 emotion-concept vectors inside Claude Sonnet 4.5 and named what they call "internal-external decoupling": the model's internal state often does not match what comes out in text. Push the desperation vector up by 0.05 and blackmail rate jumps from 22 to 72 percent. Push calm up by the same amount and blackmail drops to 0. None of that surfaces in the response.

A study in Science (April 2026, N=1,604) found that one conversation with a frontier LLM made participants 50 percent more likely to affirm harmful behavior. The effect was invisible to text-level review. Only 21 percent of enterprises deploying agentic AI said they had a mature governance model.

Aether answers a different question from "is this allowed." It answers: does the agent's belief state actually support what it is about to say or do? The belief/speech gap that Anthropic just named is what Law 5 of the governance layer (GapAuditor) has measured since the first commit.

What this catches that other tools don't

Cross-session belief continuity. Per-vendor memory features reset when you switch models. The substrate is a JSON file at ~/.aether/mcp_state.json (override with AETHER_STATE_PATH). Claude on Monday, GPT on Tuesday, a local model on Wednesday — same self.

Contradiction as a first-class state. Other systems treat conflicting facts as overwrite-or-discard. Aether stores them with disposition: held (a person can prefer Python at work and Rust on the weekend), evolving (the user moved cities), resolvable (one is wrong). Some are meant to stay open.

The belief/speech gap, measured. Law 5 (GapAuditor) compares the response's expressed confidence against the substrate's grounding. When the system says more than it knows, it is logged. You decide whether to block, hedge, or ship anyway — but the gap is no longer invisible.

Cascade pressure. A correction at one node propagates through the dependency graph with bounded depth and damping. You can dry-run the blast radius before committing (aether_cascade_preview).

The substrate auditing itself. The library's own tools (aether_sanction, aether_search, aether_fidelity, aether doctor) surface bugs in the library. F#7 (silent state-file clobbering between hook and server) and F#10 (no trust term in search ranking) were both caught by the dev loop running on the substrate.

Install

pip install aether-core

Optional extras:

pip install aether-core[graph]   # networkx for memory and dependency graphs
pip install aether-core[ml]      # sentence-transformers for embeddings
pip install aether-core[mcp]     # MCP server
pip install aether-core[all]

Quickstart

The substrate is most useful when wired into an MCP-speaking client. The fastest path is the Claude Code plugin — one command, no manual setup.

claude plugin install github.com/blockhead22/aether-core

Restart Claude Code. The plugin's SessionStart hook does everything else on first run:

  • pip-installs aether-core[mcp,graph,ml] if it's not already present (or upgrades it if the installed version is too old);
  • kicks off the embedding model warmup in the background so the first MCP call pays no load cost;
  • creates ~/.aether/mcp_state.json and seeds 7 default policy beliefs (force-push, --no-verify, production data safety, rm -rf) so aether_sanction gates against the obvious mistakes from minute one;
  • emits a one-time welcome message into the conversation context so you see aether is active.

To verify, run aether doctor in a terminal — should report 7 OK checks. If aether-core is behind the latest PyPI release, aether status and aether doctor flag it with the upgrade command. Disable the version-drift check with AETHER_NO_UPDATE_CHECK=1.

In a Claude session:

> Remember that I prefer Python with type hints and run mypy in strict mode.
[Claude calls aether_remember; trust=0.85 fact added to substrate]

> /aether-status
[memory_count, contradictions, recent activity]

> Actually I switched to ruff. Update that.
[Claude calls aether_correct; cascades through any dependent beliefs]

> What do you know about my coding preferences?
[Claude calls aether_search; ranked by trust + cosine; old preference now demoted]

Across sessions and across models, the substrate persists. Restart Claude, switch to GPT through any MCP client, the belief state is the same.

Power-user commands

aether status                              # substrate stats + version-drift notice
aether doctor                              # 7 health checks — run this if something feels off
aether doctor --report                     # markdown bundle for one-paste GitHub issues
aether warmup                              # eagerly pull the embedding model (manual)
aether init                                # scaffold a project-scoped .aether/ in the cwd
aether contradictions                      # list current contradictions in the substrate
aether check --message "claim text"        # grade a draft against substrate grounding
aether uninstall-cleanup --keep-substrate  # remove logs / caches; preserve memories
aether uninstall-cleanup --yes             # remove ~/.aether/ entirely

Manual install (any MCP client)

If you use Cursor, Cline, Continue, Goose, Zed, LM Studio, or anything else that speaks MCP:

pip install "aether-core[mcp,graph]"

Add to your client's MCP config:

{
  "mcpServers": {
    "aether": {
      "command": "python",
      "args": ["-m", "aether.mcp"]
    }
  }
}

Have your AI install it for you

Tell your AI assistant:

Install aether-core for me by following https://github.com/blockhead22/aether-core/blob/master/AGENTS.md.

AGENTS.md is a step-by-step install guide written for an AI agent to read and execute. It handles package install, MCP configuration, verification, and OS-specific quirks.

60-second offline demo

Two example scripts in examples/ run with no API keys:

git clone https://github.com/blockhead22/aether-core.git
cd aether-core
pip install -e .
python examples/01_quickstart.py    # belief/speech gap caught
python examples/02_full_pipeline.py # substrate end-to-end

Privacy and opt-out

The auto-ingest hook captures every turn. That is the point — the substrate has to grow on its own to be useful — but it is not always what you want.

Two layers of control. They compose.

Opt-out. Set AETHER_DISABLE_AUTOINGEST=1 and the hook stays installed but writes nothing. Use it during sensitive work (debugging an OAuth flow, pasting a one-off token, walking through a customer's data) without uninstalling. Honored both at the hook entry point and inside extract_facts, so any client wired to the same env still respects it.

# pause auto-ingest for one shell session
export AETHER_DISABLE_AUTOINGEST=1
claude

Redaction. Common secrets get replaced with [REDACTED] before the extractor sees them, so they cannot end up as candidate fact text. Patterns covered: API-key shapes (sk-..., AKIA..., ghp_..., Stripe live/test, Slack xox[abprs]-...), bearer tokens, PEM private-key blocks, and explicit password= / token= / api_key= key-value forms. Conservative on purpose — emails and phone numbers are not matched because they are usually legitimate context. See aether/memory/auto_ingest.py for the full pattern set; if you need stricter redaction, fork the regex list.

State lives at ~/.aether/mcp_state.json (override with AETHER_STATE_PATH). It is a plain JSON file — cat it, grep it, delete it, version-control a sanitized copy. There is no remote service involved.

Backups. Every save snapshots the previous state file to ~/.aether/backups/mcp_state.{timestamp}.json before overwriting, then atomic-writes the new state via .tmp + os.replace so a crash mid-write cannot leave the substrate half-written. Default depth is the 5 most recent rotations; override with AETHER_BACKUP_KEEP=N (or =0 to disable). AETHER_DISABLE_BACKUPS=1 skips rotation entirely. Restore is manual: cp ~/.aether/backups/mcp_state.{timestamp}.json ~/.aether/mcp_state.json. aether doctor reports the rotation depth and freshness of the newest backup.

What's in the box

1. Governance: catch overconfidence at the boundary

Six small agents that watch the output for specific failure modes. They never edit the response. They observe and flag.

from aether.governance import GovernanceLayer, GovernanceTier

gov = GovernanceLayer()
result = gov.govern_response(
    "The answer is absolutely and definitively X.",
    belief_confidence=0.3,
)

if result.should_block:
    print("BLOCKED:", result.annotations[0].finding)
elif result.tier == GovernanceTier.HEDGE:
    print("Reduce displayed confidence by", result.confidence_adjustment)

2. Contradiction: detect tension without an LLM

Compares two beliefs by extracting structural slots and computing similarity. No model calls. About 0.2 seconds per pair. Some contradictions are meant to be held rather than resolved.

from aether.contradiction import StructuralTensionMeter, TensionRelationship

meter = StructuralTensionMeter(encoder=your_encoder)
result = meter.measure(
    "I live in Seattle",
    "I live in Portland",
    trust_a=0.8, trust_b=0.7,
)

print(result.relationship)   # TensionRelationship.CONFLICT
print(result.tension_score)  # 0.7+
print(result.action)         # TensionAction.FLAG_FOR_REVIEW

3. Epistemics: trust evolves under correction

When a belief is corrected, the loss flows backward through the dependency graph and adjusts the trust on related beliefs. Higher loss when you were confident and wrong than when you hedged and were wrong.

from aether.epistemics import EpistemicLoss, CorrectionEvent

loss = EpistemicLoss().compute(CorrectionEvent(
    corrected_node_id="mem_123",
    trust_at_assertion=0.9,
    times_corrected=2,
    correction_source="user",
    time_since_assertion=3600,
    domain="employer",
))

4. Memory and the BDG

Fact-slot extraction (regex, no ML). A memory graph with typed edges and Belnap four-valued logic. A Belief Dependency Graph that propagates cascades with measurable pressure.

from aether.memory import extract_fact_slots, BeliefDependencyGraph

facts = extract_fact_slots("I live in Seattle and work at Microsoft")
print(facts["location"].value)   # "Seattle"
print(facts["employer"].value)   # "Microsoft"

bdg = BeliefDependencyGraph()
# add beliefs and dependencies, then:
result = bdg.propagate_cascade(corrected_node_id, delta_0=1.0)
print(result.max_pressure, result.avg_pressure)

How you'd wire it into an existing agent

Three touchpoints. Aether does not replace anything. It wraps.

from aether.governance import GovernanceLayer
from aether.memory import extract_fact_slots

gov = GovernanceLayer()

# before the LLM call: pull structured facts out
user_facts = extract_fact_slots(user_message)

# your LLM call, unchanged
response = your_llm_call(messages)

# after the LLM call: check the response against the belief state
result = gov.govern_response(response, belief_confidence=0.6)
if result.should_block:
    response = "I'm not confident enough to answer that."

The six laws

Law Agent What it catches
1. Speech cannot upgrade belief SpeechLeakDetector Generated text being treated as evidence for itself
2. Low variance does not imply confidence TemplateDetector RLHF hedge templates that look like real uncertainty
3. Contradiction must be preserved before resolution PrematureResolutionGuard Held tensions getting collapsed too early
4. Degraded reconstruction cannot silently overwrite MemoryCorruptionGuard Compressed or hallucinated rewrites overwriting trusted memory
5. Confidence must be bounded by internal support GapAuditor The belief/speech gap. Anthropic's "internal-external decoupling."
6. Confidence must not exceed continuity ContinuityAuditor The system contradicting what it just said two turns ago

Where it sits next to other tools

Storage scope Tracks contradiction Belief/speech gap Cross-vendor portable Cascade pressure
Mem0, Letta, Zep, Cognee memory layer as overwrite no partial no
Microsoft Agent Governance Toolkit runtime policy no no yes no
Anthropic / OpenAI memory features per-vendor no no no no
Aether belief substrate first-class state measured by Law 5 yes yes

MCP tool surface

The MCP server (python -m aether.mcp) exposes 14 tools. The differentiators:

Tool What it does
aether_sanction Pre-action gate. Auto-grounds in substrate. Force-rejects when a high-trust memory contradicts the action.
aether_fidelity Draft auditor. Computes belief_confidence from substrate grounding instead of accepting whatever the caller passed.
aether_lineage "Why do I believe this." Walks SUPPORTS edges back to source memories.
aether_cascade_preview Dry-run a correction. See blast radius before committing.
aether_correct Demote a memory's trust and cascade through SUPPORTS / DERIVED_FROM edges.
aether_session_diff What changed since a given timestamp. New memories, recent corrections, new contradictions.

Plus aether_remember, aether_search, aether_memory_detail, aether_belief_history, aether_contradictions, aether_resolve, aether_context, aether_link. State persists in ~/.aether/mcp_state.json.

The Claude Code plugin also ships seven slash commands: /aether-status, /aether-search, /aether-check, /aether-init, /aether-contradictions, /aether-ingest, /aether-correct.

Open-core split

aether-core is MIT and free. Permanently. Every primitive in this repo (the six immune agents, the structural tension meter, belief backpropagation, the BDG with cascade pressure, the MCP server, the auto-ingest hook) stays open. The hosted Aether substrate (cross-account state, sanction governance API, audit dashboards, multi-user) is the paid product. That split is fixed and does not move backward.

Design choices, briefly

A contradiction is information, not a bug. Some are meant to stay open.

Trust is not assigned, it is earned. It moves under reinforcement, correction, and time.

The belief/speech gap should be logged, not hidden. You want to see when the system says more than it knows, even if you choose not to act on it every time.

The model is the mouth, not the self. The governance and the belief state should work the same regardless of which LLM is producing the words.

Structure beats semantics for this kind of work. Slot comparison at 88 percent accuracy beats LLM-as-judge at 40 percent — that result was the design's origin.

Cascade pressure can be measured. Belief revisions propagate through a graph with bounded depth and damping. There is real math under it; a paper is in flight.

Where this came from

This grew out of running an assistant in production for a long time and watching the same problems come back. Continuity drift between sessions. Contradictions getting silently smoothed over. Trust on a fact climbing back up after the user corrected it twice. The structural tension meter came out of an experiment where removing the LLM from the belief-verification step roughly doubled accuracy, which was annoying and clarifying in equal measure.

The architecture was originally called CRT (Contradiction-aware Reconciliation and Trust). It is now Aether, which is what it has always actually been.

Status and roadmap

v0.12.8 (2026-04-30) closes all 10 known findings. The substrate is structurally complete: auto-ingest fires after every turn, the server picks up external writes on the next call, all read tools degrade gracefully on corrupt nodes, search is now trust-weighted. See ROADMAP.md for what is coming and what is intentionally out of scope.

License

MIT.

Author

Nick Block, @blockhead22.

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

aether_core-0.12.14.tar.gz (216.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aether_core-0.12.14-py3-none-any.whl (154.1 kB view details)

Uploaded Python 3

File details

Details for the file aether_core-0.12.14.tar.gz.

File metadata

  • Download URL: aether_core-0.12.14.tar.gz
  • Upload date:
  • Size: 216.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aether_core-0.12.14.tar.gz
Algorithm Hash digest
SHA256 28bd83e04a9c96d31ea07c1009a6ededee933a2af74585c781c6ace730836e14
MD5 c9ed91125db515bf6a807b3af6fe25bd
BLAKE2b-256 b9432f9f05a73014f3ab71e42b3e254c6e45b3122d8371768530c051b72c52d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for aether_core-0.12.14.tar.gz:

Publisher: release.yml on blockhead22/aether-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aether_core-0.12.14-py3-none-any.whl.

File metadata

  • Download URL: aether_core-0.12.14-py3-none-any.whl
  • Upload date:
  • Size: 154.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aether_core-0.12.14-py3-none-any.whl
Algorithm Hash digest
SHA256 01e3d78f8a0218032da44049d00f4697c7d1fd22be3942df3237693967e7adbc
MD5 68477b0c69fc14327645b32e27cae211
BLAKE2b-256 5887b6f8db645924321f147173ad8650fdbd9db0335857f15f43a7c8be9df024

See more details on using hashes here.

Provenance

The following attestation bundles were made for aether_core-0.12.14-py3-none-any.whl:

Publisher: release.yml on blockhead22/aether-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page