Support Buzz: MCP servers, client system prompts, and agent identity - #28
sarahwooders wants to merge 4 commits into
Conversation
Buzz drives ACP agents through its buzz-acp harness, which passes MCP servers in session/new, may send a per-session system prompt, and reads agentInfo from initialize to identify the adapter. The adapter ignored all three. - session/new and session/load now connect the client's stdio MCP servers and register their tools as Letta external tools, namespaced mcp__<server>__<tool>. A server that cannot start is logged and skipped rather than failing the session; http/sse are skipped with a warning, matching the absent mcpCapabilities. - A client-supplied systemPrompt is delivered as a framed preamble on the session's first prompt, since Letta agents carry their own persona and the SDK has no per-session system prompt. - initialize reports agentInfo (name + package version).
Covers the buzz-acp harness and Buzz Desktop, and which backend to pick: the agent answers Buzz through the `buzz` CLI, so the CLI has to live wherever tools run. local and cloud-oauth inherit the harness env; remote needs the CLI on the app server; cloud runs tools in Letta's sandbox, so Buzz access goes through an MCP server, which the adapter spawns in its own process.
Cloud agents run their harness in Letta's sandbox, which has no executor for tools that live in this process: the editor fs tools and MCP-backed tools both fail there with "External tool executor not set". Log that once at session setup instead of leaving it to a failed tool call mid-turn, and correct the Buzz backend guidance — cloud-oauth is the backend for cloud-hosted agents with local tool execution.
Clients with a model picker read the model-category entry of configOptions from session/new. We published none, so Zed had nothing to show and Buzz reported "letta-acp reported no models" and fell back to a free-text custom-model box. - session/new and session/load now carry a model selector built from session.listModels(), and session/set_config_option switches the model through session.updateModel(). - The catalog is fetched once per process and shared across sessions. session/new waits at most 2s for it: a slow or unsupported catalog must not hold up session creation, and a late arrival is pushed as a config_option_update instead. - Entries are keyed by handle (provider/model), the same identifier LETTA_ACP_MODEL and /model take. Letta lists one entry per reasoning tier and tiers share a handle, so they are collapsed to one option -- as ACP options they would be indistinguishable duplicates. - Each entry also carries the pre-rename `configId`/`displayName` spellings, since buzz-acp's reader requires configId and would otherwise see no options at all.
f0e86df to
7213093
Compare
|
Overlord (agent-c2adbf5c-8419-4211-8cd8-3740db164974) I ran the full suite on
The MCP bridge and |
|
Overlord (agent-c2adbf5c-8419-4211-8cd8-3740db164974) Update after #29 merged: please drop this PR’s MCP implementation when rebasing. #29 now owns this path by forwarding ACP stdio server configuration into The rebase should preserve current That leaves |
|
Superseded — every piece of this landed upstream or turned out to be unnecessary.
Published |
Makes letta-acp usable as a first-class harness for Buzz, whose
buzz-acpharness drives ACP agents over stdio. Companion PR addslettaas a preset runtime in Buzz itself.Buzz passes MCP servers in
session/new, may send a per-session system prompt, and readsagentInfofrominitializeto identify the adapter. We ignored all three.Changes
session/newandsession/loadnow connect the client's stdio MCP servers and register their tools as Letta external tools, namespacedmcp__<server>__<tool>. Tool calls proxy through totools/call; servers shut down with the session. A server that fails to start is logged and skipped rather than failingsession/new; http/sse are skipped with a warning (which is whyinitializestill advertises nomcpCapabilities). Zed benefits from this too, not just Buzz.systemPrompt— a client-supplied system prompt onsession/newis delivered as a framed preamble on the session's first prompt, since Letta agents carry their own persona and the SDK has no per-session system prompt to set.agentInfo—initializereports name + package version.buzz-acp modelsshowedAgent: unknown vunknownbefore; it now showsletta-acp v0.1.4.External tool executor not set. The adapter now warns once at session setup, and the README says which backend to use instead.buzzCLI, so the CLI has to live wherever the chosen backend runs tools.Testing
bun run check(46 tests, typecheck, build). New coverage: the MCP bridge (namespacing, proxying, env pass-through, error results, unreachable server, non-stdio transport) against a fixture stdio MCP server, plusagentInfoand one-shot system-prompt delivery.mcp__mock__echoand got its output back — on thelocal,remote, andcloud-oauthbackends. Oncloudthe call fails as described above, which is where the new warning comes from.buzz-acp models --agent-command bun --agent-args src/index.tsagainst a locally builtbuzz-acp, on thelocal,remote, andcloud-oauthbackends.