Skip to content

Launch sprout-agent from the desktop GUI#529

Merged
tlongwell-block merged 2 commits into
mainfrom
tlongwell/add-sprout-agent-launcher
May 11, 2026
Merged

Launch sprout-agent from the desktop GUI#529
tlongwell-block merged 2 commits into
mainfrom
tlongwell/add-sprout-agent-launcher

Conversation

@tlongwell-block

Copy link
Copy Markdown
Collaborator

What

Sprout Agent can now be selected as an agent runtime in the desktop app, alongside Goose, Claude Code, and Codex.

Both sprout-agent and sprout-dev-mcp are bundled as sidecars — no separate install required. When a user picks Sprout Agent, the harness automatically wires up sprout-dev-mcp as its MCP server (shell, file editing, ripgrep, tree, sprout CLI, git auth) and enables the _Stop/_PostCompact hook tools.

Why

sprout-agent is our own ACP-native agent. Unlike the external runtimes (goose, claude, codex) which users install separately, sprout-agent ships with the app. It speaks ACP over stdio with zero CLI flags — config is entirely via environment variables — so the integration is minimal.

Bundling sprout-dev-mcp alongside it gives the agent a complete developer toolchain including the sprout CLI for relay interaction, eliminating the need for sprout-mcp-server (which provides relay tools that overlap with what the CLI already covers).

Design

All per-provider config lives in one place: KNOWN_ACP_PROVIDERS in discovery.rs. Two new fields on the registry — mcp_command and mcp_hooks — flow through the existing Rust → Tauri IPC → TypeScript pipeline so the frontend reads the right MCP server directly from the provider object. No string-matching heuristics, no duplicated mappings across the language boundary.

Desktop → sprout-acp (harness)
             ├─ SPROUT_ACP_AGENT_COMMAND = sprout-agent
             ├─ SPROUT_ACP_MCP_COMMAND = sprout-dev-mcp
             ├─ MCP_HOOK_SERVERS = *
             └─ spawns sprout-agent (ACP over stdio)
                  └─ spawns sprout-dev-mcp (MCP tools)

LLM credentials (SPROUT_AGENT_PROVIDER, ANTHROPIC_API_KEY, ANTHROPIC_MODEL) flow through inherited environment — the user sets them in their shell before launching Sprout.

Bundle sprout-agent and sprout-dev-mcp as sidecars alongside the
existing sprout-acp, sprout-mcp-server, and git-credential-nostr.

sprout-agent is ACP-native (no CLI args, config via env vars).
sprout-dev-mcp provides its tools: shell, str_replace, rg, tree,
sprout CLI, and git auth via multicall binary.

Changes:
- Register sprout-agent in KNOWN_ACP_PROVIDERS with mcp_command and
  mcp_hooks fields on KnownAcpProvider (single source of truth)
- Surface mcp_command through AcpProviderInfo → Tauri IPC → TS types
- Set MCP_HOOK_SERVERS=* for sprout-agent via known_acp_provider()
  lookup (handles paths, case, underscores, .exe normalization)
- Bundle both binaries in tauri.conf.json, bundle-sidecars.sh, justfile
- Add KNOWN_AGENT_BINARIES entries for orphan process detection
- Mirror default_agent_args in sprout-acp/config.rs
- Add regression tests for avatar, args, and mcp_hooks wiring
@tlongwell-block

Copy link
Copy Markdown
Collaborator Author
Screenshot 2026-05-11 at 12 33 55 PM

@tlongwell-block tlongwell-block merged commit 22f1e0b into main May 11, 2026
15 checks passed
@tlongwell-block tlongwell-block deleted the tlongwell/add-sprout-agent-launcher branch May 11, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant