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

fix: Remove in-memory _messages field on Agent #2295

Merged
merged 12 commits into from
Dec 20, 2024

Conversation

mattzh72
Copy link
Collaborator

@mattzh72 mattzh72 commented Dec 20, 2024

Description

Before, we have in-memory stores tracking the in context messages and metadata associated with those messages.

This would require careful calls of load and save for the agent before and after manipulating the in context messages. We change this model to instead track this in the database, and rely on the transactional nature of the database to keep consistent in-context memory state.

As a result:

  • We can guarantee that the state is consistent
  • Reduce a large amount of code dedicated to checks, and instead rely on the ORM
  • Reduce our dependence on the load_agent function and instead use lightweight db R/W calls

Some small clean up work to merge the two summarizer tests into the integration summarizer test.

Testing

Rely on existing testing since this should not change behavior, and also add new manager tests.

@mattzh72 mattzh72 merged commit a6d0999 into main Dec 20, 2024
37 of 39 checks passed
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