
LingNao
io.github.genesis-planv1.4.1Updated Oct 9, 2026
LingNao: deterministic reasoning for AI agents → verified/refuted/unverifiable. ~3ms, fail-closed.
Overview
LingNao exposes one gateway tool that performs deterministic symbolic reasoning — planning, causal inference, uncertainty bounds and math sanity checks —…
- What it does
- A single MCP tool named lingnao dispatches roughly 51 operations through an op plus args call, covering A* and deterministic MCTS planning, do-calculus causal and counterfactual reasoning, PAC/VC sample-size bounds, world-model and belief operations, embodied task planning with SAFE-STOP and bounded replanning, and ten deterministic mathematical sanity traps. Outputs are structured JSON with a three-state verdict (true, false, or abstain) and a reproducible proof ledger; the same input always yields the same output. The README states the engine is symbolic and that any optional LLM use is confined to natural-language parsing and explanation, marked UNVERIFIED_LLM and kept out of the…
- When to use it
- Use it when an agent needs reproducible, machine-consumable reasoning steps rather than generated text: route planning under constraints, causal effect or counterfactual questions, sample-size estimation, or sanity checks against known mathematical theorems. It is not a language model, an auditor, a verifier, or a general theorem prover, so it is a poor fit for text generation or formal proof work.
- Requirements
- Runs locally over stdio, typically via npx with the npm package lingnao-mcp or the GitHub repository; Node.js is needed. The README's example configuration shows an optional OPENROUTER_API_KEY environment variable that may be left empty. No authentication is declared in the manifest and no other credentials are required.
Installation
In SourceWeft
- Open LingNao in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
English | 推理方法学与数学定理(地基文档) | API 接入指南 | Playground
灵脑 LingNao · 任意智能体的确定性推理服务
[License] [MCP] [Non-LLM] [npm]
灵脑是面向「任意智能体」的确定性推理服务层——不做验证、不做审计,只做推理。 无论你的智能体跑在 Claude、GPT、自研 agent 还是机器人控制器上,只要它能发 MCP 调用,就能用同一个网关
lingnao(op+args→ 结构化结论)拿到确定性、不幻觉、可复现的推理。 推理能力由真实数学定理支撑:A*/确定性 MCTS 做深思规划,do-演算做因果推理,PAC/VC 维做不确定性界,Baire 纲 / 紧致性 / 代数簇 / 范德瓦尔登 / Cauchy–Lipschitz / Bertrand / 鸽笼原理 / 霍尔匹配 / Erdős–Szekeres / 欧拉路径 共 10 个真实定理做数学健全性压力测试。 完整方法学与定理清单见 docs/00-推理引擎原理与方法学.md。
- 仓库:
genesis-plan/lingnao· npm:lingnao-mcp· 在线试用:playground / 控制台
为什么"任意智能体"都能用
这不是营销话术,而是接口设计 + 内核性质共同保证的:
方法学与数学定理(地基)
灵脑的推理能力由真实数学定理支撑,不是启发式打分。五大前沿逐一对应:
逐条定理出处、保证内容与
op对应关系,见 docs/00-推理引擎原理与方法学.md。 诚实注记:因果/世界模型为 lite 实现(PC-lite 发现、线性 SEM),规划基于有限图;但每个结论都来自确定性符号计算,可复现、不幻觉,数学健全性由真实定理保证。
30 秒上手
① MCP 接入(推荐,给任意 AI 客户端用) —— 不用开网页、不用服务器、不用本地装包:
npm 稳定版同款:{ "command": "npx", "args": ["-y", "lingnao-mcp"] }(见 mcp.json / mcp.example.json)
② 零安装网页 —— 双击 playground.html(A* 规划 + 因果 + 数学健全性陷阱,离线可用),或 lingnao-console.html(接入身体/大模型/大脑后开始干活)。
③ 开发者
- Node 库:
const K = require('./lingnao-mcp')(直接调内核,不自启服务) - 浏览器:
<script src="https://cdn.jsdelivr.net/gh/genesis-plan/lingnao/lingnao.umd.js"></script>→window.LingNao
能力边界(诚实声明)
不保证:绝对安全、绝对正确、不漏解、能连所有真机。这是设计上的诚实边界,不是待修缺陷。
推理能力(单网关 lingnao,op 参数分派)
MCP 对外只暴露 1 个工具 lingnao:arguments = { "op": 能力名, "args": 参数 },按旧名直调会被拒绝并返回指引。
world_info · set_world · perceive · reason · carrier_report · learn · knowledge_query · knowledge_add · meta · perceive_belief · knowledge_ann · knowledge_distill · cog_graph · world_model · counterfactual · causal_effect · dmcts · goal_directed · pac_bound · ask · explain · causal · event_publish · knowledge_fabric · ima_load · ima_query · sl_record · sl_discover · sl_monitor · sl_status · attach_body · capabilities · get_state · set_state · state_diff · h_max · plan_task · execute_task · positioning · bertrand_trap · compactness_trap · van_der_waerden_trap · baire_trap · variety_trap · cauchy_lipschitz_trap · pigeonhole_trap · hall_trap · erdos_szekeres_trap · euler_path_trap · run_deterministic_traps
推荐调用序列(纯推理)
world_info— 查看世界图 𝕎set_world—(可选)载入你自己的场景carrier_report— 上报物理状态(电量/密度)以推导硬/软约束reason— 深思规划(系统 1 快答 + 系统 2 A* + RSG)dmcts—(可选)确定性 MCTS 多候选探索causal/causal_effect/counterfactual— 因果与反事实推演pac_bound— 评估所需样本量(不确定性理论)learn— 把真实结果反馈回经验库,置信度流入未来规划
推荐调用序列(具身 / 机器人)
attach_body → plan_task → execute_task(每步 SAFE-STOP)→ state_diff → 有界重规划(maxReplans)
两个独立产品,勿混淆
灵脑 = 推理-only:感知 / 规划 / 因果 / 数学健全性 / 具身决策,全程不计算、不求解、不委派。方程求解 / 验真归灵数 lingshu-solver(独立产品),两者互不耦合、互不委派。
分发渠道
许可(摘要)
非商业免费 + 商业须书面授权(自有《灵脑商业授权许可协议》,不是开源协议):
- 非商业用途免费:个人学习 / 研究 / 教学 / 评测;非营利组织与教育机构内部使用;年营收 ≤ 100 万元的团队内部评估(同时运行实例 ≤ 3 个)。须保留版权与许可声明。
- 商业用途须事先取得书面授权:任何以营利为目的的产品 / 服务 / 业务,SaaS / 云 / API 对外提供能力(无论是否收费),集成嵌入商业发行物,再分发 / 转授权 / 对外托管 —— 均须《商业授权协议》。
- 「灵脑 / LingNao」为版权方商标,本许可不授予商标使用权。
完整条款见 LICENSE | 授权范围见 06 · 商业授权与收费
联系
- 商务 / 授权 / 反馈:[email protected](亦可用仓库 Issues)
- 版权方:广州市红尘灵境数字科技有限公司
诚实注记(已知待办)
knowledge_query/knowledge_add/knowledge_ann/knowledge_distill/cog_graph需接入 KB 知识库,未接入时恒返available:false;自测中如实单列为「已知未实现能力」,不计入绿色通过。- 物理接入模块 30 条协议中仅
ws/modbus-tcp/mqtt已实装真实驱动,其余为「仅建档、需硬件」。 docs/01–11为历史技术文档,仍含「审计/验证」旧口径,正逐步与本文档及 docs/00 对齐(后续收尾任务);本文档与方法学文档为对外权威口径。- 验证/审计类能力(
audit/certify/verify/prove/runtime_monitor等)已从对外网关能力清单中移除(不再暴露、不再挂名),仅保留为内核内部资产;灵脑对外只做推理。
Source: README.md at commit 503d431
Tools
0Version history
1- v1.4.1LatestOct 9, 2026


