LearnHarness:专为学习打造的开源 AI Agent 教学框架
英文标题:🔶 LearnHarness – An Agent Harness for Learning
LearnHarness 是一款专为深度学习与自适应教学打造的开源 AI Agent 框架,通过智能体评估学习者当前的理解水平,动态规划认知路径并传授知识。项目采用“测量-规划-教学-练习”四步闭环体系,结合“大声思考”输入与持久化知识图谱,实现跨会话的推理链积累与个性化教学。该工具支持 OpenAI、Anthropic、Google、DeepSeek 等 30 余种模型 API,所有对话、配置及图谱数据均保存在本地纯文本中。LearnHarness 探索了 AI Agent 在苏格拉底式个性化教学与本地化认知追踪中的落地范式,为开发者与自学者提供了透明、可控且保护隐私的学习助手方案。
1.1 KB
55.5 KB
64.0 KB
739.7 KB
1.5 MB
37.2 KB
中文

面向学习的 Agent 框架(An agent harness for learning)
下载 · 工作原理 · 开发文档 · 问题反馈(Issues)
LearnHarness 利用 AI Agent,从你当前的理解水平出发,规划并讲授通向目标的完整课程。它能建立关于你掌握了什么以及你如何进行推理的详细认知图景,并随着你的学习进程实时更新。
它不会仅仅直接抛出解释,而是会结合你的回答与思考过程来决定你下一步需要什么。教学过程会一步一个推理节点地建立认知;练习环节则让所学变得切实可用;持久化的知识图谱会跨会话持续沉淀这些脉络。
- 测量(Measure)。 在正式教学前,Agent 会针对课程依赖的各个知识点,探测你的理解止步于何处。你的回答、置信度以及思考过程会明确告知它应该从哪里起步。
- 规划(Plan)。 它会制定一张从该起点通向最终目标的依赖关系图。你可以查看该计划,当你的实际理解程度与预期存在偏差时,课程会自动调整。
- 教学(Teach)。 每一步都建立在你已经理解的概念基础之上。你先做出预测,获得解释,然后检验自己的理解。在基于任何概念继续深入之前,所有混淆之处都会先被修正纠偏。其目标是让所学结论感觉显而易见地正确,而不仅仅是“似曾相识”。
- 练习(Practice)。 独立的练习会话会提出各种不同场景的问题,要求在不预先点明概念的情况下,自然调用正确的知识体系。问题和提示会根据你的推理过程动态自适应。
大声思考(Think out loud)。 思考输入框(thinking fields)允许你用自己的语言解释推理逻辑、不确定之处和直观反应。正是通过这种方式,Agent 才能获得详细的认知画像,而不仅是记录一串答题对错记录。你可以打字输入,也可以使用语音听写。
Agent 还可以在后台调研问题、制作直观的视觉解释,并构建交互式演示。
可跨会话继承的知识(Knowledge that carries forward)
你所学到的内容会以命题(propositions)和推理链(reasoning chains)的形式不断累积:包括单独的论断以及推导出这些论断的前提。知识图谱会直观呈现这一结构,并提供返回原始会话的溯源链接。你还可以导入个人笔记。
未来的教学会话可以直接读取图谱,而无需从零开始;练习会话也可以直接从中提取素材。它存储的是概念及其逻辑关联,而不是对你个人能力的评分标签。
从 learnharness.ai 下载 · GitHub Releases
- macOS (Apple Silicon): 已签名并公证的 DMG。拖拽至 Applications 目录即可。
- Windows (x64): 运行安装程序。目前尚未签名;Windows 可能会弹出“未知发布者”或 SmartScreen 警告。
- Linux (x64): 赋予 AppImage 可执行权限并打开,或安装 Debian/Ubuntu 的
.deb安装包。
填入你的供应商 API 密钥并选择模型,随后即可根据你想理解的内容开启学习会话。LearnHarness 支持 30 多种供应商选项,包括 OpenAI、Anthropic、Google、DeepSeek 和 OpenRouter。可选的语音听写与联网搜索功能使用独立的外部服务密钥。
所有三大平台均支持应用内更新。
- 自有密钥与模型。 无 LearnHarness 订阅费或中间加价。你只需向所使用的模型提供商支付用量费用;内置的实时费用计量器会显示模型调用开销。
- 本地存储。 你的对话记录、图谱、配置项和 API 密钥全部保存在本地设备上。学习记录采用易于查阅的纯文本文件格式。
- 外部服务交互。 模型请求通过你配置的供应商运行。模型请求仅发送任务所需的上下文信息;联网研究和语音听写也会访问相应的外部服务。本地存储并不等同于完全离线处理。
- 行为透明可审视。 系统提示词(System prompts)完全可见且支持编辑。本项目在 AGPL-3.0 协议下完全开源。
bash npm install npm run dev # http://localhost:3000 npm test # deterministic, no LLM, no network
问题反馈、Bug 汇报和功能建议请提交至:GitHub Issues。
本应用永远免费且开源。如果我们未来针对某些服务收费,也只会是针对托管密钥、云端托管等便利性服务——绝不会针对可在本地运行的功能进行收费。
English / 原文

