AS

aleksandrgradoboev-svg/bismarck-engine

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

0 stars 0 forks 质量 64 趋势 20MIT

Bismarck 的代理引擎:Pi(earendil-works/pi)的 Go 移植版——统一的 LLM API、代理循环、编码工具、MCP、codemode 和 tool_search——嵌入为库,无Node.js运行时。

概览

代理引擎:Pi(Mario Zechner,麻省理工学院)的 Go 实现——pi 的统一 LLM API、代理循环和编码代理,以及 pi 对 MCP 和代理的扩展——嵌入为库,无Node.js运行时。 - 代码始于2026-10-15,来自sky-valley/pi,pi是pi(MIT)的Go移植版,提交编号为1067024e7cce0028602e638bbf6676c6d2883cda(pi 0.99.2,pi源代码5806068c2);其版权属于许可证。直到v0.1.0的历史被压缩到一个提交中;docs/UPSTREAM.md记录了基础和同步账本。- 这是一个独立项目,不是分支。新的pi提交会直接移植到这里;Sky-Valley移植在维护期间是参考,绝非依赖。- 范围从pi追踪:agent(pi-agent-core)、ai(core和兼容OpenAI的provider)、编码(sessions、tools、compaction)以及pi为MCP和代理开发的扩展。- pi 于 2026-10-12(7472cda0)移除了服务器、客户端和协议包;这里的 Go 版本不再有上游。

概述(AI 翻译)

俾斯麦的代理引擎:Pi的Go实现 (Mario Zechner,麻省理工学院)——pi 的统一 LLM API、代理循环和编码代理,Pi 的扩展包括 MCP 和代理——嵌入为库,无Node.js运行时。

为什么

  • 你Go程序中的代理。 一个go get,旁边没有Node.js进程,也没有外部进程 工作流服务器:代理循环、提供者、编码工具和MCP都是你导入的包。
  • 重启后存活的代理(durable,实验性)。对话、任务和工具调用 提交到内存、JSONL或SQLite存储(无cgo);崩溃后,线束恢复 在该位置停止。只有当工具被标记为安全可重放时,才会被重试。 其他报告则显示“中断且可能部分运行”——机车无法猜测。
  • MCP 和代码模式。 来自共享 mcp.json 的 MCP 服务器,以及一个 QuickJS 沙盒,其中 model 编写调用工具的 JavaScript。
  • pi 作为引用。 行为逐提交 pi 提交,差异被写下来,且 每次对新机制的测试都通过关闭该机制来检查(参见 CONTRIBUTING.md)。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

bismarck-engine

The agent engine of Bismarck: a Go implementation of pi (Mario Zechner, MIT) — pi’s unified LLM API, agent loop and coding agent, with pi’s extensions for MCP and agents — embedded as a library, with no Node.js runtime.

Why

  • An agent inside your Go program. One go get, no Node.js process beside it, no external workflow server: the agent loop, the providers, the coding tools and MCP are packages you import.
  • Agents that survive a restart (durable, experimental). Conversations, tasks and tool calls are committed to memory, JSONL or SQLite storage (no cgo); after a crash the harness resumes where it stopped. A tool interrupted mid-call is retried only if it is marked safe to replay, and otherwise reported as “interrupted and may have partially run” — the engine does not guess.
  • MCP and code mode. MCP servers from a shared mcp.json, and a QuickJS sandbox in which the model writes JavaScript that calls the tools.
  • pi as the reference. Behaviour follows pi commit by commit, differences are written down, and every test of a new mechanism is checked by turning the mechanism off (see CONTRIBUTING.md).

Contributions, test runs on your platform and bug reports are welcome — start with CONTRIBUTING.md or an issue labelled good first issue.

Origin

  • The code started on 2026-10-15 from sky-valley/pi, a Go port of pi (MIT), at commit 1067024e7cce0028602e638bbf6676c6d2883cda (pi 0.99.2, pi source 5806068c2); its copyright stands in LICENSE. The history up to v0.1.0 is squashed into one commit; docs/UPSTREAM.md records the base and the sync ledger.
  • This is an independent project, not a fork. The source of changes is pi itself. New pi commits are ported here directly; the sky-valley port is a reference while it is maintained, never a dependency.
  • Scope tracked from pi: agent (pi-agent-core), ai (core and the OpenAI-compatible provider), coding (sessions, tools, compaction), and pi’s extensions for MCP and agents.
  • pi removed its server, client and protocol packages on 2026-10-12 (7472cda0); the Go versions here no longer have an upstream.
  • Each sync is planned in docs/sync-.md; commits that port pi say so: port(area): … (upstream ).

Layout

Package Mirrors (pi) What it is
ai @earendil-works/pi-ai Unified LLM API: message/content/tool/model types, the channel-based EventStream, JSON-Schema tool validation, model catalog and cost, provider registry.
ai/providers pi-ai providers Providers over net/http SSE: faux (deterministic test double), Anthropic Messages, OpenAI Chat Completions, OpenAI Responses, Google Gemini.
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →