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.1.2.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.1.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentkernel_mongo-0.1.2.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.1.2.tar.gz
Algorithm Hash digest
SHA256 0a1bd197ee65270e203449cbeb1395e398a7d68fa7362ddb8b6e10ad60ef3dd2
MD5 8e52bf2914af620c5d6dc82b031eaccd
BLAKE2b-256 19dff659adb8cfc56d8618e7154dcc46a12f7a94091127e53ec34229b63eea9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agentkernel_mongo-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c6951d04974295588da2bae60d2a7b86d755c4777337392ee348c0bc1c8bb51e
MD5 06c8d3ef633ad84243c2974ac822abbb
BLAKE2b-256 8246c66fa8f3aa5b8cddd42f0ddcb598417ccf45cc83d63119016daa24cbb16e

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