skynet-graph

An externalized reasoning layer for LLMs.

Your model's reasoning is trapped in prose: you cannot test one step on its own, reuse it tomorrow, replay it, or reopen it when a fact turns out to be wrong. This puts the reasoning outside the model — as typed facts and rules a machine can check — so it becomes something you can test, replay and reopen. It runs on your own local model. Nothing leaves the machine.

npm skynet-graph Node 18+ no build step AGPL-3.0 DOI two papers

Active R&D. Some of this is measured and replayable, some is proven only structurally, and the demos publish the losses too. We believe the substrate is ideal for higher-level reasoning strategies, so the strategy here is to improve concept grammars, the providers and the prompts they generate to get what we want.

Real runs · pick one

Watch it work

Every tab below is a real run, captured from the code as it stands — not a mock-up and not prose written about it. They are deterministic: no model, no GPU, no network. Clone the repo, type the command shown, and you get the same thing back, word for word.

deterministic · no model · no GPU — it prints this every time the source of every demo →
Four things it gives any model

What it is actually for

Each measured on real runs, with negative controls and deterministic re-runs. The crippled 9.5 GB model is the showcase because it is the starkest case — not the ceiling.

01 · ZOOM

Piece-by-piece on big tasks

The task is cut into steps, and each step sees only what it asked for — never the whole dossier.

N=200/domain: GSM8K 16→52% · FinQA 20→50%. On deep tasks where whole-context prompting collapses 0/33, the pieces hold 10/33.
02 · STEER

Certified know-how steers the answer

Method shapes mined from a checker steer the output on covered questions — a generic mechanism, most dramatic on a weak model.

SQL 8→63% · finance 7→62%, at zero big-model calls.
03 · REOPEN

Task memory that un-ticks itself

A late correction retracts what depended on it — and a withdrawn value reopens the finished task, with the reason.

Re-derivation at 0 model calls. Checked twice: no agent tool on the market reopens a task whose premise drifted.
04 · CRITIQUE

An external think mode

The model proposes; the graph refutes with the reason and the admissible options; the model revises.

Every point on the table names the statements carrying it — the model's own new angles included, refused by name when they cite nothing. Weighing them stays the model's job.
The numbers, plain

Where the lone model collapses, the pieces hold

How to read this: we take questions that have a known right answer, ask the same 9.5 GB model the same question two ways, and count how many it gets right. Higher is better — every bar is "how often it was right".

The two question sets. Maths word problems — the school-style "if a train leaves at…" kind (the public GSM8K set). Financial questions — real questions about real annual reports, with tables (the public FinQA set). "Deep" means many steps. A question you cannot answer in one move — it needs six or more little calculations, each feeding the next. That is where a small model falls apart. The two ways of asking. All at once — hand the model the whole thing and ask (what everyone does). Piece by piece — cut it into steps, and show each step only what it needs.

The hard ones: questions needing 6+ steps

Maths · asked all at once
0 right out of 33
Maths · asked piece by piece
10 right out of 33
Financial · asked all at once
8 right out of 50
Financial · asked piece by piece
22 right out of 50

Read the first row again: asked the usual way, this model got none of the 33 hard maths questions right. Not "fewer" — zero. Cutting the same questions into steps got 10 of them.

At scale: 200 questions per set, all difficulties mixed

Maths · piece by piece
16 %52 % right
Financial · piece by piece
20 %50 % right
Writing SQL · steered by certified know-how
8 %63 % right
Financial · steered by certified know-how
7 %62 % right

Struck-through = the same model, asked the ordinary way. Bold = the same model, same questions, with this in front of it. The faint mark on each bar is where it started.

The honest limit, since a graph never shows one: this only pays off when the question is too big for the model to hold at once. On easy questions it changes nothing — we measured that too. And the small model is bad at deciding how to cut a task up; something else has to do the cutting.

Positioning

Why not just…?

Each row is a measured delta or a checked absence — never a vibe. The last column is the part most comparisons quietly drop.

Instead of…you'd getskynet-graph gives…and does not claim
a bigger / frontier model — or a closed reasoning layer that wraps onemore raw capability, at API cost, off your machinetyped gates + deterministic replay on your own local model; nothing leaves the machinethat it out-reasons a frontier model, or any big-model number we have not measured
a decomposition framework (LLMCompiler, ReWOO)a task DAGa typed DAG where each step sees only what it asked for, behind a gate that refuses instead of guessingthat a small model is any good at CUTTING the task up (a measured limit)
LLM-as-judgea verdict, alwayscounts, coverage, and an honest "too close to call" — a verdict only when the margin earns ita reliable verdict on free, uncertified content
a RAG skill-libraryretrieved snippetsmethods that un-learn when their premise drifts — the moat no index hasthat novel, free-prose reasoning gets cheaper
the model's own "think" modea longer internal monologuean outside critic that refutes with the reason and the options, and puts every argument on the record with the evidence under itto weigh the arguments for you — that stays the model's job
a rules enginedeterministic rulesrules + truth maintenance: a falsified premise un-casts itself and everything built on it, with no rollback codehand-encoded completeness — the rules are learned, and defeasible
Try it

Thirty seconds, no model, no GPU

git clone https://github.com/9pings/skynet-graph && cd skynet-graph npm install # no build step — pure CommonJS, Node 18+ # the headline: a real annual report, worked end to end, replayed exactly node examples/integrated-demo/run.js --replay # any demo above — this is literally what the tabs are showing you node examples/strategies/react.js node examples/bootstrap/f3-task-memory.js # the full suite — 0 failures, 2 known skips npm test

Or embed it — npm install skynet-graph — and boot a graph from plain folders of rules:

const Graph = require('skynet-graph'); // rules live in files, not in code — so they can be read, diffed and versioned like data const g = Graph.fromDirs({ concepts: './concepts', builtins: true, seed }); // serve it to ANY OpenAI client, or to an agent as MCP tools: sg serve --frontier-model <path.gguf> # → http://127.0.0.1:4747/v1 sg mcp --frontier-model <path.gguf> # → ask · hint · propose · critique · …
Read the thing

Documentation

All of it is markdown in the repo — it ships in the npm package and renders on GitHub, so what you read is what the code carries. Start wherever your question is.