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

[Bug]: Private microagents are not loaded in docker container #6201

Open
1 task done
rqx opened this issue Jan 10, 2025 · 5 comments
Open
1 task done

[Bug]: Private microagents are not loaded in docker container #6201

rqx opened this issue Jan 10, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@rqx
Copy link

rqx commented Jan 10, 2025

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Describe the bug and reproduction steps

Private microagents are not loaded if app is started with instructions and selected_repository is not specified.
I believe the bug is in get_microagents_from_selected_repo: present working directory is used to load microagents from .openhands/microagents if selected_repository is not specified, but it is /app if run in container.

OpenHands Installation

Docker command in README

OpenHands Version

0.19

Operating System

MacOS

Logs, Errors, Screenshots, and Additional Context

No response

@rqx rqx added the bug Something isn't working label Jan 10, 2025
@amirshawn
Copy link

I've noticed that the microagents don't seem to be functioning at all any more too. I haven't been using the github functionality so what you're saying makes sense.

@xingyaoww
Copy link
Collaborator

Quick question: Do you mount your private repo into the App container following this? If so, maybe the agent would need to load stuff from /opt/workspace_base

https://docs.all-hands.dev/modules/usage/runtimes#connecting-to-your-filesystem

@rqx
Copy link
Author

rqx commented Jan 12, 2025

@xingyaoww I do, I do mount it like this: -e WORKSPACE_MOUNT_PATH=$PWD -v $PWD:/opt/workspace_base, so I can run docker command directly from my private repo.

I just debugged it and checked the logs, and it appeared that repo.md is loaded, but as Knowledge microagend, because I did not specify metadata. Another finding is that get_microagents_from_selected_repo is method of Runtime and it calls self.list_files(str(dir_name)) to check for local repository microagents, so the relative path works well in this case and my initial assumption was wrong.

What do you think about adding metadata to repo.md example in the documentation? So other developers will likely not make my mistake. I can make a PR. Or maybe we should use RepoMicroAgent as default type?

@mamoodi
Copy link
Collaborator

mamoodi commented Jan 12, 2025

I do have a PR to update the documentation. #6155

Would this address the issue?

@rqx
Copy link
Author

rqx commented Jan 13, 2025

I do have a PR to update the documentation. #6155
Would this address the issue?

@mamoodi yes, I think so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants