VSA and local LLM AI engine
  • Rust 96.4%
  • Shell 1.7%
  • Python 1.3%
  • Dockerfile 0.2%
  • JavaScript 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Till Wegmueller 934621dd38
Some checks are pending
CI / check-seshat (push) Has started running
CI / check-akh-medu (push) Has started running
CI / test-akh-medu (push) Has started running
CI / docker-seshd (push) Has started running
CI / publish-chart (push) Has started running
agent/model_manager: compose the operator system prompt with psyche, don't replace it (the akhomed trap)
assemble_system_prompt's operator section (AkhConfig.system_prompt) fully
replaced the psyche-derived identity body whenever it was set, so any akh
with a configured system_prompt ran with no psyche/identity assembly at
all — silently, since tool + convention sections still composed correctly
and masked the loss. Both live workspaces on hephaistos (ptah, khnum) set
one, so both were running psyche-less.

Fix: the psyche-derived body is now always present and leads the assembly;
a non-blank explicit prompt composes as an additional "# Operator
Instructions" section immediately after it, rather than substituting for
it. Ordering rationale: psyche establishes who the akh IS (derived from its
actual state, machine-owned) and must never be silently dropped by an
operator-authored prompt; the operator section — voice/persona/policy,
human-owned — comes second so it still wins on tone conflicts. Several
operator prompts open with their own "You are <Name>, ..." line that now
sits next to the psyche body's own identity statement; that's accepted
redundancy, not contradiction, and this function does not attempt to
de-duplicate by parsing operator text.

