-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Simplify microagents + support MCP natively #7547
Comments
I think it would be substantially better to use Model Context Protocol as a standard rather than managing your own. |
Organization-wide microagents are an essential feature for enterprise adoption. +1 to that. |
I'm not entirely convinced we should mix microagents and MCPs. I like the idea of supporting both but I'd delegate the decision to use a MCP to the LLM rather than attach to the microagents syntax. In addition, can't we just refer to the MCP in the microagent content? How do you envision the frontmater processing for this particular field? |
I think
Can you elaborate a bit about this? |
I prefer sending MCPs as "available tools" to the LLM and not tied to any specific microagents. We continue handling the activation of microagents through the existing triggers (always, keyword, or manual). Then, we delegate the decision to use a MCP or not to the LLM instead of attaching it to a specific microagent trigger. Makes sense? |
mcp_location could be attached to a microagent triggered with "always", in which case the tools are always available. Would that work? |
That would be the way to register the MCPs? |
Yes, it would be the microagent for the whole repo, like The advantage of this method is that microagents all come in the same formats, and mcps can either be registered always or only when certain triggers happen. |
Makes sense to me now! This would allows us to use MCPs without microagents (and vice-versa) but also create combinations between both feature for advanced use-cases! |
Hi @neubig, does the above apply to knowledge/ microagents too? The documentation examples on the codebase still use different YAML frontmatter keys of |
I'm thinking about what we can do to support In some cases, this has worked very well to keep Claude Sonnet (and not only) focused, as it went through all of them. |
@neubig : Created a ticket for the org wide feed back that you mentioned. Thinking aloud: Naming and Framing MCP and Task Todo |
+1 to @jasonburt thoughts!
That is a great opportunity for us to find better names for these concepts. IMHO "Microagents" is a very misleading name. First time I read it, I thought OpenHands would start new agent instances to delegate tasks too. 😅 Adding to it, the "Repository-specific microagents" are ambiguous to the "repo.md microagent" which has the
I like the idea of step-by-step tasks and workflows for common tasks. Despite the whole LLM UX be based on natural language, it is super annoying to see the agent do 10 attempts to commit and push. I have not noticed anything in other tools and I know that I would appreciate having the ability to define a checklist that I can trigger in a conversation. |
Summary
There are two issues:
This issue proposes a way to fix this.
Technical Design
Here is a proposal of documentation, and if this looks good we can modify the implementation accordingly.
Micro-agents
A micro-agent is a way that we allow the OpenHands main agent to be customized. The agent can be triggered on-the-fly, giving the main OpenHands agent additional abilities or instructions that it does not have typically.
This doc describes:
Micro-agent Definition
A micro-agent is defined by three aspects:
Micro-agent Trigger Types
Micro-agents are "triggered" by different events, and when the trigger occurs, the micro-agent will be activated. Currently OpenHands supports three varieties of
trigger_type
.Micro-agent Instructions
Micro-agent instructions are an additional prompt that is provided to the agent when the microagent is triggered. They basically provide additional information that modifies the agent behavior in the appropriate way. They are written in English (or whatever other language you work in). You can see examples in the OpenHands micro-agent directory.
Micro-agent Tools
Triggering micro-agents can optionally provide OpenHands with additional tools.
In the case that additional tools are provided, they are specified through MCP.
This is done by providing a location of an MCP server that is used to read in and access the API.
The API information will automatically be provided to the agent, so you do not need to specifically enumerate all of the functions in the API.
For instance, here is an example of a tool that provides access to TODO.
Micro-agent Syntax
All micro-agents use markdown files with YAML frontmatter.
Micro-agent Location
Micro-agents are located in several places:
.openhands/microagents/
directory.The text was updated successfully, but these errors were encountered: