All-Hands-AI / OpenHands

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

Memory Management & Context Condense for CodeAct Agent #1748

Open xingyaoww opened 6 months ago

xingyaoww commented 6 months ago

What problem or use case are you trying to solve?

Currently, CodeAct is bounded by the context window of a particular LLM. While this provides simplicity, actual long-range tasks require longer interaction (e.g., even more than 500 turns). So, how to effectively condense the context window is the next major point of improvement.

Describe the UX of the solution you'd like

Maintains a fixed context around 32k (which is good enough for most open-source LLMs), and if context go beyond 32k, condense it back to 32k. We probably need to do it a bit conservative: don't condense unless absolutely needed.

The agent should have a way to access their original memory (e.g., by open some files that contains its past interaction in the sandbox).

Do you have thoughts on the technical implementation?

Describe alternatives you've considered

Additional context

rbren commented 6 months ago

@xingyaoww we moved the memory mgmt stuff into a common folder, so you should be able to get this pretty easily!

github-actions[bot] commented 5 months ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 4 weeks ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.