商业产业 Hacker News Agent 2026-08-20T18:36 正文 ok 545 words

TrueForge:开源 Agent Harness 运行时层

英文标题:🔶 TrueForge – The open-source agent harness

TrueForge 是一个开源 Agent Harness,负责运行 LLM Agent 所需的模型调用、MCP 工具、技能包、沙箱、人工审批、上下文管理与会话状态。它提供聊天 UI、HTTP API、TypeScript SDK 和可嵌入式 UI SDK,并支持本地 SQLite 单进程模式与面向团队的 Postgres + Redis 托管模式。项目兼容 OpenAI、Anthropic、Google Gemini 等模型提供商及 OpenAI 兼容端点,支持远程 MCP、git 驱动的 Skills 和按需启用的代码沙箱。官方基准测试称,在相同任务、工具和模型条件下,TrueForge 相比 Claude Managed Agents 与 deepagents 可实现相同准确率和更低成本。
打开原文相关 5 · 机会 3
media5.7 KB media5.6 KB media553 B media575 B media603 B media629 B media614 B media1.1 KB media1.1 KB media1.1 KB media1.1 KB media2.6 KB media1.8 KB media369.2 KB media5.0 KB media5.0 KB media850.8 KB

中文

TrueForge 标志

开源 Agent Harness——将 LLM 转化为可工作的 Agent 的运行时层

许可证:MIT Node.js >= 22.13 文档 快速开始 SDK

npm @truefoundry/trueforge npm @truefoundry/trueforge-sdk npm @truefoundry/trueforge-ui npm @truefoundry/trueforge-core helm trueforge 询问 DeepWiki

TrueForge 为你运行 Agent 执行循环——模型调用、MCP 工具、技能、沙箱、审批、上下文管理和会话状态——并以三种方式提供:一个聊天 UI、带有 TypeScript SDK 的 HTTP API,以及可嵌入的 UI SDK。

TrueForge 聊天 UI

构建一个 Agent 很容易,但要把它运行好并不容易——你需要流式输出、会话持久化、工具服务器、沙箱、审批机制和 UI。TrueForge 开箱即提供以下能力:

  • 从目录进行初始设置——一次性配置模型、MCP 服务器、技能和沙箱;Agent 可从你已连接的资源中进行选择。预设来自随项目提供、且可自定义的 YAML 目录。
  • 任意模型提供商——支持 OpenAI、Anthropic、Google Gemini 和目录中的其他提供商,也支持任意 OpenAI 兼容端点。
  • MCP 工具——支持采用请求头认证或 OAuth 的远程 MCP 服务器,包括聊天内授权。
  • 技能——由 git 驱动的 SKILL.md 指令包,按需加载到沙箱中。
  • 作为工具的沙箱——隔离的代码/文件执行环境(当前为 Daytona;计划支持更多提供商),仅在需要时创建。密钥始终保留在 Harness 内。
  • 人工检查点——支持工具审批、向用户提问,以及聊天中的生成式 UI。
  • 上下文工程——包括子 Agent、延迟工具加载、Code Mode、大型结果卸载和上下文压缩。
  • 聊天 UI + SDK——可使用内置 UI,通过 @truefoundry/trueforge-sdk 自动化,或嵌入 @truefoundry/trueforge-ui。

它既可小规模运行,也可横向扩展:支持本地模式(单进程、SQLite)和托管模式(Postgres + Redis、Docker Compose 或 Helm)。

运行 TrueForge(本地、Docker Compose 或 Kubernetes),连接模型和工具,并通过快速开始构建第一个可复用 Agent。

如需在此代码仓库中参与 TrueForge 开发,请参阅 CONTRIBUTING.md。

TrueForge 架构:聊天 UI 和 SDK 连接至 TrueForge 服务器 HTTP API 与 Agent 循环;后者连接 SQLite 或 Postgres,以及自带的模型、MCP 服务器和沙箱

模式 最适用场景 存储 额外基础设施 运行方式
本地 个人使用、试用 SQLite 无 npx @truefoundry/trueforge
托管 团队、多副本部署 Postgres Postgres + Redis Docker Compose 或 Helm

**本地模式仅供你的本机使用。**它是试用 TrueForge 的便捷方式,并非生产环境或面向互联网的部署方案。默认没有登录机制,数据保存在本地 SQLite 文件中。请仅在 localhost 上使用它。若将本地模式用于除此之外的场景,我们无法对数据丢失或未授权访问承担责任。如需共享部署或生产部署,请使用托管模式。

