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 со своим терминальным интерфейсом. Но он также нативно подключает кодера в Zed и JetBrains, а в VS Code работает через расширение ACP-клиента по протоколу Agent Client Protocol. Кроме того, его можно запускать без интерфейса из скриптов, 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. За полсекунды он отвечает на вопрос о калиброванной вероятности по каждому шагу и решает, какие инструменты и файлы отправлять. В парных тестах он сократил входные токены примерно на 74% в вопросе по кодовой базе, и при этом доля успешных ответов не снизилась.
Что такое воркфлоу Memdoor и чем они отличаются от обычных промптов?Воркфлоу — это граф шагов в YAML. Кодер пишет каждый шаг, независимые шаги выполняются параллельно, а шаг считается выполненным только после прохождения проверки. Контрольные точки приостанавливают работу для одобрения человеком с показом диффа, а упавший запуск продолжается с места сбоя. Это не просто навык в чате.
Что такое janis?Janis — это собственный однофайловый сервер Memdoor на Go. Он локально запускает открытые модели с открытыми весами через MLX на GPU Mac или через CUDA на Nvidia, так что можно гонять что-то вроде Qwen3-Coder-30B без какого-либо API-ключа.
Что на самом деле демонстрирует многоагентная обвязка?В опубликованном бенчмарке пять агентов Qwen3.8-27B, запущенных как воркфлоу Memdoor, набрали в среднем 9,8 из 10 на первых десяти задачах LiveCodeBench Hard. Это выше исходного результата обвязки (9,6) и результата одного вызова крупной модели (8,0). Каждый запрос, ответ и вывод оценщика опубликованы.
Какие есть похожие проекты?Codewhale, casbin-gateway, Baize, aichat, qwen-code, dscode, foreman, fractal
Автор
guregodevo
Размер
9.4 MB
Звёзды
409
Возраст
1 мес
Коммиты · 90 дней