Repository navigation
feat(recall): bundled plugin that quotes helpful history into agent turns - #2429
Draft
tlongwell-block wants to merge 3 commits into
Draft
tlongwell-block wants to merge 3 commits into
tlongwell-block wants to merge 3 commits into
Conversation
A plugin that declares `host.turnContext` can register a contributor with `ctx.agents.registerTurnContext`. The host calls contributors only for ordinary mention starts in Claude, Codex and goose (never steers, wakes, titles or compaction) and appends what they return to the user input. Each contributor gets trusted turn facts and leased reads (messages and audience facts as the agent, the owner's memory listing). The lease ends on settlement, stop, unload, connection change or a shared three-second deadline. Failures yield no section; sections are admitted whole, up to 8 KiB each and 16 KiB total. The install review shows the grant. Co-authored-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz> Co-authored-by: Tyler Longwell <tlongwell@squareup.com> Signed-off-by: Tyler Longwell <tlongwell@squareup.com>
`host.networkOrigins: ["*"]` admits any HTTPS server, plus plain HTTP only at parsed loopback IP addresses (127.0.0.0/8 and [::1]). Hostnames such as `localhost` never qualify for HTTP and are not resolved. The wildcard must be the sole entry; URL credentials are refused and redirects stay off. Exact HTTPS origins keep their existing rules. The install review says plainly what this means: the plugin chooses its destinations and can send what it reads to them, including services on this computer. Co-authored-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz> Co-authored-by: Tyler Longwell <tlongwell@squareup.com> Signed-off-by: Tyler Longwell <tlongwell@squareup.com>
…y into agent turns
When one of your agents starts a turn, Recall finds the few past messages
and memories that would help with the request and quotes them into it.
Bundled, off by default.
find relay full-text search as the agent (this channel by default),
the agent's memory scored on-device, and optionally vectors
from an embedding server you run; merged by rank fusion
choose one bounded call to your Decisions provider; only excerpts it
says help survive, and a failure or timeout keeps nothing
pack escaped, attributed one-line excerpts within 2,400 bytes,
framed as other people's words, not instructions
An excerpt appears only where everyone who can read the current chat could
already read its source. Memories appear only in chats between the owner
and the agent unless the owner opts in. Any failure leaves the turn exactly
as it would have been without Recall.
Semantic recall is optional: set an Embedding server URL for any
llama.cpp-compatible /v1/embeddings server. Buzz does not install or run
the model. Dimensions come from the server, a model change clears the
in-RAM index, and an empty URL means keyword-only recall.
`invariants.test.ts` pairs each safety invariant with a control that does
recall something; `mutate.sh` removes each guard in turn and expects the
suite to fail.
Co-authored-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>
Co-authored-by: Tyler Longwell <tlongwell@squareup.com>
Signed-off-by: Tyler Longwell <tlongwell@squareup.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prepared by Eva (Tyler's agent) with the team: Max (live desktop pass), Wren and Quinn (review), Meli (client).
What
Recall (
buzz.recall) is a bundled plugin, off by default. When one of your agents starts a turn, Recall finds the few past messages and memories that would help with the request and quotes them into that turn. If anything goes wrong, the turn goes ahead exactly as it would have without it.buzz://link), at most 2,400 bytes in total, framed as other people's words rather than instructions.Why it is safe to leave on
Commits
feat(agents): turn context. Any plugin that declareshost.turnContextcan register a contributor withctx.agents.registerTurnContext. The host calls contributors only for ordinary mention starts in Claude, Codex and goose, and appends what they return to the user input (never to developer instructions). Sections are admitted whole, at most 8 KiB each and 16 KiB in total. The install review shows the grant. Documented indocs/plugin-architecture.md.feat(plugins): wildcard network origin.host.networkOrigins: ["*"]allows any HTTPS server, plus plain HTTP only to parsed loopback IPs (127.0.0.0/8,[::1]). Hostnames such aslocalhostnever qualify for HTTP and are never resolved. The wildcard must be the only entry. URL credentials are refused and redirects stay off. Exact HTTPS origins are unchanged. The install review states it plainly: "Can send what it reads to servers it chooses, including ones on this computer."feat(recall): the plugin, plus its catalog registration, help text and README.Semantic recall, without Buzz managing a model
Recall talks to any llama.cpp-compatible
/v1/embeddingsserver: an Embedding server URL setting, an optional bearer key, two optional query/document prefixes, and a Test button. Dimensions are read from the server. A change of model clears the in-RAM index. An empty URL means keyword-only recall. Buzz never downloads, installs or starts a model. Servers that require amodelfield (OpenAI, vLLM, Ollama) are not supported yet.Measured with EmbeddingGemma 2 Q8 on llama-server b11669 (M-series Mac), through Recall's shipped client code:
The shipped client matches the independent eval harness exactly, across all 16,528 per-question checks. In a semantic-only control, a message sharing zero keywords with the question still came back first among 48 distractors, and it disappeared once the URL was cleared.
A batch the server answers with any HTTP error (llama-server reports an oversize input as 500, not 400) is skipped, and later batches still index. A broken or absent response stops the snapshot.
Testing
At head
f5f211c7, in a clean tree:tsc --noEmit,biome check --error-on-warnings,cargo fmt --check,cargo clippy --workspace --all-targets -D warnings: clean.cargo test --workspace --locked: 1,199 passed, 0 failed. One test was skipped:window_state::tests::onboarding_snapshot_is_kept_until_next_launch_restoreSIGSEGVs the native lib binary under MockRuntime on local macOS. It does the same onmain, comes from Updated onboarding #2183, and this PR doesn't touch it.navigation.test.tsx,codex-sh.test.tsandProfileAgentIdentity.test.tsx, while the run shared the machine with the cargo suite. None of those files is touched here, and all three pass in isolation (54/54).src/bundled/recall/mutate.sh: 67/67 mutants killed at this head; unmutated and restored suites both pass.Live (agent-run), native desktop build against a fresh local TLS relay with a throwaway identity, at the pre-squash head whose tree this PR reproduces (only comments, docs and the mutation-log path differ):
localhostHTTP URL is rejected before any request is sent.Not yet done: rendered/pointer acceptance of the Settings card. The isolated test window stayed inactive, and Settings stayed at opacity 0. There is also no human test yet and no actual agent-answer pass. That is why this PR is a draft.
Not in this PR
Try it
llama-server --model embeddinggemma-2-Q8_0.gguf --embedding --pooling mean --host 127.0.0.1 --port 8080 --ctx-size 4096 --batch-size 4096 --ubatch-size 4096. Then, in Settings → Plugins → Recall, set the URL tohttp://127.0.0.1:8080, the query prefix totask: search result | query:and the document prefix totitle: none | text:, and press Test. Working looks like "768 dims · N ms".