memdoor README

项目的 README,来自 github.com/guregodevo/memdoor。合并为一个 markdown 文件:README.md。

Memdoor

Team Mode: cheap models, frontier results.
The open coding agent in one Go binary. Press Shift+Tab and Go Team Mode. Five Qwen3.8-27B agents beat Fable 5 on LiveCodeBench Hard, every run published. Ollama, llama.cpp, or any key. No account.

Hacker News Apache 2.0 CI Installers Go Platforms

Five Qwen3.8-27B agents beat Fable 5 on LiveCodeBench Hard, as a Memdoor workflow. GVS5H's harness rebuilt with the authors' exact prompts and loop. The first ten problems of their list, five passes each: a mean of 9.8 of 10. The authors' own harness scored 9.6 and Fable 5 in a single call 8.0, the gap the authors measured on these ten (across their full 100: 92.4 and 90.4). All 50 runs are published: every request, reply, program and grader output. The workflow is YAML and names no model. Point it at yours, or at a local one with memdoor connect local (janis, the runtime we recommend; Ollama, llama.cpp, vLLM and LM Studio work too; how to run it on an open-weight model, no key). examples/workflows/team-solve · the result page · the HN thread

Memdoor is a coding agent and workflow runner. Give the agent a task to read files, edit code and run checks. For repeatable work, a workflow coordinates checked steps, parallel tasks and approval gates. Run it with a local model or a provider on your key.

On this machine:

curl -fsSL https://memdoor.ai/install.sh | bash
cd your-project && memdoor             # sets the machine up, then a key, a sign-in or a local model
# no key: memdoor connect local       # janis and an open-weight model on this machine — https://memdoor.ai/docs/open-weight
memdoor cron add --workflow team-backlog "0 2 * * *"   # one open issue a night, a pull request when its Check passed

The install or the first run did not finish: open an Install issue.

On a box reachable by ssh, nothing installed there:

curl -fsSL https://memdoor.ai/install.sh | bash          # here, once
memdoor --gateway ssh://you@box                           # installs memdoor on the box, starts its gateway, opens the window on it
memdoor --gateway ssh://you@box connect openrouter        # your key, kept on the box; every turn there runs on it
memdoor --gateway ssh://you@box run "fix the failing test" # the same box from a script or CI

The window: a task typed, the files read and patched, the tests run, and the receipt line: checked, 2 files changed, tests PASS

Decision model. Jev (TypeSafe) answers a typed question about a turn with a calibrated probability in under half a second. Judged reads: search, file and log reads return what counts. Per-turn toolbox: only the tools the turn needs are sent. Stall detection: a turn that stops making progress ends. 44 paired runs, decisions off and on: 22 of 22 passed each way; a codebase question 54,661 to 14,367 input tokens (−74%); an edit with a test and ten one-file fixes read the same files either way (within ±11%) (docs/features/DECIDE.md).

Workflows, the deterministic harness. Say the steps; the coder writes one YAML per step. mario runs the graph. Independent steps run in parallel. A step is done when its check passes. A gate waits for approval with the diff. A failed run resumes at the failed step. Started by hand, from CI or on local cron (docs/features/WORKFLOWS.md). Workflows, not skills: the write-up. Examples, each run before it was added: examples/workflows/. The nightly grade step, examples/workflows/nightly-rule/steps/grade.yaml:

type: agent
prompt: |
  Today's partition is {{.partition}}.
  Read rules/{{.partition}}.md and grade today's trading rule: assess it
  briefly (clarity, risk profile, plausibility) and write a JSON object
  {"score": <0-100 integer>, "verdict": "<one sentence>"} into
  grades/{{.partition}}.json (create grades/ if needed).
requires:
  - table_pattern: build
target:
  # run by the engine, not by the agent: the grade must exist and be newer than step 1's start stamp
  command: test "grades/{{.partition}}.json" -nt "rules/{{.partition}}.start" && test -s "grades/{{.partition}}.json"
timeout: 10m

The review loop recorded (findings verified by running, a gate, the fixes applied): memdoor.ai/workflows.

In the window

