All-Hands-AI / OpenHands

🙌 OpenHands: Code Less, Make More
https://all-hands.dev
MIT License
31.41k stars 3.63k forks source link

[Bug]: `AgentDelegateObservation` is format as json for `CodeActAgent` #3969

Open ryanhoangt opened 2 hours ago

ryanhoangt commented 2 hours ago

Is there an existing issue for the same bug?

Describe the bug

From the log below, the observation of BrowsingAgent finishing its task is sent to CodeActAgent as json.

This seems to be because of this line: https://github.com/All-Hands-AI/OpenHands/blob/45066f19dcec21b718e1d5dfb0586ae1c3091a90/agenthub/codeact_agent/codeact_agent.py#L156

Current OpenHands version

0.9.3

Installation and Configuration

`make start-backend`

Model and Agent

Operating System

Linux

Reproduction Steps

  1. make start-backend
  2. On browser type: "go to "All-Hands-AI" github profile and get number of repositories they have"

Logs, Errors, Screenshots, and Additional Context

No response

ryanhoangt commented 2 hours ago

@enyst This might be the reason for your observation last time. I'm not sure if this is expected and simply modifing the observation above is good enough.

tobitege commented 2 hours ago

Hmm why is this a bug? Even before the "Message()" implementation, the observation was converted to a LLM-formatted message format?

Edit: ahh, now see what you mean, there's one step missing to retrieve the content from the dict first.