Skip to content
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

[Feat] Custom MicroAgents. #4983

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RajWorking
Copy link
Contributor

Custom MicroAgents can now be added directly to the connected workspace.

End-user friendly description of the problem this fixes or functionality that this introduces
Existing Microagents are only possible when pre-declared in the OpenHands repo. We want users to be able to create their own triggers for their connected repos.

  • [ x] Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

Give a summary of what the PR does, explaining any non-trivial design decisions
In addition to existing microagents, we also setup custom microagents using the same .md format and logic. These can be declared in the ${WORKSPACE_BASE}/.openhands/microagents directory.


Link of any specific issues this addresses
#4924

Comment on lines +107 to +111
custom_microagent_dir=os.path.join(
workspace_base, '.openhands', 'microagents'
)
if workspace_base
else None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately while this probably works pretty well in a dev setup, it won't work very well in most setups :/

The right way to do this is to pull the microagents from the runtime, using the list_files function (you can see it here)

But the tricky thing is that now we need to pass data between the runtime and the agent controller, which don't typically talk to each other...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what you'd want to do is insert a line here:

self._create_controller(

you could pull the microagents from the runtime, then pass them to the AgentController

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately there are several other places (main.go, cli.go, the github resolver which is an external project) that we'd need to do the same plumbing in. But I think we can start with this, and then refactor to get it plumbed in elsewhere

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