Skip to main content

Redis integration for Microsoft Agent Framework.

Project description

Get Started with Microsoft Agent Framework Redis

Please install this package via pip:

pip install agent-framework-redis --pre

Components

Memory Context Provider

The RedisContextProvider enables persistent context and memory capabilities for your agents, allowing them to remember user preferences and conversation context across sessions and threads.

Basic Usage Examples

Review the set of getting started examples for using the Redis context provider.

Redis History Provider

The RedisHistoryProvider provides persistent conversation storage using Redis Lists, enabling chat history to survive application restarts and support distributed applications.

Key Features

  • Persistent Storage: Messages survive application restarts
  • Thread Isolation: Each conversation thread has its own Redis key
  • Message Limits: Configurable automatic trimming of old messages
  • Serialization Support: Full compatibility with Agent Framework thread serialization
  • Production Ready: Connection pooling, error handling, and performance optimized

Basic Usage Examples

See the complete Redis history provider examples including:

  • User session management
  • Conversation persistence across restarts
  • Session serialization and deserialization
  • Automatic message trimming
  • Error handling patterns

Installing and running Redis

You have 3 options to set-up Redis:

Option A: Local Redis with Docker

docker run --name redis -p 6379:6379 -d redis:8.0.3

Option B: Redis Cloud

Get a free db at https://redis.io/cloud/

Option C: Azure Managed Redis

Here's a quickstart guide to create Azure Managed Redis for as low as $12 monthly: https://learn.microsoft.com/en-us/azure/redis/quickstart-create-managed-redis

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

agent_framework_redis-1.0.0b260402.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

agent_framework_redis-1.0.0b260402-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file agent_framework_redis-1.0.0b260402.tar.gz.

File metadata

  • Download URL: agent_framework_redis-1.0.0b260402.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for agent_framework_redis-1.0.0b260402.tar.gz
Algorithm Hash digest
SHA256 9b842225bceb50186c655a54534e9c68f253bad790792296cd6efd573a42c949
MD5 f8f10bc512dd8e87b608b0b0fd44f522
BLAKE2b-256 c23be91666f267268d6956be636196385fa04952700d532a235744f01141519d

See more details on using hashes here.

File details

Details for the file agent_framework_redis-1.0.0b260402-py3-none-any.whl.

File metadata

  • Download URL: agent_framework_redis-1.0.0b260402-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for agent_framework_redis-1.0.0b260402-py3-none-any.whl
Algorithm Hash digest
SHA256 1e0744fb6c11ba98e57e33c8f33c3e752bf8f4e3dc790b999f1ebc79645835b9
MD5 55e1356a1c98e0daf36ca9e4d5e29c8a
BLAKE2b-256 71b9c93d52d1a05ba02c6a0ee461b363b0b469956a75df0768eed455ebdbc82c

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