Skip to main content

A governed cognition framework for AI systems

Project description

Alethic

A governed cognition framework for AI systems.

DOI

Your model proposes. Alethic decides.

Alethic is a domain-agnostic governance layer for AI agents. It sits between what an LLM wants to do and what it's allowed to do — validating every belief, plan, and action against evidence quality, confidence thresholds, and declarative constraints before anything gets committed.

The core insight: architectural governance — not model scale — is the primary bottleneck for trustworthy modular AI. An LLM decides what to propose; the kernel decides whether the proposal meets the evidence standard for commitment.

How It Works

Blackboard Kernel Architecture

Seven semantic slots hold all state. Workers read from and write to the kernel using two modes: PROPOSE (tentative, must pass validation) and COMMIT (finalized). Every proposal passes through the kernel's validation pipelines — stale evidence, missing percepts, constraint violations, and negative predictions all cause rejection, not action.

Quick Start

pip install alethic-kernel

Use as a library

from alethic_kernel import AlethicClient

client = AlethicClient(mode="local")
result = client.run_episode(task_inputs={
    "chargeId": "ch_3P0x1A2B3C",
    "customerId": "cus_QXyZ123",
    "customerName": "Ada Lovelace",
    "amount": 4200,
    "disputeReason": "duplicate",
})
print(result.metrics)  # {'task_success': 1.0, 'unsafe_action': 0.0, ...}

Run the benchmark

# All agents except LLM (no local model needed)
python -m alethic_kernel.run --no-llm

# Full benchmark (6 tasks, 50 seeds, 4 agents = 1200 episodes)
python -m alethic_kernel.run

Start the API server

pip install "alethic-kernel[api]"
alethic serve --port 8000

The HTTP API has no authentication and is not production-ready. Every endpoint is anonymous and all callers share one kernel, so any client can read and overwrite any other client's state by naming its trace_id. Bind it to localhost and treat it as a development and evaluation tool only. The library itself does not carry this limitation.

Benchmark Results

To validate the framework, we ran 1,200 episodes (6 tasks, 50 seeds, 4 agents) across Stripe refund tasks with controlled perturbations:

Agent Task Success Unsafe Actions Unsupported Beliefs Traceability
string_glue 61.3% 38.7% 26.0% 0.10
json_glue 57.0% 43.0% 31.0% 0.30
alethic 100% 0% 0% 1.00
llm_bk 99.0% 0% 0% 1.00

The kernel-backed agents (alethic and llm_bk) achieve zero unsafe actions across all perturbation scenarios. Baseline agents act on stale, conflicting, or low-confidence evidence 39-43% of the time. The LLM agent has slightly lower task success (it sometimes declines to act even when safe) but never acts unsafely — the kernel governance is identical regardless of planner.

Documentation

  • Architecture — Blackboard kernel design, semantic slots, validation pipelines
  • API Reference — Every public class and method with signatures and return codes
  • Workers — Worker protocol, built-in workers, writing custom workers
  • HTTP API — REST endpoints, AlethicClient SDK, OpenTelemetry
  • Benchmark — Tasks, perturbations, metrics, CLI reference
  • Deployment — Docker, environment variables, store selection, testing

Project Structure

src/alethic_kernel/     Installable Python package
  kernel.py             Blackboard kernel — central orchestrator
  schema.py             Record, Provenance, Slot, WriteMode
  validators.py         Evidence and symbolic validation
  store.py              In-memory store
  sqlite_store.py       SQLite-backed persistent store
  orchestrator.py       Worker round-robin loop
  sim_worker.py         Rule-based forward simulator
  adaptive_worker.py    Learns constraints from failure patterns
  session.py            Multi-episode session management
  client.py             AlethicClient (local + HTTP modes)
  api/                  FastAPI server
  agents/               Four reference agents
  eval/                 Evaluation harness and metrics
  llm/                  OpenAI-compatible planner
  tools/                Simulated tools with perturbations
  tasks/                6 Stripe refund task definitions (YAML)
examples/               Multi-episode demos
tests/                  Test suite
docs/                   Architecture, API, and deployment guides

Research Paper

The full academic treatment is in From Fragile Glue to Governed Cognition — a controlled study of blackboard kernels for modular AI systems. Paper artifact repository: governed-cognition.

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

alethic_kernel-0.2.0.tar.gz (231.5 kB view details)

Uploaded Source

Built Distribution

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

alethic_kernel-0.2.0-py3-none-any.whl (50.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for alethic_kernel-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e965e115ff81d68ceef9592bd9710065a3bb221f1f96960ca1b99cc3eac9eed9
MD5 81f0c2ad95a3332ede4d465b7de26798
BLAKE2b-256 3ec10390d9fa597e87daa27fb7323e5ba610a75560b3c2ca92424a21da3a011d

See more details on using hashes here.

Provenance

The following attestation bundles were made for alethic_kernel-0.2.0.tar.gz:

Publisher: publish.yml on alethicdev/alethic-kernel

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

File details

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

File metadata

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

File hashes

Hashes for alethic_kernel-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1adb5bffde49b59f75d551480bd87964fc846061d7c6346f70b0b83d64e5a79a
MD5 86ed7525a54fbef7e6eb5b8d20bed0d8
BLAKE2b-256 95710d89bf17a044fd55022d7eafbbac5fd11d8cb92c93121f48231689f96afa

See more details on using hashes here.

Provenance

The following attestation bundles were made for alethic_kernel-0.2.0-py3-none-any.whl:

Publisher: publish.yml on alethicdev/alethic-kernel

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