-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
refactor: restructure microagents system #5886
Conversation
- Move microagents to root level directory - Convert existing agents to YAML format - Add support for repository and keyword triggers - Add template-based workflow support - Remove old micro directory
- Add MicroAgentHub for centralized agent management - Support repository and keyword triggers - Add template-based agent support - Update base.py to use new system
- Add tests for knowledge agent validation - Add tests for template agent validation - Add tests for agent loading and matching - Add tests for template processing
- Keep legacy microagent test - Add environment variable testing to new agents - Add comprehensive tests for new microagent system - Move all tests to tests/unit
- Remove repo/ directory (should be in individual repos) - Move keyword agents to knowledge/ directly - Update documentation to reflect new structure
- Remove official/community split - Rename templates to tasks - Move all agents to top-level categories - Update documentation
- Convert all YAML files to markdown with frontmatter - Improve readability with better formatting - Keep YAML metadata in frontmatter - Add better examples and documentation
- Update format guidelines to show markdown with frontmatter - Add better examples for both agent types - Show recommended structure for content
- Add markdown parsing with YAML frontmatter - Update models to handle markdown content - Rename template to task for clarity - Add better input validation - Update tests for new format
- Use os.walk() to recursively find microagent files in subdirectories - Update CodeActAgent to use correct microagents path - Fix prompt caching tests to work with new structure
microagents/README.md
Outdated
└── repo.md # Repository-specific instructions | ||
``` | ||
|
||
## 2. Shareable Microagents (Public) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that these should be mentioned first, since they are common to all users.
- Remove config.use_microagents = False from test fixture - Tests now run with microagents enabled, matching real-world usage
- Add brief intro explaining what microagents are - Reorder sections to mention shareable microagents first - Remove vague testing section
f3fa573
to
d633578
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, @xingyaoww could you double-check for final approval and merge if everything looks good?
I think the UI related stuff can be handled in a future PR FWIW. And microagents being enabled by default is true in main now right? |
yep! I'll make sure our existing capability of micro-agent is intact and call it off for this PR.
yep! I'll send off another PR to disable it by default and only enable it for UI |
@neubig Actually i think this is probably ready for another look (I got failing tests passed locally) and this is working in UI as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks great to me! Just a few small comments.
Co-authored-by: Graham Neubig <[email protected]>
Co-authored-by: Graham Neubig <[email protected]>
Co-authored-by: Graham Neubig <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for this!
Co-authored-by: openhands <[email protected]> Co-authored-by: Graham Neubig <[email protected]>
This PR restructures the microagents system to provide a clearer separation between repository-specific instructions and shareable microagents.
Key Changes
Two Sources for Instructions
.openhands/microagents/repo.md
in each repositoryOpenHands/microagents/
Simplified Hub Structure
Documentation
Code Changes
Migration Notes
.openhands/microagents/repo.md
in each repositoryPart of #5538 and #5826
To run this PR locally, use the following command: