Skip to content

feat(acp): add ACP methods to support programmatic goose clients#7764

Draft
wpfleger96 wants to merge 1 commit intomainfrom
wpfleger/acp-client
Draft

feat(acp): add ACP methods to support programmatic goose clients#7764
wpfleger96 wants to merge 1 commit intomainfrom
wpfleger/acp-client

Conversation

@wpfleger96
Copy link
Copy Markdown
Collaborator

The ACP protocol was missing several capabilities needed by external clients that talk to a running goose-acp-server over the network.

Previously, clients like the goosed-slackbot had to use the HTTP API (goose-server) because ACP lacked a health check, a way to inject session instructions, and the ability to switch LLM providers at runtime. This closes those gaps.

  • Adds _goose/health returning {"status": "ok"} — for clients that poll at startup before accepting traffic
  • Adds _goose/session/set_instructions — injects a string into the agent's system prompt under the "recipe" key, equivalent to the POST /agent/update_from_session HTTP pattern but taking the final instructions string directly
  • Enhances session/set_model with an optional provider field — when present, switches the full provider+model via the global registry (same pathOST /agent/update_provider`); empty string is treated as absent to avoid confusing registry errors
  • Verifies _goose/session/get already returns token metrics (input_tokens, output_tokens, accumulated_*, model_config) via Session struct serialization; adds a test asserting their presence

The ACP protocol was missing several capabilities needed by external
clients that talk to goosed over the network.

Adds:
- `_goose/health` — startup health check for clients that poll before
  accepting traffic
- `_goose/session/set_instructions` — injects a system prompt into an
  active session under the "recipe" key, replacing the two-call HTTP
  pattern of start_agent + update_from_session
- `session/set_model` now accepts an optional `provider` field for full
  provider+model switching; empty string is filtered out to avoid opaque
  registry lookup errors
- `_goose/session/get` verified to already return token metrics
  (input_tokens, output_tokens, accumulated_*, model_config) via the
  Session struct serialization — confirmed with a new test
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.

2 participants