Skip to content

feature/session memory #1040

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

Closed
wants to merge 59 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
d849c93
Add session memory functionality to the Agents SDK
knowsuchagency May 24, 2025
63a786f
Enhance session memory validation in Runner class
knowsuchagency May 24, 2025
6aab1e8
Add custom session memory implementation examples to README
knowsuchagency May 24, 2025
53d4132
Implement session memory instance reuse in Runner class
knowsuchagency May 24, 2025
14600ee
Refactor session memory usage in README and examples
knowsuchagency May 24, 2025
54e9dfa
Add session memory documentation and examples
knowsuchagency May 24, 2025
5e4f456
Add memory documentation and update references
knowsuchagency May 24, 2025
14edb3c
revert changes to Agent. memory is a concern of the runner
knowsuchagency May 24, 2025
b422736
Enhance SQLiteSessionMemory to support customizable table names for s…
knowsuchagency May 24, 2025
ad03ae7
Add pop_message functionality to SQLiteSessionMemory
knowsuchagency May 24, 2025
f0241db
Refactor SQLiteSessionMemory methods to support asynchronous execution
knowsuchagency May 24, 2025
dcae4c7
Add validation for session_id when memory is disabled in Runner class
knowsuchagency May 24, 2025
4af2192
Refactor session memory handling in documentation and examples
knowsuchagency May 24, 2025
57b4f5e
Refactor database initialization in SQLiteSessionMemory
knowsuchagency May 24, 2025
764e82c
Remove redundant database initialization method in SQLiteSessionMemory
knowsuchagency May 24, 2025
1827673
Enhance SQLiteSessionMemory for thread safety and connection management
knowsuchagency May 24, 2025
131c5dc
Initialize database schema for file databases in SQLiteSessionMemory
knowsuchagency May 24, 2025
b810992
Refactor Runner class to improve error handling and input preparation
knowsuchagency May 24, 2025
8b827f2
Refactor test_session_memory.py to simplify imports
knowsuchagency May 24, 2025
0cf4f88
Refactor session memory implementation to simplify usage and improve …
knowsuchagency May 24, 2025
b9be6b9
Update session memory documentation and refactor references
knowsuchagency May 24, 2025
3a79e38
Update documentation to reflect renaming of Session Memory to Sessions
knowsuchagency May 24, 2025
8e9edd8
Update documentation and references for Sessions
knowsuchagency May 24, 2025
92f7db5
Enhance session message retrieval functionality
knowsuchagency May 24, 2025
b5ad785
Update AGENTS.md to include note on executing CLI commands in virtual…
knowsuchagency May 24, 2025
e26aed1
Update README to reflect changes from "Memory options" to "Session op…
knowsuchagency May 24, 2025
51be95c
Add .claude/settings.local.json to .gitignore
knowsuchagency May 31, 2025
b5c3ad0
Refactor message retrieval parameter from 'amount' to 'count'
knowsuchagency May 31, 2025
e661e78
Remove original non-parametrized tests from test_session.py for sessi…
knowsuchagency May 31, 2025
8a87b3a
Implement validation to prevent simultaneous session and list input i…
knowsuchagency May 31, 2025
79173b1
Refactor session management by introducing an abstract base class
knowsuchagency May 31, 2025
2363901
Merge upstream/main into feature/session-memory
knowsuchagency May 31, 2025
6a9ac9a
Refactor message retrieval parameter from 'count' to 'limit'
knowsuchagency May 31, 2025
9523963
Update `get_messages` method to include optional `limit` parameter
knowsuchagency May 31, 2025
d8ea047
Merge remote-tracking branch 'upstream/main' into feature/session-memory
knowsuchagency Jun 3, 2025
fb49cb4
Merge upstream/main into feature/session-memory
knowsuchagency Jun 3, 2025
be5fae7
Update test_mcp_tracing.py from upstream/main
knowsuchagency Jun 4, 2025
578a6f4
Merge upstream/main into feature/session-memory
knowsuchagency Jun 4, 2025
c6dc1ec
Merge remote-tracking branch 'upstream/main' into feature/session-memory
knowsuchagency Jun 18, 2025
e8700b9
Merge upstream/main into feature/session-memory
knowsuchagency Jun 25, 2025
818fa82
Merge branch 'main' into feature/session-memory
knowsuchagency Jun 26, 2025
214fa6f
Merge remote-tracking branch 'upstream/main' into feature/session-memory
knowsuchagency Jun 27, 2025
d51696e
Merge branch 'main' into feature/session-memory
knowsuchagency Jun 27, 2025
1813271
Refactor session methods to use 'items' instead of 'messages'
knowsuchagency Jun 27, 2025
36bd4e4
Minimized diff with upstream/main branch in run.py
knowsuchagency Jun 27, 2025
b244d70
Refactor AgentRunner methods for consistency and readability
knowsuchagency Jun 27, 2025
94c88da
Merge branch 'main' into feature/session-memory
knowsuchagency Jun 27, 2025
d3709b0
Refactor `RunOptions` and `AgentRunner` methods for clarity and consi…
knowsuchagency Jun 27, 2025
c495014
Prevent hanging session test and refactor error handling and input pr…
knowsuchagency Jun 27, 2025
44de1e4
Remove unnecessary comment regarding parameter handling in `AgentRunn…
knowsuchagency Jun 27, 2025
496e46d
Enhance `RunOptions` and `AgentRunner` to support additional parameters
knowsuchagency Jun 27, 2025
095fc72
Remove unnecessary asterisk from method signatures in `AgentRunner` f…
knowsuchagency Jun 27, 2025
6abd500
Refactor error handling and input preparation in `AgentRunner` to imp…
knowsuchagency Jun 28, 2025
157ce81
Refactor `SQLiteSession` class for improved readability and maintaina…
knowsuchagency Jun 30, 2025
2fb1b56
Remove `.claude/settings.local.json` from `.gitignore` to clean up ig…
knowsuchagency Jun 30, 2025
4f596b2
move current_span variable declaration back to where it was
knowsuchagency Jun 30, 2025
116a8aa
Refactor SQLiteSession.pop_item() to use atomic DELETE with RETURNING
knowsuchagency Jul 1, 2025
db0fd82
fix lint
rm-openai Jul 8, 2025
39c679d
fix typechecks
rm-openai Jul 8, 2025
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
Refactor test_session_memory.py to simplify imports
- Removed unused imports and streamlined the import statements for clarity and maintainability.
- This change enhances the readability of the test file by focusing on the necessary components.
  • Loading branch information
knowsuchagency committed May 24, 2025
commit 8b827f208f10f95c39e87937c7930bd8ffde2287
4 changes: 1 addition & 3 deletions tests/test_session_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

import pytest
import tempfile
import os
from pathlib import Path
import asyncio

from agents import Agent, Runner, RunConfig, SQLiteSessionMemory
from agents.memory import SessionMemory
from agents import Agent, Runner, SQLiteSessionMemory

from .fake_model import FakeModel
from .test_responses import get_text_message
Expand Down