章节 内容
简介 Agent Harness 的定义,以及 TrueForge 各组件如何协同工作
快速开始 运行本地或托管模式,构建第一个 Agent
初始设置 模型、MCP、技能、沙箱——目录与覆盖配置
创建 Agent 选择资源;工具审批、提问、生成式 UI
Harness 能力 作为工具的沙箱、子 Agent、延迟工具、Code Mode、压缩
设置登录 用于共享部署的可选 OIDC
基准测试 与 Claude Managed Agents 和 deepagents 的成本/准确率对比
SDK TypeScript 客户端:会话、轮次、事件
聊天 UI 内置 UI 与 @truefoundry/trueforge-ui 嵌入方式
API 参考 OpenAPI 路径与模式

我们在相同任务、工具和模型条件下,将 TrueForge 与 Claude Managed Agents 和 deepagents 进行比较:准确率相同,成本更低。可通过 benchmark/ 复现。详见:基准测试。

我们欢迎贡献——Bug 报告、功能建议和文档修复。请参阅 CONTRIBUTING.md 和我们的行为准则。Fork 提交的 PR 应仅修改源代码;维护者会在合并后重新生成 SDK。

如需报告安全漏洞,请遵循 SECURITY.md,而不要创建公开 Issue。

TrueForge 依据 MIT License 发布。

English / 原文

TrueForge logo

The open-source agent harness - the runtime layer that turns an LLM into a working agent

License: MIT Node.js >= 22.13 Documentation Quickstart SDK

npm @truefoundry/trueforge npm @truefoundry/trueforge-sdk npm @truefoundry/trueforge-ui npm @truefoundry/trueforge-core helm trueforge Ask DeepWiki

TrueForge runs the agent execution loop for you - model calls, MCP tools, skills, sandboxing, approvals, context management, and session state - and exposes it three ways: a chat UI , an HTTP API with a TypeScript SDK , and an embeddable UI SDK.

TrueForge Chat UI

Building an agent is easy. Running one well is not - you need streaming, session persistence, tool servers, sandboxing, approvals, and a UI. TrueForge gives you that out of the box:

  • Initial setup from catalogs - configure models, MCP servers, skills, and a sandbox once; agents pick from what you connected. Presets come from shipped YAML catalogs you can customize.
  • Any model provider - OpenAI, Anthropic, Google Gemini, and other catalog providers, or any OpenAI-compatible endpoint.
  • MCP tools - remote MCP servers with header auth or OAuth, including in-chat authorization.
  • Skills - git-backed SKILL.md instruction packs, loaded on demand in the sandbox.
  • Sandbox as a tool - isolated code/file execution (Daytona today; more providers planned), provisioned only when needed. Secrets stay in the harness.
  • Human checkpoints - tool approval, ask-user-questions, and Generative UI in chat.
  • Context engineering - subagents, deferred tool loading, Code Mode, large-result offloading, and compaction.
  • Chat UI + SDK - use the bundled UI, automate with @truefoundry/trueforge-sdk, or embed @truefoundry/trueforge-ui.

It scales down and up: local mode (one process, SQLite) or hosted mode (Postgres + Redis, Docker Compose or Helm).

Run TrueForge (local, Docker Compose, or Kubernetes), connect a model and tools, and build your first reusable agent in the Quickstart.

To work on TrueForge from this repository, see CONTRIBUTING.md.

TrueForge architecture: Chat UI and SDK connect to the TrueForge server HTTP API and agent loop, which talks to SQLite or Postgres and bring-your-own models, MCP servers, and sandbox

Mode Best for Storage Extra infra How to run
Local Personal use, trying it out SQLite None npx @truefoundry/trueforge
Hosted Teams, multi-replica Postgres Postgres + Redis Docker Compose or Helm

Local mode is for your machine only. It is a convenient way to try TrueForge — not a production or internet-facing setup. There is no login by default, and data lives in a local SQLite file. Please keep it on localhost. We cannot take responsibility for data loss or unauthorized access if local mode is used beyond that. For a shared or production deployment, use hosted mode.

Section What you'll find
Introduction What an agent harness is and how TrueForge fits together
Quickstart Run local or hosted, build your first agent
Initial Setup Models, MCP, skills, sandbox - catalogs and overrides
Create an Agent Select resources; tool approval, questions, Generative UI
Harness Capabilities Sandbox-as-tool, subagents, deferred tools, Code Mode, compaction
Setup Login Optional OIDC for shared deployments
Benchmarking Cost/accuracy vs Claude Managed Agents and deepagents
SDK TypeScript client: sessions, turns, events
Chat UI Bundled UI and embedding @truefoundry/trueforge-ui
API Reference OpenAPI paths and schemas

We compare TrueForge against Claude Managed Agents and deepagents on the same tasks, tools, and model - same accuracy, lower cost. Reproduce it from benchmark/. Write-up: Benchmarking.

We love contributions - bug reports, features, and docs fixes. See CONTRIBUTING.md and our Code of Conduct. Fork PRs should change source only; maintainers regenerate the SDK after merge.

To report a security vulnerability, follow SECURITY.md instead of opening a public issue.

TrueForge is released under the MIT License.