Closed jezekra1 closed 2 days ago
The removalSelector in Bee agent runner will remove important information from agent memory causing the agent to loop endlessly:
large_file.txt
We should at least let the agent know that a message was removed or provide a summary so that it won't repeat itself
https://github.com/i-am-bee/bee-agent-framework/blob/ad55531ac81a643536a6da739f92be77e0624f21/src/agents/bee/runner.ts#L103
This find compares transformed messages:
find
curMessages[1] { "role": "user", "text": "Message: Hi\n\nThis message was created at 2024-11-18T16:09:49.706Z", "meta": { "createdAt": "2024-11-18T16:09:49.706Z" } }
vs. input.memory.messages[0]
input.memory.messages[0]
{ "role": "user", "text": "Hi", "meta": { "createdAt": "2024-11-18T16:09:49.706Z" } }
If the above is fixed, the removal selector could select the last user prompt if not passed through prompt to agent but through memory content (this is the way how it's done in the API)
prompt
Good catch. Fix has been released in v0.0.41
The removalSelector in Bee agent runner will remove important information from agent memory causing the agent to loop endlessly:
large_file.txt
to read full contentlarge_file.txt
to read full contentWe should at least let the agent know that a message was removed or provide a summary so that it won't repeat itself
Bugs in removal selector
Removal selector does not remove user messages from history
https://github.com/i-am-bee/bee-agent-framework/blob/ad55531ac81a643536a6da739f92be77e0624f21/src/agents/bee/runner.ts#L103
This
find
compares transformed messages:vs.
input.memory.messages[0]
Possible removal of the latest prompt
If the above is fixed, the removal selector could select the last user prompt if not passed through
prompt
to agent but through memory content (this is the way how it's done in the API)