Skip to content
Draft
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions docs/sessions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,13 @@ from agents.extensions.memory import AsyncSQLiteSession
agent = Agent(name="Assistant")
session = AsyncSQLiteSession("user_123", db_path="conversations.db")
result = await Runner.run(agent, "Hello", session=session)
await session.close()
```

Call `close()` when the application is finished with the session. This closes
any opened owned `aiosqlite` connection and makes the session terminal;
subsequent history operations raise `RuntimeError`.

### Redis sessions

Use `RedisSession` for shared session memory across multiple workers or services.
Expand Down