MongoDB Session Store extension for Agent Kernel
Project description
AgentKernel MongoDB Session Store
agentkernel-mongo is an extension package for the agentkernel framework. It provides a persistent, scalable, and production-ready session store using MongoDB as the backend.
When installed, this package automatically registers itself with the agentkernel framework, allowing you to switch session storage from the default in_memory or redis to mongodb with a simple configuration change.
This package uses MongoDB's native TTL (Time-To-Live) indexing feature to automatically purge stale sessions, ensuring your database remains clean and efficient.
Installation
- As a
pipextra:
pip install agentkernel[mongo]
- As a standalone package (if you already have
agentkernelinstalled):
pip install agentkernel-mongo
This will automatically install the package and its required dependencies, pymongo.
Configuration
This package is designed to work seamlessly with agentkernel's configuration system.
Once installed, you can enable the MongoDB session store by modifying your config.yaml (or equivalent configuration file) for your agentkernel application.
Example config.yaml
# ... other agentkernel configurations ...
session:
# 1. Set the type to 'mongo'
type: mongo
# 2. Add the 'mongo' configuration block
mongo:
url: "mongodb://localhost:27017/"
database: "agent_sessions"
collection: "sessions"
ttl: 604800 # Session TTL in seconds (default: 7 days)
# ... other configurations ...
License
This package is licensed under the MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentkernel_mongo-0.2.2.tar.gz.
File metadata
- Download URL: agentkernel_mongo-0.2.2.tar.gz
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90c52fe5f324c6ea6049886d964248e70f4115d3220b5eb0eb87987774a7a27f
|
|
| MD5 |
1bccc90c2a95e3b0422786b7acd5755e
|
|
| BLAKE2b-256 |
3dd30e99b8e5752f16e180b52ceaed601223916898232ed0bbbb8451f572802c
|
File details
Details for the file agentkernel_mongo-0.2.2-py3-none-any.whl.
File metadata
- Download URL: agentkernel_mongo-0.2.2-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1205f4828f39080ea6f53d9c4988f7c520a0ee0023f3f5f5b2d8c719d7f3bf9b
|
|
| MD5 |
920fb057c05e12d9de0f54b68afccffc
|
|
| BLAKE2b-256 |
bcc4ddf8ac852c17bd9a6e4fa2421e55f22489d62d403fec3ccc157ae8969761
|