@kashscript/neuron
v0.1.0
Published
Sovereign Intelligence Layer — agentic reasoning kernel + RAG orchestration. See specs/neuron.md.
Readme
@kashscript/neuron
Sovereign Intelligence Layer — an agentic reasoning kernel + RAG orchestrator with a tamper-evident audit ledger.
⚠ Commercial package (SSLA Schedule B). Production use requires an active paid Plan on the Kash-Registry. See LICENSE.
bun add @kashscript/neuron @kashscript/identity-core @kashscript/lexiconsNeuron is the "brain" artifact in the KashScript Foundry trinity (Identity,
Trade, Neuron). It dispatches AI operations through kash.neuron.*
envelopes, records every step in an append-only ledger, and ships with
seven phases of audit verification: zero double-spends, no judge
hallucinations, deterministic replay, mid-action crash recovery.
Highlights
- Kernel-mediated reasoning. Decomposer → Executor → Judge pipeline with cycle detection, hallucination catches, and zombie-process cleanup.
- Append-only audit ledger. Every decision is signed and chained; full replay from any point in history.
- RAG orchestration. Pluggable retrievers + privacy-filtered context.
- Adapters. Built-in for OpenAI, Anthropic, Bedrock, local Ollama, vLLM — bring your own with a 4-method interface.
- Atomic actions. Mid-action crashes leave the ledger consistent; resumption is deterministic.
- Operation prototypes. Pre-built shapes like the Oreoasis fact-check pipeline; register your own.
Quickstart
import { NeuronKernel } from "@kashscript/neuron/kernel";
import { openAiAdapter } from "@kashscript/neuron/adapters";
const kernel = await NeuronKernel.create({
signer: mySigner, // from identity-core
adapter: openAiAdapter({ apiKey: process.env.OAI! }),
ledgerDir: "./.neuron-ledger",
});
const result = await kernel.invoke({
operation: "summarise",
input: "Long document text...",
context: { audience: "executive" },
});
console.log(result.output); // model reply
console.log(result.auditTrail); // chain of decisions, ledger-anchoredWhat's in the box
| Subpath | Purpose |
|----------------------------------------------------|-----------------------------------------------|
| @kashscript/neuron | Default — re-exports the kernel + types |
| @kashscript/neuron/kernel | NeuronKernel, FSM, ledger, replay |
| @kashscript/neuron/rag | RAG retrieval orchestration |
| @kashscript/neuron/schemas | Zod schemas for every envelope |
| @kashscript/neuron/handshake | Operation handshake protocol |
| @kashscript/neuron/adapters | LLM adapter contract + built-ins |
| @kashscript/neuron/operations | Operation registry, lifecycle hooks |
| @kashscript/neuron/operations/prototypes/oreoasis| Reference operation: fact-check pipeline |
| @kashscript/neuron/plugins/oreoasis | Companion plugin for the Oreoasis prototype |
| @kashscript/neuron/deployment | Deployment manifests + topology helpers |
| @kashscript/neuron/orchestration | Multi-kernel coordination |
| @kashscript/neuron/audit | Audit-trail extraction + verification |
Audit posture
Neuron has been through seven internal audit phases. Each phase produced
a runnable proof script under audit/:
- Phase 1 — manifest hydration determinism
- Phase 2 — ledger append-only invariant
- Phase 3 — decomposer cycle detection
- Phase 4 — judge hallucination catches
- Phase 5 — zombie process cleanup
- Phase 6 — privacy-filter scrubbing
- Phase 7 — mid-atomic-action crash recovery
These are internal audits, not third-party. For high-stakes deployments, consider commissioning an external review.
Licensing
This is a Schedule B Commercial Package. See LICENSE for the full terms. Quick summary:
| Use | Plan required |
|-----------------------------|-------------------------|
| Local development / eval | free (no Plan needed) |
| 14-day production trial | trial |
| Production AI inference | paid / team / enterprise |
Per-monthly-call licensing is available for high-volume deployments —
contact [email protected].
