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

Rewrite memory condenser #2021

Closed
wants to merge 143 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
a726111
memory condenser rewrite
enyst May 23, 2024
fc137d5
WIP: Attempting to send events to memory condenser (Claude)
May 23, 2024
5ee91d4
Implement lazy condensing, repeated condensing, and simplify interfac…
enyst May 23, 2024
b6aa0ef
fixed things
enyst May 23, 2024
e9d73b5
Merge branch 'main' into enyst/memories-condenser
enyst May 23, 2024
b26a526
Merge branch 'main' into enyst/memories-condenser
li-boxuan May 24, 2024
ba9d8c3
Merge branch 'main' of github.com:OpenDevin/OpenDevin into enyst/memo…
enyst May 24, 2024
07a76bb
fix flow, adapt logic to event stream
enyst May 24, 2024
e2e4aae
make add_event sync
enyst May 25, 2024
f7e565d
Merge branch 'enyst/memories-condenser' of github.com:OpenDevin/OpenD…
enyst May 25, 2024
e04f1af
implement replace events
enyst May 25, 2024
7807a11
exclude some special actions
enyst May 25, 2024
212e881
raise exception, rename for consistency
enyst May 25, 2024
e38940c
replace the id of the first event in the chunk
enyst May 25, 2024
240b758
adapt short term history
enyst May 25, 2024
8c936a9
tweak history
enyst May 25, 2024
a1ffb29
add usage of config.max_input_tokens
enyst May 25, 2024
c234d82
refactor completion a bit, prepare to move things out of codeact
enyst May 25, 2024
9abe544
handle summarize actions in short term history
enyst May 26, 2024
1681cf9
fix summarize action
enyst May 26, 2024
ade96fd
fix indices
enyst May 26, 2024
3db4940
transition: use state.history as a list[Event]
enyst May 26, 2024
b8312a0
transition to no alternative histories: refactor history to list[Event]
enyst May 26, 2024
677f50b
Merge branch 'main' of github.com:OpenDevin/OpenDevin into enyst/memo…
enyst May 26, 2024
aa01bda
tests for history, and [WIP] brand new bug
enyst May 26, 2024
b7e66f8
Update opendevin/events/stream.py
enyst May 27, 2024
cc0a49b
fix short term history, make tests more detailed
enyst May 27, 2024
a429019
fix tests
enyst May 27, 2024
43d2489
migrate the rest of history tuples, outside controller
enyst May 27, 2024
bec631b
rewrite is_stuck for a list[Event] history
enyst May 27, 2024
e6734c1
fix integration tests, maybe
enyst May 27, 2024
35a982a
fix browsing test
enyst May 27, 2024
dfebdcc
fix browsing test, take two
enyst May 27, 2024
8269d2d
Merge branch 'main' into enyst/memories-condenser
enyst May 31, 2024
317e8df
Merge branch 'main' into enyst/memories-condenser
enyst May 31, 2024
af8338e
use events filtered from the event stream in history
enyst Jun 1, 2024
58e5b74
remove appending to history, start refactoring uses of history as lis…
enyst Jun 1, 2024
57fe4b5
implement user intent, migrate swe agent, migrate a few evals
enyst Jun 2, 2024
a8c3e99
add filter_out_type, remove useless method
enyst Jun 2, 2024
7b2b382
migrate micro-agents history
enyst Jun 2, 2024
cc9db31
fix planner agent, integration test for browsing
enyst Jun 2, 2024
1b35ccb
migrate evals
enyst Jun 2, 2024
d47d2ca
Merge branch 'main' into enyst/memories-condenser
enyst Jun 2, 2024
585f124
test
enyst Jun 2, 2024
bacd546
fix is_stuck tests to work with eventstream
enyst Jun 2, 2024
f97eb0d
fix history tests with eventstream
enyst Jun 2, 2024
2574009
fix test, clean up append()
enyst Jun 2, 2024
1c24d1d
evaluations use dicts, not events, in output
enyst Jun 2, 2024
cdbfa45
fix in-memory store for tests
enyst Jun 2, 2024
a04dce9
integration tests
enyst Jun 2, 2024
ea4a47b
Fix planner agent, delegates start
enyst Jun 2, 2024
d3e0a81
small fix
enyst Jun 2, 2024
16fc7ef
restore short term memory for the session
enyst Jun 3, 2024
83749b8
restore session for 'main'
enyst Jun 3, 2024
ca3dd46
remove iter override from history
enyst Jun 3, 2024
de8214f
Merge branch 'main' into enyst/memories-condenser
enyst Jun 3, 2024
e34b8aa
fix summaries and use them
enyst Jun 3, 2024
db62ae1
add summaries of user messages if large and not likely task
enyst Jun 3, 2024
01fab72
fix token limit
enyst Jun 3, 2024
dd44d12
fix stuck for message actions
enyst Jun 3, 2024
9030a83
fixes/wip
enyst Jun 4, 2024
e6072d1
make python 3.11 happy
enyst Jun 4, 2024
fd41c12
refactor truncate_content a bit; clean up
enyst Jun 5, 2024
71dc8a3
remove summary obs, it doesn't seem to serve a purpose the action doe…
enyst Jun 5, 2024
a7d909c
clean-up; add delegates
enyst Jun 5, 2024
9901ce0
exclude delegate history from its parent
enyst Jun 5, 2024
363ddb9
fix
enyst Jun 5, 2024
016d470
Merge branch 'main' into enyst/memories-condenser
enyst Jun 5, 2024
863f0a9
fix max_input_tokens
enyst Jun 6, 2024
870a184
Merge branch 'main' into enyst/memories-condenser
enyst Jun 6, 2024
f6132b1
fix merges in evals
enyst Jun 6, 2024
9ba50f3
Merge branch 'main' into enyst/memories-condenser
enyst Jun 7, 2024
8fb6641
fix browsing agent
enyst Jun 7, 2024
f28af6b
Merge branch 'main' into enyst/memories-condenser
enyst Jun 7, 2024
93d839d
add doc; fix UI session
enyst Jun 7, 2024
1dbadb9
Update README.md
enyst Jun 7, 2024
e297ee9
Merge branch 'main' into enyst/memories-condenser
enyst Jun 8, 2024
7229916
clean up
enyst Jun 8, 2024
9160f53
restore integration tests from main
enyst Jun 8, 2024
4a6668c
attempt to fix integration tests
enyst Jun 8, 2024
400ee8a
remove likely useless or misplaced config (maybe appropriate for agen…
enyst Jun 8, 2024
cc21e42
Merge branch 'enyst/memories-condenser' of github.com:OpenDevin/OpenD…
enyst Jun 8, 2024
1b5d1d0
fix integration test
enyst Jun 8, 2024
596b75f
Merge branch 'main' of github.com:OpenDevin/OpenDevin into enyst/memo…
enyst Jun 8, 2024
9edc99a
fix lint
enyst Jun 8, 2024
6a401a3
small clean up
enyst Jun 9, 2024
d29ced3
Merge branch 'main' into enyst/memories-condenser
enyst Jun 9, 2024
c1ccd8a
migrate new history code
enyst Jun 9, 2024
4314b0c
rerun integration tests
enyst Jun 9, 2024
55b5437
Merge branch 'main' into enyst/memories-condenser
enyst Jun 9, 2024
0931766
Merge branch 'main' of github.com:OpenDevin/OpenDevin into enyst/memo…
enyst Jun 9, 2024
466a567
Merge branch 'main' into enyst/memories-condenser
enyst Jun 10, 2024
bb28066
small clean up
enyst Jun 10, 2024
ff27916
fix log
enyst Jun 10, 2024
90a3270
Merge branch 'main' into enyst/memories-condenser
SmartManoj Jun 11, 2024
6d0bbd8
backport fix to use summarize prompt
enyst Jun 11, 2024
dfa1dec
Merge branch 'main' into enyst/memories-condenser
enyst Jun 11, 2024
7d7072e
fix input tokens, allow 0 to disable
enyst Jun 13, 2024
38f7840
Merge branch 'main' into enyst/memories-condenser
enyst Jun 13, 2024
1ceb092
summarize more than one message, restory history in __getstate
enyst Jun 15, 2024
31caed8
enumerated loop
SmartManoj Jun 16, 2024
1635395
clean up, document a bit
enyst Jun 17, 2024
399ae59
Merge branch 'enyst/memories-condenser' of github.com:OpenDevin/OpenD…
enyst Jun 17, 2024
8c6b4af
redo is-stuck for 3 same steps
enyst Jun 17, 2024
b996440
Merge branch 'main' into enyst/memories-condenser
enyst Jun 17, 2024
bff7b59
adjust attempts, bump version
enyst Jun 18, 2024
f39c63e
leave LLMOutputError as is, add and handle invalid summary
enyst Jun 18, 2024
a6e824f
Merge branch 'main' into enyst/memories-condenser
enyst Jun 19, 2024
c290a64
Merge branch 'main' into enyst/memories-condenser
neubig Jun 20, 2024
ad7dbb7
Merge branch 'main' into enyst/memories-condenser
neubig Jun 20, 2024
79a38aa
stop clearing the error state
enyst Jun 21, 2024
df8152d
clean up duplicate save
enyst Jun 21, 2024
c65eb16
clean up dead code
enyst Jun 22, 2024
3ed7bed
Merge branch 'main' of github.com:OpenDevin/OpenDevin into enyst/memo…
enyst Jun 25, 2024
e7fe228
test cases for new scenario, changes
enyst Jun 9, 2024
853b3c2
add specific error obs; change 4 to 3 for generic identical act, obs
enyst Jun 9, 2024
8b219cb
refactor stuck check out of controller
enyst Jun 25, 2024
f7374f7
add sessions in cli
enyst Jun 23, 2024
ed4f1ed
fix stuck detector
enyst Jun 25, 2024
b005267
refactor stuck detector
enyst Jun 26, 2024
df00b88
implement almost stuck reminder
enyst Jun 26, 2024
39afe88
TEMPORARY swe-bench
enyst Jun 22, 2024
c040722
reset almost stuck
enyst Jun 26, 2024
a0e6d67
separator from uuid
enyst Jun 26, 2024
8b7eb7f
Revert "TEMPORARY swe-bench"
enyst Jun 26, 2024
23b118e
reset almost stuck reminder
enyst Jun 26, 2024
92997d0
TEMPORARY swe-bench
enyst Jun 22, 2024
33ab1fa
increase attempts
enyst Jun 27, 2024
8ecc6bc
send messages separately, adjust summarize prompt
enyst Jun 27, 2024
b76ebfe
Revert "TEMPORARY swe-bench"
enyst Jun 27, 2024
e2da7fd
TEMPORARY swe-bench
enyst Jun 22, 2024
35c063a
Merge branch 'main' of github.com:OpenDevin/OpenDevin into enyst/memo…
enyst Jun 27, 2024
e5bcfaa
integration tests
enyst Jun 27, 2024
aec0b83
fix previous merge
enyst Jun 27, 2024
8531d3f
fix unit test
enyst Jun 27, 2024
93d0b2a
Revert "TEMPORARY swe-bench"
enyst Jun 27, 2024
6b2678a
integration tests
enyst Jun 27, 2024
13b0ae1
add retries, tweak prompt
enyst Jun 28, 2024
c6c2c2d
Merge branch 'main' of github.com:OpenDevin/OpenDevin into enyst/memo…
enyst Jun 28, 2024
df8963c
TEMPORARY swe-bench
enyst Jun 22, 2024
26891ee
Merge branch 'main' of github.com:OpenDevin/OpenDevin into enyst/memo…
enyst Jun 28, 2024
8e5ca7d
Revert "TEMPORARY swe-bench"
enyst Jun 28, 2024
f8a384f
Merge branch 'main' of github.com:OpenDevin/OpenDevin into enyst/memo…
enyst Jun 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' of github.com:OpenDevin/OpenDevin into enyst/memo…
…ries-condenser
enyst committed May 26, 2024
commit 677f50b7bf49a1447ad43d7b5d6354fb0caa3413
2 changes: 1 addition & 1 deletion opendevin/controller/agent_controller.py
Original file line number Diff line number Diff line change
@@ -250,7 +250,7 @@ async def _step(self):
return

logger.info(action, extra={'msg_type': 'ACTION'})
self.update_state_after_step()
await self.update_state_after_step()
if action.runnable:
self._pending_action = action
else:
3 changes: 0 additions & 3 deletions opendevin/core/main.py
Original file line number Diff line number Diff line change
@@ -94,9 +94,6 @@ async def main(
runtime.init_sandbox_plugins(controller.agent.sandbox_plugins)

event_stream.add_event(MessageAction(content=task), EventSource.USER)
event_stream.add_event(
ChangeAgentStateAction(agent_state=AgentState.RUNNING), EventSource.USER
)

async def on_event(event: Event):
if isinstance(event, AgentStateChangedObservation):
You are viewing a condensed version of this merge commit. You can view the full changes here.