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

[agent] tools experiment with inspiration from claude-code #6947

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

xingyaoww
Copy link
Collaborator

@xingyaoww xingyaoww commented Feb 25, 2025

  • 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.

Try reproducing sonnet 3.7 result with tools from claude-code (https://github.com/dnakov/claude-code/tree/main).

Main idea is:

  • Add a thinking tool
  • Break our str_replace_editor into two components: (1) read-write part that edits file; (2) read-only part that only read file/folder
  • Add glob/grep tool (read-only)
  • Add an agent delegate action to delegate to a "ReadOnlyCodeAct" for file exploration/localization operations

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:84eeaef-nikolaik   --name openhands-app-84eeaef   docker.all-hands.dev/all-hands-ai/openhands:84eeaef

@xingyaoww
Copy link
Collaborator Author

ha! CodeAct delegate to CodeAct kinda start to work now :)

image

@@ -0,0 +1,30 @@
from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunk

_BASH_DESCRIPTION = """Execute a bash command in the terminal.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I love the split between tools, it makes things more readable! Since we're adding more tools here, it must have become necessary too 😅

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