Skip to main content

The first agent runtime with built-in epistemic honesty

Project description

Axiom

The first agent runtime with built-in epistemic honesty.

Current AI agent frameworks give you tool use, orchestration, and sometimes memory. None of them ask: how confident is this agent in what it's saying? None of them let agents verify each other without a central orchestrator. None of them track whether an agent has drifted from its original identity.

Axiom fixes all three.


What it gives you

Problem Axiom's answer
Agents hallucinate with full confidence Every belief carries a confidence score (0–1) and a provenance chain
Sessions are stateless — agents forget who they are Cryptographic identity persists to disk, drift-monitored across sessions
You can't trust another agent's output Agents verify each other directly via snapshot comparison — no central authority
No audit trail when agents act Every action passes through the Guardian, fully logged

Install

pip install axiom-agent

Or from source:

git clone https://github.com/AILIFE1/axiom
cd axiom
pip install -e .

Quick start

import anthropic
from axiom import AxiomAgent, BuiltinConstraints

client = anthropic.Anthropic()

def my_llm(prompt: str) -> str:
    return client.messages.create(
        model="claude-sonnet-4-6",
        max_tokens=1024,
        messages=[{"role": "user", "content": prompt}],
    ).content[0].text

agent = AxiomAgent(
    name="researcher-01",
    llm=my_llm,
    constraints=[BuiltinConstraints.min_confidence(0.6)],
)

# Every answer carries confidence + provenance — not just raw text
belief = agent.think("What are the risks of deploying untested ML models?")
print(belief.confidence)      # 0.82
print(belief.provenance_str)  # "reasoning:risk_analysis, memory:prior_context"
print(belief.is_actionable)   # True  (confidence >= 0.6)
print(belief.content)         # the answer

# Snapshot identity and measure drift from baseline
snap = agent.snapshot()
print(snap["divergence_from_baseline"])  # 0.0 on first run
print(snap["public_key"])                # cryptographic fingerprint

Multi-agent trust (the new bit)

No other framework lets Agent A independently verify Agent B before acting on its output.

researcher = AxiomAgent("researcher-01", llm=my_llm)
validator  = AxiomAgent("validator-01",  llm=my_llm)

# Researcher forms a belief and snapshots itself
belief = researcher.think("Current state of quantum error correction?")
snap   = researcher.snapshot()

# Validator verifies researcher independently — no central authority
trust = validator.verify_peer("researcher-01", peer_snapshot=snap)
print(trust.verdict)      # "trusted"
print(trust.trust_score)  # 0.91

# Gate an action on both the validator's confidence AND peer trust
if trust.is_trusted:
    result = validator.act(
        "publish",
        publish_fn,
        belief.content,
        context={"confidence": belief.confidence, "peer_trust": trust.trust_score},
    )

Architecture

axiom/
├── agent.py              ← AxiomAgent — the main interface
├── core/
│   ├── identity.py       ← RSA-2048 cryptographic identity, persists to disk
│   ├── memory.py         ← SQLite-backed beliefs with confidence + provenance
│   └── drift.py          ← hash-based drift monitoring across snapshots
├── epistemic/
│   └── belief.py         ← Belief dataclass: content + confidence + provenance
├── guardian/
│   └── constraint.py     ← action gating + tamper-evident audit trail
└── trust/
    └── peer.py           ← agent-to-agent verification (local or Cathedral-backed)

Built on

This repo is the synthesis of several projects:

  • Cathedral — persistent identity + drift detection (the memory + snapshot model)
  • AgentGuard — runtime safety constraints + audit chain
  • Veritas — epistemic confidence engine (every belief has a provenance)
  • Aether — cryptographic succession protocol (identity handoff between agent versions)

Axiom unifies them into a single runtime anyone can wrap around any LLM.


Constraints

Axiom ships with four built-in constraints. You can also write your own.

from axiom import BuiltinConstraints

BuiltinConstraints.min_confidence(0.7)        # block if agent < 70% confident
BuiltinConstraints.deny(["send_email"])        # always block named actions
BuiltinConstraints.require_peer_trust(0.6)    # warn if acting on low-trust peer output
BuiltinConstraints.rate_limit("publish", 5)   # max 5 publish calls per minute

Roadmap

  • Consensus mechanism: N agents must agree before high-stakes action fires
  • Gossip protocol: agents share verified high-confidence beliefs across a network
  • Cathedral sync: optional cloud backup of identity + drift timeline
  • MCP server: Axiom as a tool any Claude session can call (axiom_mcp.py)
  • PyPI release — pip install axiom-agent

Support

Axiom is built and maintained by one person in their spare time. If it's useful to you, a small contribution goes a long way.

Ko-fi

BCH: bitcoincash:qr3f60yk6yc0vut3hukhuch8dylwjnq8qvv0q5pnxv

No pressure — starring the repo and sharing it helps just as much.


License

MIT

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

axiom_agent-0.2.0.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

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

axiom_agent-0.2.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file axiom_agent-0.2.0.tar.gz.

File metadata

  • Download URL: axiom_agent-0.2.0.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for axiom_agent-0.2.0.tar.gz
Algorithm Hash digest
SHA256 57e7a69c14b5322b4203541f33a7d6ef1742f64d3a83b4b43342d2bc05c476de
MD5 1eb4acbd3f8629a9c4da19a9113b914a
BLAKE2b-256 84a803276eb359d64ee3a349fc1e1db5d2f62393c5decf7b6fd0c36e44c4b5ab

See more details on using hashes here.

File details

Details for the file axiom_agent-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: axiom_agent-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for axiom_agent-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 623415f1320cb81df1c29f6fe1c7954316a0a1a4d95562b4bb433d846d9645df
MD5 74f660ae6913198a902f411c188b8636
BLAKE2b-256 f9521ba32e0b6a97d1ee3635a9af568022fb7dadac256f20286ee5d9b0b3ac24

See more details on using hashes here.

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