OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

remove old microagents

Open rbren opened this issue 10 months ago • 16 comments

  • [ ] This change is worth documenting at https://docs.all-hands.dev/
  • [ ] Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

End-user friendly description of the problem this fixes or functionality that this introduces.


Give a summary of what the PR does, explaining any non-trivial design decisions.


Link of any specific issues this addresses.


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:5e4acdf-nikolaik   --name openhands-app-5e4acdf   docker.all-hands.dev/all-hands-ai/openhands:5e4acdf

rbren avatar Feb 26 '25 14:02 rbren

Hmm interesting...do you think people are relying on this functionality?

Are they writing python? templates? markdown?

rbren avatar Feb 26 '25 15:02 rbren

@openhands please fix the lint errors

rbren avatar Feb 26 '25 15:02 rbren

I'm working on a fix! @rbren can track my progress at all-hands.dev

openhands-ai[bot] avatar Feb 26 '25 15:02 openhands-ai[bot]

I'm not sure, but I should know how to find a relatively recent issue on this..., there it is:

  • https://github.com/All-Hands-AI/OpenHands/issues/6162

@diwu-sf I would love to know your take on this.

enyst avatar Feb 26 '25 15:02 enyst

Let's try again. @OpenHands please fix the lint errors

rbren avatar Feb 26 '25 16:02 rbren

@OpenHands please fix the lint errors

rbren avatar Feb 26 '25 16:02 rbren

@OpenHands stop being lazy 😛

rbren avatar Feb 26 '25 16:02 rbren

@openhands-exp please fix this lint issue

malhotra5 avatar Feb 26 '25 18:02 malhotra5

I'm working on a fix! @malhotra5 can track my progress at all-hands.dev

openhands-ai[bot] avatar Feb 26 '25 18:02 openhands-ai[bot]

@openhands please fix the lint issues

malhotra5 avatar Feb 26 '25 18:02 malhotra5

I'm working on a fix! @malhotra5 can track my progress at all-hands.dev

openhands-ai[bot] avatar Feb 26 '25 18:02 openhands-ai[bot]

@rbren is this just a matter of fixing the lint issues?

mamoodi avatar Mar 10 '25 16:03 mamoodi

@openhands the lint github action and unit test github action are failing. Please look at those actions and find the commands to run. Run them, verify the failures, fix them, and push a new commit once you have fixes in place

rbren avatar Mar 11 '25 19:03 rbren

Openhands is working, @rbren can track my progress at all-hands.dev

openhands-ai[bot] avatar Mar 11 '25 19:03 openhands-ai[bot]

@mamoodi yeah it's just a matter of the tests

rbren avatar Mar 11 '25 19:03 rbren

I have fixed the failing lint and unit tests:

  1. Fixed the lint error by removing an unused import in openhands/agenthub/__init__.py
  2. Fixed the import in openhands/core/setup.py to use the correct Agent import
  3. Removed the test files that were dependent on the micro module (tests/unit/test_micro_agents.py and tests/unit/test_response_parsing.py)
  4. Fixed the test_iteration_limit.py test by adding a config attribute to the DummyLLM class

All tests are now passing locally.

rbren avatar Mar 11 '25 19:03 rbren

@openhands fix this error

tests/runtime/test_stress_remote_runtime.py:36: in <module>
    from openhands.agenthub import Agent
E   ImportError: cannot import name 'Agent' from 'openhands.agenthub' (/home/runner/work/OpenHands/OpenHands/openhands/agenthub/__init__.py)

rbren avatar Mar 12 '25 16:03 rbren

Openhands is working, @rbren can track my progress at all-hands.dev

openhands-ai[bot] avatar Mar 12 '25 16:03 openhands-ai[bot]

I have fixed the import error by adding the Agent class export in openhands/agenthub/__init__.py. The Agent class was defined in openhands/controller/agent.py but was not being exported through the agenthub module. The fix adds the import and includes it in the __all__ list.

rbren avatar Mar 12 '25 16:03 rbren

@openhands fix the merge conflicts

rbren avatar Mar 12 '25 17:03 rbren

Openhands is working, @rbren can track my progress at all-hands.dev

openhands-ai[bot] avatar Mar 12 '25 17:03 openhands-ai[bot]

I have resolved the merge conflicts by removing the tests/unit/test_micro_agents.py file, which aligns with the PR goal of removing old microagents. The file was deleted in our branch but modified in the main branch, so I chose to keep our deletion as that is the intended change for this PR.

rbren avatar Mar 12 '25 17:03 rbren

@openhands please fix the lint issues

rbren avatar Mar 12 '25 17:03 rbren

Openhands is working, @rbren can track my progress at all-hands.dev

openhands-ai[bot] avatar Mar 12 '25 17:03 openhands-ai[bot]

I have fixed the lint issues. The following changes were made:

  1. Fixed trailing whitespace and end-of-file issues in microagents/knowledge/swift-linux.md
  2. Fixed import ordering in openhands/agenthub/__init__.py
  3. Improved code formatting in openhands/events/serialization/event.py by breaking long lines and formatting lists

All pre-commit checks are now passing.

rbren avatar Mar 12 '25 17:03 rbren