-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add Sessions for Automatic Conversation History Management #752
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
Merged
rm-openai
merged 60 commits into
openai:main
from
knowsuchagency:feature/session-memory
Jul 10, 2025
Merged
Changes from 53 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
d849c93
Add session memory functionality to the Agents SDK
knowsuchagency 63a786f
Enhance session memory validation in Runner class
knowsuchagency 6aab1e8
Add custom session memory implementation examples to README
knowsuchagency 53d4132
Implement session memory instance reuse in Runner class
knowsuchagency 14600ee
Refactor session memory usage in README and examples
knowsuchagency 54e9dfa
Add session memory documentation and examples
knowsuchagency 5e4f456
Add memory documentation and update references
knowsuchagency 14edb3c
revert changes to Agent. memory is a concern of the runner
knowsuchagency b422736
Enhance SQLiteSessionMemory to support customizable table names for s…
knowsuchagency ad03ae7
Add pop_message functionality to SQLiteSessionMemory
knowsuchagency f0241db
Refactor SQLiteSessionMemory methods to support asynchronous execution
knowsuchagency dcae4c7
Add validation for session_id when memory is disabled in Runner class
knowsuchagency 4af2192
Refactor session memory handling in documentation and examples
knowsuchagency 57b4f5e
Refactor database initialization in SQLiteSessionMemory
knowsuchagency 764e82c
Remove redundant database initialization method in SQLiteSessionMemory
knowsuchagency 1827673
Enhance SQLiteSessionMemory for thread safety and connection management
knowsuchagency 131c5dc
Initialize database schema for file databases in SQLiteSessionMemory
knowsuchagency b810992
Refactor Runner class to improve error handling and input preparation
knowsuchagency 8b827f2
Refactor test_session_memory.py to simplify imports
knowsuchagency 0cf4f88
Refactor session memory implementation to simplify usage and improve …
knowsuchagency b9be6b9
Update session memory documentation and refactor references
knowsuchagency 3a79e38
Update documentation to reflect renaming of Session Memory to Sessions
knowsuchagency 8e9edd8
Update documentation and references for Sessions
knowsuchagency 92f7db5
Enhance session message retrieval functionality
knowsuchagency b5ad785
Update AGENTS.md to include note on executing CLI commands in virtual…
knowsuchagency e26aed1
Update README to reflect changes from "Memory options" to "Session op…
knowsuchagency 51be95c
Add .claude/settings.local.json to .gitignore
knowsuchagency b5c3ad0
Refactor message retrieval parameter from 'amount' to 'count'
knowsuchagency e661e78
Remove original non-parametrized tests from test_session.py for sessi…
knowsuchagency 8a87b3a
Implement validation to prevent simultaneous session and list input i…
knowsuchagency 79173b1
Refactor session management by introducing an abstract base class
knowsuchagency 2363901
Merge upstream/main into feature/session-memory
knowsuchagency 6a9ac9a
Refactor message retrieval parameter from 'count' to 'limit'
knowsuchagency 9523963
Update `get_messages` method to include optional `limit` parameter
knowsuchagency d8ea047
Merge remote-tracking branch 'upstream/main' into feature/session-memory
knowsuchagency fb49cb4
Merge upstream/main into feature/session-memory
knowsuchagency be5fae7
Update test_mcp_tracing.py from upstream/main
knowsuchagency 578a6f4
Merge upstream/main into feature/session-memory
knowsuchagency c6dc1ec
Merge remote-tracking branch 'upstream/main' into feature/session-memory
knowsuchagency e8700b9
Merge upstream/main into feature/session-memory
knowsuchagency 818fa82
Merge branch 'main' into feature/session-memory
knowsuchagency 214fa6f
Merge remote-tracking branch 'upstream/main' into feature/session-memory
knowsuchagency d51696e
Merge branch 'main' into feature/session-memory
knowsuchagency 1813271
Refactor session methods to use 'items' instead of 'messages'
knowsuchagency 36bd4e4
Minimized diff with upstream/main branch in run.py
knowsuchagency b244d70
Refactor AgentRunner methods for consistency and readability
knowsuchagency 94c88da
Merge branch 'main' into feature/session-memory
knowsuchagency d3709b0
Refactor `RunOptions` and `AgentRunner` methods for clarity and consi…
knowsuchagency c495014
Prevent hanging session test and refactor error handling and input pr…
knowsuchagency 44de1e4
Remove unnecessary comment regarding parameter handling in `AgentRunn…
knowsuchagency 496e46d
Enhance `RunOptions` and `AgentRunner` to support additional parameters
knowsuchagency 095fc72
Remove unnecessary asterisk from method signatures in `AgentRunner` f…
knowsuchagency 6abd500
Refactor error handling and input preparation in `AgentRunner` to imp…
knowsuchagency 157ce81
Refactor `SQLiteSession` class for improved readability and maintaina…
knowsuchagency 2fb1b56
Remove `.claude/settings.local.json` from `.gitignore` to clean up ig…
knowsuchagency 4f596b2
move current_span variable declaration back to where it was
knowsuchagency 116a8aa
Refactor SQLiteSession.pop_item() to use atomic DELETE with RETURNING
knowsuchagency c56b390
Merge branch 'main' into feature/session-memory
knowsuchagency a3bb720
fix lint
rm-openai 20de101
fix typechecks
rm-openai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,3 +143,4 @@ cython_debug/ | |
# PyPI configuration file | ||
.pypirc | ||
.aider* | ||
.claude/settings.local.json | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Memory | ||
|
||
::: agents.memory | ||
|
||
options: | ||
members: | ||
- Session | ||
- SQLiteSession |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.