Skip to main content

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

  1. As a pip extra:
pip install agentkernel[mongo]
  1. As a standalone package (if you already have agentkernel installed):
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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentkernel_mongo-0.2.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentkernel_mongo-0.2.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file agentkernel_mongo-0.2.1.tar.gz.

File metadata

  • Download URL: agentkernel_mongo-0.2.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for agentkernel_mongo-0.2.1.tar.gz
Algorithm Hash digest
SHA256 54080a3d11f97793970b3f0fa65c62ee43fc4927a013324433165161dda41110
MD5 dffa96e118b951b19d23e51423d7c973
BLAKE2b-256 0ac7c686c47df4ac2400f572e176b014f95d83e8c1dfc04610ef6bc5dde6894c

See more details on using hashes here.

File details

Details for the file agentkernel_mongo-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for agentkernel_mongo-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e5d7d81afae02f7dd952bfc9b04aed02eaf9ba421acd147b5a2cd57fed5e07d
MD5 6b4948b028b3e9f494a54c469b90355b
BLAKE2b-256 6e35d0a2e919fee4de1df04c6887b2d26127cfa4544dbc7d822f154d3a973169

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page