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

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

PyPI package coming soon: pip install axiom-agent


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
  • PyPI release

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.1.0.tar.gz (14.8 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.1.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: axiom_agent-0.1.0.tar.gz
  • Upload date:
  • Size: 14.8 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.1.0.tar.gz
Algorithm Hash digest
SHA256 8c98bd13949c4d2c7780a786da164e4d811ca0ec049f4d9883fdd7539ea62b98
MD5 a7c16fdde2b8daf07542e5032fd15f71
BLAKE2b-256 70153840e55b048a2c1d35445e94f21bbf294bfa85755809cb786dd9b06fd8c4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: axiom_agent-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c1776ab1f1a373deb9e38fb5968f89aa39e5e44991d168ff9a87220c0d0b7e1
MD5 46791c1d880f840639c15f546a7cb664
BLAKE2b-256 a7043c8494c10d6c57b8b9257baa6f3393000ab9e02896e9207ad55bc8b19189

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