An agent harness for learning.
Download · How it works · Documentation · Issues
LearnHarness uses AI agents to plan and teach lessons from your current understanding to your goal. It builds a detailed picture of what you understand and how you reason. That picture is updated as you learn.
Instead of just giving you an explanation, it uses your answers and thinking to decide what you need next. Teaching builds understanding one reasoning step at a time. Practice makes it usable. A persistent knowledge graph carries it across sessions.
- Measure. Before teaching, the agent finds where your understanding ends on each part the lesson depends on. Your answers, confidence, and thinking show it where to start.
- Plan. It works out a dependency map from that starting point to your goal. You can see the plan, and the lesson adapts when your understanding turns out different.
- Teach. Each step builds on something you already understand. You predict, get an explanation, and check your understanding. Confusions are repaired before anything is built on them. The aim is for the goal to feel obviously true, not merely familiar.
- Practice. Separate sessions pose varied problems that require the right knowledge to come to mind without being named first. Problems and hints adapt to your reasoning.
Think out loud. The thinking fields let you explain your reasoning, uncertainties, and reactions in your own words. This is how the agent gets a detailed picture rather than just a record of right and wrong answers. You can type or use dictation.
The agent can also research questions in the background, create visual explanations, and build interactive demonstrations.
Knowledge that carries forward
What you are taught accumulates as propositions and reasoning chains: individual claims and the premises that lead to them. The graph shows this structure, with links back to the source sessions. You can also import notes.
Future teaching sessions can read the graph instead of starting from scratch. Practice sessions can draw their material from it. It stores the ideas and their connections, not ratings of your ability.
Download from learnharness.ai · GitHub Releases
- macOS (Apple Silicon): signed and notarized DMG. Drag the app to Applications.
- Windows (x64): run the installer. It is currently unsigned; Windows may show an “unknown publisher” or SmartScreen warning.
- Linux (x64): make the AppImage executable and open it, or install the Debian/Ubuntu
.deb.
Add your provider API key and choose your models, then start a session with what you want to understand. LearnHarness supports 30+ provider options, including OpenAI, Anthropic, Google, DeepSeek, and OpenRouter. Optional dictation and web search use separate service keys.
All three platforms support in-app updates.
-
Your keys and models. No LearnHarness subscription or markup. You pay your providers for usage; a live cost meter shows model costs.
-
Local storage. Your chats, graph, settings, and API keys live on your machine. Learning records are plain files you can inspect.
-
External services. Models run through your configured providers. Model requests send the context needed for the task; web research and dictation also contact external services. Local storage does not mean offline processing.
-
Inspectable behavior. System prompts are visible and editable. The app is open source under the AGPL-3.0 license.
npm install npm run dev # http://localhost:3000 npm test # deterministic, no LLM, no network
See the development guide, architecture, and desktop release guide.
Questions, bug reports, and feature requests: GitHub Issues.
The app is free and open forever. If we ever charge for anything, it will be for convenience — managed keys, hosting — never for features you can run locally.

