The NFramework.
One spec for AI, agents & software.

One spec for AI training & inference, agentic programming, and general software. Everything is a typed, composable unit called a neuro — implemented by NSDK.

Three domains. One contract.

The same spec describes a neural network, an agent, and a CRUD app — because each is just a graph of typed units.

/// AI training & inference

NeuroNet

Grammar-typed models where every weight is a named mathematical operation. The model learns which operation to use — and you can read which fired for any input. Auditable, updatable, interpretable.

/// Agentic programming

NeuroLang

A typed Python DSL for composing agents. Typed primitives, composition operators, plans as values. Write agents like sentences — inspect, cost-estimate, and replay them.

/// General software

Any software

The same unit — a neuro with conf.json, code.py, prompt.txt — describes a skill, a service, a workflow, or a whole product. Generic and agentic code share one substrate.

A neuro is the universal unit.

A neuro is a typed, composable runtime unit with identity, behaviour, and an optional language surface. The same shape covers thinking, planning, tool use, memory, model invocation, and behaviour policy.

conf · code · prompt

A neuro folder declares its identity in conf.json, its behaviour in code.py, and an optional prompt surface in prompt.txt. The factory hot-discovers folders at runtime — drop one in, the runtime sees it.

There is no atomic level you must reach. Composites are first-class — a neuro can itself be a graph of neuros. The framework is fractally compositional.

neuros/extract_book/ ├── conf.json │ { │ "name": "extract_book", │ "kind": "skill.web", │ "effect": "tool", │ "inputs": { "url": "str" }, │ "output": "dict" │ } ├── code.py # async run(state) └── prompt.txt # optional

A taxonomy with intent.

Ten first-class neuro classes. Each has a base type, a folder convention, and a place in composition. Together they form the framework's vocabulary.

Model neuro
Provider/model abstraction. Hot-swappable backends (OpenAI, Anthropic, Ollama Gemma, local). core/model_neuro.py, core/llm_registry.py.
Prompt neuro
Prompt blocks and composers as reusable modules. Typed slots; composes categorically. core/prompt_neuro.py.
Instruction neuro
Rules, policy, tone as explicit behavioural constraints. core/instruction_neuro.py.
Context neuro
Context slicing and assembly as programmable operations. Typed I/O contracts. core/context_neuro.py.
Memory neuro
Store, recall, extraction, categorisation, consolidation. Layered memory logic. core/memory.py, core/memory_graph.py.
Skill neuro
Concrete capabilities — system ops, integrations, domain tools. The largest namespace.
Workflow neuro
Sequential, DAG, parallel, looped orchestration. core/flows/.
Agent neuro
Role-specialised orchestration units built from other neuros. core/agent_neuro.py.
Code neuro
Read, write, diff, patch, plan, scan operations for self-modification and coding workflows.
Library neuro
Registry, taxonomy, discoverability so neuros can be reused like language primitives.

This is why the framework is language-like. It has vocabulary (kinds and namespaces), grammar (composition operators), semantics (typed contracts), runtime (factory + brain + executor + event bus), and a standard library (built-in neuros and reusable domain libraries).

NeuroLang — write agents like sentences.

NeuroLang is the agentic-programming layer of the spec. Primitives carry typed contracts — effects, budget, memory scope. Compose them with operators. The result is a structured plan you can inspect, cost-estimate, and replay.

From idea to plan in three lines.

Every neuro carries its own contract — types, effects, budget, docstring. Compose them with |. Get back a Flow — a plan you can render, cost-estimate, and run.

Where the flow is differentiable it's a tensor network. Where it's symbolic it's a string diagram. Same object, no translation.

# NeuroLang, bundled in NSDK from nsdk import neuro, Flow, Memory from nsdk.stdlib import web, reason @neuro(effect="tool") def extract_book(url: str) -> dict: """Scrape title, author, summary.""" ... research: Flow = ( web.search | extract_book | reason.summarize | memory.store ) plan = research.plan(query="category theory") plan.cost_estimate() # budget rolled up plan.run(memory=Memory.discrete())

NeuroNet — weights as code, not mystery numbers.

Standard networks are opaque by design. NeuroNet makes weights auditable by building the model from named, fixed mathematical operations. The network learns which operations to use, not what the operations should be.

When a prime is classified, you can read the path.

The model routed through jal_s1 → jal_s4 → jal_s4 — first- then fourth-order finite differences. That's a readable mathematical statement: "divisibility patterns change at multiple scales." Not post-hoc. Intrinsic.

Add new knowledge with one line — no retraining, no catastrophic forgetting. The grammar grows like a living knowledge system.

# Standard AI: add new knowledge # → collect data → retrain → re-evaluate # → hours · dollars · forgetting # NeuroNet: add new knowledge grammar.add_prime(31) # rule #11 grammar.add_prime(37) # rule #12 grammar.add_prime(41) # rule #13 # Model uses new rules from next call. # Read any decision: path = model.routing_path(n=40039) # → ["jal_s1", "jal_s4", "jal_s4"]

Deep-dive on the AI layer →

Computationally complete.

The framework is computationally universal in direction. It supports state, branching, iterative execution, unbounded composition, and external I/O. General computation is expressible through neuro composition — not just prompt chaining.

"If a capability matters for intelligent behaviour, it should be representable as a neuro. If neuros are composable and reusable, the system becomes programmable intelligence. If programmable intelligence is scalable, we have a credible path toward AGI systems engineering."
→ Build with NSDK Read the research