Command What it does
/model The agent's ladder, cheapest rung first. Pin any model of your providers. List prices
/connect Add a provider: OpenRouter, Anthropic, OpenAI, Gemini, DeepSeek, Baseten, Groq, xAI, any OpenAI-compatible endpoint, a company AI gateway. /connect local: janis on this machine or the box, or Ollama, llama.cpp, LM Studio, vLLM; no key. /connect chatgpt: a ChatGPT Plus/Pro plan, no key
/w The project's workflows and runs. /w <name> [the task] runs one (/w team-solve <the task>), enter opens a run's graph, a approves a gate
/usage This month on your key, per model, and what the decision model kept out of the bill
/remote This conversation on your phone: a link and a QR code, the terminal itself, end-to-end encrypted
/remote view A watch-only link: live, no typing, no account, up to 200 viewers. ?live=1 is the terminal alone, for a stream or OBS
/files or ctrl+f The project's files, the ones this conversation read or changed first, each with what happened to it. Enter previews, ctrl+d diffs, ctrl+e opens in $EDITOR, tab puts @path in the prompt
/graph or ctrl+g The turn as a graph: the reads, the edits that depended on them, the runs that depended on the edits, the failing check in red
/mcp MCP servers from a URL, a command or a .mcp.json snippet
/help The rest

Esc interrupts. ctrl+o expands tool frames. Shift+Tab switches the mode, auto or team. ctrl+t sets the reasoning effort. @path mentions a file. MEMDOOR_APPROVE=changes asks before every command and write.

In your editor

memdoor acp serves the coder over the Agent Client Protocol. Zed and JetBrains host it natively. VS Code: an ACP client extension (for example "ACP Client") and one setting:

"acp.agents": { "Memdoor": { "command": "memdoor", "args": ["acp"] } }

A session is a conversation on the local gateway. A prompt is a turn in the editor's workspace folder. Text, tool calls and approvals show as the editor's own. Steps: memdoor.ai/docs/editor.

From a script

memdoor run "make the retry wait configurable and add a test"     # a headless turn, no window
git diff | memdoor run --stdin "review this diff; one line per finding"    # --stdin: stdin is the input
memdoor run --json "fix the failing test" | jq 'select(.event=="done")'
memdoor workflow run release --wait                                 # progress on stderr, results on stdout
memdoor remote --last                                               # the link /remote gives, on stdout; the gateway holds the run for your phone
memdoor remote --view --last                                        # the watch-only link: an audience, or a pair of eyes

Exit code: 0 checked, 2 unverified or a failing check, 3 a question nobody answered (--yes answers it), 1 an error, 130 interrupted. The gateway starts if none is running. memdoor resume opens any run. Headless, then attached.

In GitHub Actions

One step. Your key as the secret. Nothing added to the repo (Marketplace):

on: pull_request
jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: guregodevo/memdoor-action@v1
        with:
          workflow: pr-review
          openrouter-api-key: ${{ secrets.OPEN_ROUTER_API_KEY }}

Built in:

local-model: Qwen3-8B-4bit in place of the key: the model runs inside the runner (janis, one file, cached), one call. On a free runner: an obvious and a subtle bug found in about a minute each; a correct change can be flagged as a blocker. A first pass.

workflow: <name> runs yours from .memdoor/workflows/<name>/. Exit code: 0 done, 2 failed, 1 stopped, 3 stopped at an approval gate. The job summary holds the review, the fix or the notes. Trigger on pull_request, never pull_request_target: a fork's pull request gets no secrets.

Keys and models

A provider key in the environment (OPENROUTER_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, …) or memdoor connect. No key: the first memdoor signs in with OpenRouter in the browser, from this machine, over ssh or on a box. No credit: a free model, 50 requests a day; its hosts train on what they are sent. For a trial, not private code.

Local: memdoor connect local installs janis, the runtime we recommend, or connects a running Ollama, llama.cpp or LM Studio. Nothing leaves it. janis: one Go server, open models on a Mac's GPU through MLX or an NVIDIA box through CUDA, serves chat and the decision model, no key; Qwen3-Coder-30B-A3B on a $0.71-an-hour Google L4. On a box: memdoor --gateway ssh://you@box connect local. Peers: memdoor peers add box http://box:18789 --dir ~/app names the box; @box:coder … in any conversation runs the turn there and returns the answer.

Where your data goes

Files, sessions and commands stay on your machine. What the model reads goes to the provider. OpenRouter: every request carries data_collection: deny; hosts that train on paid inputs are kept out of the ladders. Exception: a :free model, pinned or answering for an account with no credit; its hosts train on what they are sent, the request says so (allow), Memdoor warns at the pin or at connect. Vendor key or company gateway: nothing else is contacted. docs/SECURITY.md lists the hosts the binary can name; a test fails the build on a new one.

