Generalize to support any ACP-compatible agent#64
Merged
Conversation
oca-agent
approved these changes
Jul 18, 2026
oca-agent
left a comment
Collaborator
There was a problem hiding this comment.
PR #64 Code Review: Approved! 🚀
I have thoroughly reviewed the changes in PR #64 ("Generalize to support any ACP-compatible agent"), verified the test suite, checked backwards compatibility, and formatted the updated codebase.
Here is a summary of the technical design and validation:
1. Architectural Improvements & Design
-
Generalization of ACP Client (
src/acp_client.py):- Successfully generalized the legacy
GooseACPClientintoACPClient, allowing it to load any ACP-compatible agent defined inagents_config.json. - Safely handles env var forwarding (
forward_env), static environment injections (env), and custom execution arguments. - Correctly maintains backward-compatibility logic for goose-specific CLI flags (
--with-builtin).
- Successfully generalized the legacy
-
Multi-Agent & Command Support (
src/mattermost_bridge.py):- Shifted client tracking from a single string key (
linux_user) to a composite tuple key(linux_user, agent_name)inself.agent_clients. - Added full support for three interactive chat commands:
!agents: Lists all agents fromagents_config.json, highlighting which is currently active in the thread and which is the user's default.!agent <name>: Thread-specific agent switching. It correctly cleans up the active session (cancelling runs, closing MCP sessions) and pre-seeds a fresh session for the next prompt.!agent-default <name>: Persists user-specific agent choices touser_agent_preferences.json.
- Backwards Compatibility (
GooseClientsCompatDict): The introduction of this dict subclass is a highly elegant approach to proxying old single-agent lookups (self.goose_clients[linux_user]) to the new composite mapping, preventing breakage of existing tests and custom scripts.
- Shifted client tracking from a single string key (
2. Validation & Quality Checks
-
Execution & Test Suite:
- Ran the complete test suite. All 145 tests passed cleanly:
============================= 145 passed in 2.64s ============================== - Refactoring of tests (e.g.,
test_goose_acp_client.pytotest_acp_client.py) looks great and thoroughly exercises the new configuration capabilities.
- Ran the complete test suite. All 145 tests passed cleanly:
-
Formatting:
- Standardized the modified Python files using the repository's configuration with
yapf. The formatted code was committed and pushed directly to thegeneralize-acpbranch to ensure standard compliance.
- Standardized the modified Python files using the repository's configuration with
3. Conclusion
The implementation is very clean, well-tested, and robust. Merging this PR will greatly expand the flexibility of goose-mm-bridge to seamlessly support Hermes and other ACP-compatible agents.
Great work! 👏
…entation - Define first-class structured configuration fields for Hermes (HERMES_PROVIDER, HERMES_MODEL, HERMES_INFERENCE_PROVIDER, HERMES_INFERENCE_MODEL, HERMES_YOLO_MODE). - Add new credential forwarding (OPENROUTER_API_KEY, DEEPSEEK_API_KEY, XAI_API_KEY, GEMINI_API_KEY) in both agents_config.json and agents_config.json.example. - Support agent-neutral thinking trace fallback environment variables (THINKING_TRACE, THINKING_TRACE_SIMPLIFIED). - Sync agents_config templates and default agent settings. - Generalize README.md and .env.example to support non-Goose agents natively, documenting the !agents, !agent, and !agent-default commands. - Provide comprehensive guidelines on per-user config overrides for Hermes and specialized developer extension kits.
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.
This PR generalizes the goose-mm-bridge to support any ACP-compatible agent over STDIO (e.g., Goose and Hermes) and introduces chat commands to swap agents per thread and set user defaults.