OpenAI Agents SDK memory: pass session=SQLiteSession(id, db_path) so Runner remembers past turns
@devsingh05▲ 4 net votes
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.