Install from a GitHub release

Every release on GitHub carries the binaries and SHA256SUMS. To install from there instead of memdoor.ai, or from a fork that publishes its own:

curl -fsSL https://github.com/guregodevo/memdoor/raw/main/scripts/install.sh \
  | MEMDOOR_INSTALL_SOURCE=github bash
# a fork, a fixed release: MEMDOOR_GITHUB_REPOSITORY=owner/repo MEMDOOR_GITHUB_RELEASE=v1.2.3

Keep MEMDOOR_INSTALL_SOURCE=github in the environment and memdoor upgrade reads the same source.

Build from source

Go 1.25:

git clone https://github.com/guregodevo/memdoor && cd memdoor
make install                           # builds ./memdoor, then installs it as install.sh does

Documentation

Repository layout

cmd/cli/       the CLI (cobra): tui, model, workflow, cron, account, …
gateway/       the local gateway: agent runtime, tools, providers, workflows
pkg/           the domain: decision, metering, plan, workflow (the mario task factory), …
web/           the memdoor.ai site and the served docs (React, Vite)
scripts/       install.sh, install.ps1, deploy.sh
docs/          features, reference, ADRs
examples/      workflows built by the coder and run, to copy into a project

License

Apache License 2.0: LICENSE, NOTICE. Public repository: github.com/guregodevo/memdoor. Issues go there.

memdoor (guregodevo/memdoor)

正在搜索数据库…

这是什么?Memdoor 是一款编码与自动化智能体,以单个 CLI 二进制文件形式发布,内置确定性的多智能体框架用于运行 YAML 工作流,并带有一个内置的决策模型,可在每一轮对话中精简发送给 LLM 的内容。
这只是一个终端 CLI,还是也能接入我的编辑器?它主要是一个带有自己终端界面的单个 CLI 二进制文件,但它也通过 Agent Client Protocol 原生支持 Zed 和 JetBrains 中的编码器,并可通过 ACP 客户端扩展在 VS Code 中使用;也可以在脚本、cron 或 CI 中以无界面方式驱动。
我该如何安装和运行它?用 Go 1.25 从源代码构建它;生成的二进制文件会启动自己的网关,既可以在你自己的机器上运行,也可以通过 SSH 连接远程主机运行(memdoor --gateway ssh://you@box)。
我需要模型提供商的 API 密钥吗?你需要在环境变量中配置某个提供商的密钥,例如 OpenRouter、Anthropic、OpenAI、Gemini、DeepSeek、Baseten、Groq 或 xAI(或任何兼容 OpenAI 的端点);或者你可以运行 memdoor connect local,使用 Ollama、llama.cpp 或 LM Studio,完全不需要密钥。
有没有免费、无需密钥的选项?它有什么不足?有——在浏览器中通过 OpenRouter 登录后,你可以免费使用一个模型,但每天最多 50 次请求;不过该提供商会用你发送的任何内容进行训练,因此适合试用,不适合处理私有代码。
文档中提到的决策模型 Jev 是什么?Jev 是 Memdoor 的一个小型类型化分类器,它在不到半秒内回答关于每一轮对话的校准概率问题,从而决定发送哪些工具和文件;成对测试显示,在一个代码库问题上,它将输入 token 减少了约 74%,且通过率没有变化。
Memdoor 工作流是什么?它与普通提示有何不同?工作流是一个由多个步骤组成的 YAML 图:编码器负责编写每个步骤,彼此独立的步骤并行运行,只有检查通过后,步骤才算完成;关卡会暂停并附带差异对比,等待人工批准;失败的运行会从出错的步骤处恢复——它不只是基于对话的技能。
janis 是什么?Janis 是 Memdoor 自research的单文件 Go 服务器,它通过 MLX 在 Mac 的 GPU 上,或在 Nvidia 设备上通过 CUDA,在本地提供开源权重模型,因此你无需任何 API 密钥即可运行 Qwen3-Coder-30B 之类的模型。
多智能体框架实际上展示了什么?在一项已发布的基准测试中,五个 Qwen3.8-27B 智能体作为 Memdoor 工作流运行,在 LiveCodeBench Hard 的前十个问题上取得了 9.8 分(满分 10 分)的平均分,超过了原始 9.6 分的框架得分,以及单次调用大型模型 8.0 分的成绩;所有请求、回复和评分器输出均已公开。
大小
9.4 MB
星标
409
时长
1个月
提交 · 90 天