Judgment + cognitive infrastructure for agentic AI.
Hikmah Stack is an open-source, model-independent capability system for AI agents. Version 3.0.0 adds the Hikmah Cognitive Kernel, a deterministic Rust co-model runtime that owns persistent memory integrity, provenance, contradictions, commitments, decision scoring, parallel challenge lanes, and verification state outside a language model's hidden activations.
MIT · Maintained by Juber Shaikh
Do not build an “agent brain” by stacking a bigger prompt, vector DB, graph, and another transformer. Start with cognitive invariants and choose a mechanism only when it earns its complexity.
optional proposal engines
GPT / Claude / local LM / rules / search / future model
|
v
+------------------------------------------------------------------+
| HIKMAH COGNITIVE KERNEL |
| TraceWeave | CounterTrace | Decision Forge | Deliberation | Gate |
+-------------------------------+----------------------------------+
|
append-only provenance + outcome memory
|
portable Hikmah Stack skills
The kernel itself is not a neural network and not a transformer. Learned models are optional proposal engines behind a stable interface. That means a model can be swapped without deleting the agent's commitments, provenance, policy, or correction history.
| Capability | Job |
|---|---|
| Operator Core | Human judgment, leadership, pressure, ethics, communication, recovery, stewardship |
| Agent Radar | Hallucination, loops, context loss, sycophancy, slop, opacity, cost, memory failures |
| Decision Forge | Options, uncertainty, evidence coverage, hard constraints, reversibility, action |
| Ship Guard | Acceptance criteria, verification, rollback, handoffs, completion discipline, outcome write-back |
| Hikmah Orchestrator | Cross-skill routing and synthesis |
| Cognitive Kernel | Persistent memory, co-model runtime, contradiction handling, model-independent learning |
| Truth Gate | Narrow completion hygiene; Rust-first runtime with zero-install compatibility fallback |
A memory is an immutable trace: kind, content, provenance, confidence, salience, privacy, time, optional deadline, optional structured claim, and correction history.
At recall time, a resonance wave scores traces through lexical cues, tags, recency, salience, confidence, provenance, and prospective urgency. Redundant traces are suppressed. The recall “path” emerges for the current goal rather than being stored forever as graph edges.
Read Memory and Cognitive Kernel.
Hikmah borrows testable principles from memory research: selective consolidation, replay, temporal structure, reconsolidation-like correction, bounded attention, and prospective memory. Biology inspires mechanisms; it does not prove them. Sources and limitations live in Research Notes.
cargo run -p hikmah-kernel -- validate --root .
cargo run -p hikmah-kernel -- init
cargo run -p hikmah-kernel -- remember \
--kind observation \
--content "Migration failed because the lock timed out" \
--tag database --tag deployment --verified
cargo run -p hikmah-kernel -- recall --query "why did the deployment fail"
cargo run -p hikmah-kernel -- consolidate
cargo run -p hikmah-kernel -- commitments --within-hours 168A non-neural symbolic plan and a structured decision frame can be evaluated with:
cargo run -p hikmah-kernel -- plan --problem examples/plan-problem.jsonThen:
cargo run -p hikmah-kernel -- decide --frame examples/decision-frame.jsonThe kernel also exposes a narrow ProposalEngine trait so neural, symbolic, search-based, state-space, or future architectures can be benchmarked behind the same cognitive contract.
- Evidence before confidence.
- Memory is typed, scoped, provenance-bearing state, not hidden chain-of-thought.
- Corrections supersede; contradictions remain visible.
- Models propose; durable state transitions are gated.
- Human-impact, privacy, and hard safety constraints cannot be averaged away by a high score.
- Parallel challenge beats one model grading itself.
- Outcomes teach more than plans.
- Unknown is a valid serialized state.
- Novel architecture must beat a measurable baseline, not merely sound futuristic.
- Never claim a perfect general engine; build a perfectibility loop where failures become tests and controls.
codex plugin marketplace add CodeWithJuber/hikmah-stack/plugin marketplace add CodeWithJuber/hikmah-stack
/plugin install hikmah-stack@hikmah-stack
/reload-plugins
The repository root carries kimi.plugin.json, so the repo itself is a valid Kimi plugin bundle: all six skills load under the hikmah-stack:* namespace with routing guidance from the manifest's skillInstructions. Install by adding this repository as a Kimi plugin, or pack the directory into bundle.zip for the catalog flow.
Use the folders under skills/ as the portable layer. Host-specific adapters remain thin by design.
skills/ portable judgment/cognition skills
runtime/hikmah-kernel/ deterministic Rust co-model runtime
playbooks/ operational cognitive loops
lenses/ reusable diagnostic perspectives
docs/ architecture, memory, co-model, research, ethics, evaluation
hooks/ host completion hooks; Rust-first Truth Gate
.codex-plugin/ OpenAI adapter
.claude-plugin/ Claude Code adapter
kimi.plugin.json Kimi adapter (repo root doubles as plugin bundle)
.github/ CI and open-source workflows
Hikmah is decision-support infrastructure, not a substitute for current qualified medical, legal, financial, security, religious, or other professional judgment. The reference ledger refuses sensitive persistence by default. Production deployments needing sensitive durable memory should add an encrypted, deletion-capable vault rather than pretending an append-only log satisfies every privacy requirement.
MIT. See LICENSE.