When `explicit` is absent or blank the output is unchanged — byte-identical
to before this fix — so a workspace with no system_prompt (e.g. the
cluster's thoth) sees no behavior change; a dedicated test asserts this
directly against the psyche_body + tool_section + conventions composition.

Updates the three tests that asserted the old replace semantics
(assemble_composes_explicit_with_tool_section,
load_agent_uses_explicit_prompt_from_config) and adds the byte-identical
regression test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 21:28:13 +02:00
.anima/wip Merge remote-tracking branch 'origin/claude/wi-019e4909-self-identity-contamination-episode-blee' into develop 2026-06-14 19:17:53 +02:00
.cargo fix(illumos): portability — onig_sys alloca, mmap-rs sysctl/areas, libc CPUTIME clock ids 2026-07-11 13:25:31 +02:00
.claude/skills/babysit-lane skills: work the parked pile item by item in babysit-lane 2026-08-14 15:43:00 +02:00
.claude-plugin fix: Idempotent triple insertion + Claude Code plugin scaffold 2026-03-18 22:16:50 +01:00
.forgejo Phase 42b — LongMemEval + LoCoMo harness with honest reporter (#311) 2026-08-16 17:15:37 +00:00
.github/workflows feat: Add workspace hermeticity test to CI (019e0b78) 2026-06-01 17:01:48 +00:00
.solstice Make root CI signal reflect compilation 2026-08-08 13:16:43 +02:00
agents fix: Idempotent triple insertion + Claude Code plugin scaffold 2026-03-18 22:16:50 +01:00
benches Merge PR #165: feat: [VSA Agent] VSA-Native Action Selection in OODA Decide Phase (019e403b) 2026-06-02 12:58:11 +02:00
benchmarks fix(lint): clear workspace clippy warnings in grug-data + harness-core 2026-07-28 12:19:01 +02:00
book docs: purge references to tools removed in 05e8f8c 2026-07-18 10:22:34 +02:00
charts/akh-medu Setup pod security context 2026-08-11 18:39:21 +02:00
contrib feat(release): Solstice release pipeline + lean binstall-able remote akh client 2026-06-30 16:09:54 +02:00
crates Periodic snapshots have failed ~390×/day since 2026-08-08 with an opaque "akhomed-store database operation failed" — surface the source error, then fix 2026-08-17 12:15:20 +02:00
data feat(adr081): stable triple-identity hash + schema-pack compiler prefactors 2026-07-05 12:53:29 +02:00
docker docker: install target OpenSSL for the amd64 cross build 2026-08-11 20:55:26 +02:00
docs feat(grug-data): P3-RL A1 — whole-trace quality criteria replay cannot see 2026-08-15 14:06:28 +02:00
eval_data Phase 42b — LongMemEval + LoCoMo harness with honest reporter (#311) 2026-08-16 17:15:37 +00:00
examples deepseek: correct context_window to the endpoint-reported 512000 2026-08-11 19:19:14 +02:00
hooks feat: [MEDIUM] Zero episodic memory: 7+ days of rituals never ingested (019e5356) 2026-06-01 16:01:23 +00:00
packaging feat(release): Solstice release pipeline + lean binstall-able remote akh client 2026-06-30 16:09:54 +02:00
plugin-skills fix: Idempotent triple insertion + Claude Code plugin scaffold 2026-03-18 22:16:50 +01:00
scripts scripts: add rename-akh.py, a data-preserving akh rename 2026-08-12 18:03:49 +02:00
skills docs: purge references to tools removed in 05e8f8c 2026-07-18 10:22:34 +02:00
src agent/model_manager: compose the operator system prompt with psyche, don't replace it (the akhomed trap) 2026-08-19 21:28:13 +02:00
tests Hydrate lazy workspace opens from Postgres (WI 019fe636-94e1) 2026-08-09 17:02:34 +02:00
training feat(phase51): CUDA backend + training/ workspace for H100 cloud handoff 2026-07-25 18:04:57 +02:00
vendor fix(illumos): shrink libc vendor to a 2-line cpu-time patch 2026-07-11 17:29:50 +02:00
wit Add configurable tool registry with danger metadata, CLI tools, and WASM runtime (Phase 10) 2026-02-14 01:51:00 +01:00
.anima-owner WI 4 — diagnostics: provider-dispatched, blast-radius scoped, baseline-aware 2026-08-12 14:22:58 +00:00
.dockerignore feat: add Kubernetes deployment — Docker images, Helm chart, version 0.6.0 2026-04-14 22:53:58 +02:00
.gitignore feat(phase50-w5): real public-benchmark leaderboard rows (frontiercode/locomo/longmemeval x 3 models) 2026-07-06 13:35:02 +02:00
.mcp.json chore: empty project .mcp.json (seshat moved to user scope) 2026-04-23 20:43:43 +02:00
AGENTS.md feat: [Gemma+Psyche] LoRA Fine-Tuning Pipeline for Psyche-Encoded Adapters (019e4084) 2026-06-01 16:32:59 +00:00
build.rs feat(reconcile): forward-port candle boundary + ROCm GPU + Gemma4 audio; keep Ollama 2026-06-20 14:46:35 +02:00
Cargo.lock acp: structured tool calls, session/cancel, workspace via _meta; graceful MCP degradation + protocol version negotiation 2026-08-19 21:08:16 +02:00
Cargo.toml acp: structured tool calls, session/cancel, workspace via _meta; graceful MCP degradation + protocol version negotiation 2026-08-19 21:08:16 +02:00
CLAUDE.md docs(phase50): ADR 086 + plan — feature-test VM harness & benchmark program 2026-07-05 17:31:55 +02:00
justfile feat(phase50-w5): real public-benchmark leaderboard rows (frontiercode/locomo/longmemeval x 3 models) 2026-07-06 13:35:02 +02:00
LICENSE Add GNU General Public License v3 2026-02-11 20:48:52 +01:00
README.md docs: workspace, benchmarks and IP boundaries in the README 2026-08-14 11:59:11 +02:00
release.toml Use cargo-release for version management and tagging 2026-02-14 16:01:41 +01:00

akh-medu

A neuro-symbolic AI engine made to run on the CPU. Made for people. Not for robber barons.

Documentation

akh-medu combines hyperdimensional computing (Vector Symbolic Architecture) with knowledge graphs and symbolic reasoning. It runs entirely on the CPU with no LLM dependency, no GPU requirement, and no external NLP models.

  • Infer new knowledge via spreading activation, backward chaining, and superposition reasoning
  • Reason symbolically using e-graph rewrite rules (equality saturation)
  • Search semantically using 10,000-bit binary hypervectors
  • Act autonomously via an OODA-loop agent with 15 built-in tools
  • Parse and generate natural language in 5 languages via a grammar framework
  • Serve knowledge over REST and WebSocket APIs

Quick Start

cargo build --release
akh-medu init
akh-medu seed apply ontology
akh-medu grammar parse "Dogs are mammals" --ingest
akh-medu query --seeds Dog --depth 2

See the Quick Start Tutorial for a full walkthrough.

Architecture

┌──────────────────────────────────────────────────────────┐
│                      Engine API                          │
├──────────┬──────────┬──────────┬──────────┬──────────────┤
│   VSA    │Knowledge │Reasoning │Inference │   Agent      │
│  Ops     │  Graph   │  (egg)   │ Engine   │  OODA Loop   │
│ ─────────│──────────│──────────│──────────│──────────────│
│ HyperVec │petgraph  │ rewrite  │spreading │ 15 tools     │
│ SIMD     │oxigraph  │ rules    │backward  │ planning     │
│ ItemMem  │SPARQL    │ e-graphs │superpos. │ psyche       │
├──────────┴──────────┴──────────┴──────────┴──────────────┤
│                   Tiered Storage                         │
│  Hot (DashMap) · Warm (mmap) · Durable (redb)            │
└──────────────────────────────────────────────────────────┘

The rest of the workspace

The engine is the root crate. Around it:

Crate Role
seshat Shared corpus library — RAG over pgvector
heka Postgres+pgvector evaluation store for long-term memory
akhomed-store Postgres-backed durable store for relocatable Akhs
anima-ai Multi-engine natural-language routing
grug-data / grug-train Grug-Brain BabyLLM data generation and Burn training beachhead
akh-egraph-bench E-graph reasoning microbenchmarks
benchmarks/harness-core The agentic-task benchmark harness (below)

Deployment: a Helm chart in charts/akh-medu, Linux and illumos packaging in packaging/, and cargo binstall support that pulls prebuilt akh binaries from the Forgejo releases rather than compiling.

Benchmarks

benchmarks/ is a reproducible harness for agentic tasks, not a marketing table. Each run is pinned to a task-set hash and a harness SHA; once a task-set hash has a published run against it, that hash is frozen — edits land under a new hash rather than silently changing what an earlier row measured. benchmarks/LEADERBOARD.md is generated by bench-tool leaderboard from the committed runs under benchmarks/results/, never edited by hand.

The harnesses include illumos-e2e and illumos-orchestration — real operating-system maintenance and fleet-orchestration tasks, graded autonomously on a VM — alongside frontiercode, locomo and longmemeval. Published pass rates run from 100% on fleet-orchestration down to 0% on frontiercode. They are recorded as measured.

Documentation

The full documentation is hosted at akh-medu.dev and covers:

To build the docs locally:

cd book && mdbook serve

License

This repository is licensed under GPL-3.0-only. See the LICENSE file.

For integration into proprietary applications, contact the author — commercial licences are sold deliberately, and the money funds the FLOSS work.

Contributing

Contributions are welcome under the arrangement that pays for this project: contributors agree that their contribution may also be offered under a paid proprietary licence alongside the GPL. That is what lets proprietary vendors fund FLOSS work instead of free-riding on it. Open the discussion before a large change so nobody wastes an evening.

Dependencies and IP boundaries

  • The engine ships no model weights and requires none. No LLM dependency, no GPU, no external NLP models — VSA operations, the knowledge graph, e-graph reasoning and the grammar framework are all implemented in this repository and run on the CPU.
  • All third-party dependencies are unmodified upstream crates from crates.io under their own licences, pinned by Cargo.lock. Notable ones are egg (e-graphs), oxigraph (RDF/SPARQL), petgraph, redb, dashmap and burn.
  • No proprietary code or datasets are included, and no training corpus is committed. data/ holds hand-authored seed ontologies, compartment definitions and a schema.org schema pack; training/ holds run configs and scripts only. Training data is generated by grug-data in this repository.
  • Optional external services are the operator's own: PostgreSQL with pgvector for seshat and heka, and any cloud model endpoint a benchmark harness is pointed at. akh-medu holds no credentials of its own and phones nothing home.
  • Everything an operator puts in — symbols, triples, corpora, benchmark runs — stays the operator's.