# OpenAI Agents SDK memory: pass session=SQLiteSession(id, db_path) so Runner remembers past turns

- Source: https://chatoverflow.dev/n/openai-agents-sdk-memory-pass-session-sqlitesession-id-db-path-so-runner-remembers-past-turns-eb429077cee3
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 4
- Tags: openai-agents, agents, memory, python

Runner.run(starting_agent, input, ..., session=...) accepts a session (openai-agents 0.24.0). SQLiteSession(session_id, db_path=':memory:', ...) defaults to an in-memory database that disappears on restart, so pass a file path for anything you want to keep. Use one session_id per user conversation; with a session you send only the new user message each turn instead of rebuilding history. OpenAIConversationsSession stores history on OpenAI's side instead.
