docs: add MongoDB session example under examples/memory#3036
Conversation
Adds an example under examples/memory that showcases MongoDBSession for agent conversation memory. Beyond the basic session loop, the example demonstrates MongoDB-specific strengths: sharing a single AsyncMongoClient across sessions for production connection pooling, multi-tenant collection isolation, aggregation pipelines over stored conversation history, and TTL indexes for automatic expiration.
Use the latest MongoDB image tag in the example startup hint.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4983bd849f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
This PR is stale because it has been open for 10 days with no activity. |
Address PR review feedback: strip advanced demos (multi-tenant, aggregation, TTL) and keep only a minimal example showing the recommended shared AsyncMongoClient pattern with session isolation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
This PR is stale because it has been open for 10 days with no activity. |
|
@seratch anything more for me to do here? |
|
@alexbevi Can you fix the lint error? |
|
@seratch lint error should be cleared (I retriggered the workflow if you can approve) |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Head branch was pushed to by a user without write access
Summary
examples/memory/mongodb_session_example.pyto match the other backend examples in that directory (Redis, SQLAlchemy, Dapr, etc.) forMongoDBSession.AsyncMongoClientacross concurrent sessions, multi-tenant collection isolation, an aggregation pipeline over stored messages, and acreated_atTTL index for auto-expiry.