Skip to main content

Session management for OpenAI Agents SDK using Redis.

Project description

🤖 OpenAI Agents Redis

Python 3.13+ License: MIT Redis OpenAI

Native OpenAI Agents SDK session management implementation using Redis as the persistence layer.

Demo

Demo Video

✨ Features

  • 🧠 Intelligent Agents: Built on OpenAI's powerful Agents SDK
  • Redis Integration: Lightning-fast caching and persistent storage
  • 🔄 Conversation Memory: Maintain context across interactions

🚀 Quick Start

Installation

# Using uv (recommended)
uv add openai-agents-redis

# Using pip
pip install openai-agents-redis

Basic Usage

from agents_redis.session import RedisSession

session = RedisSession(
    session_id=session_id, #Use your own logic to generate a session_id
    redis_url="redis://localhost:6379",
)

# Your code for defining an Agent
# ...

# Starting the runner passing the session

result = Runner.run_streamed(
    starting_agent=current_agent, input=agent_input, context=current_context, session=session
)

Development

Testing Requirements

🐳 Docker
⚡️ uv
🦾 OpenAI Agents SDK (optional)
🔑 OpenAI API Key (optional)

Running Tests

# Run all tests
uv run pytest

# Run with coverage
uv run pytest --cov

📋 Roadmap

  • Storing conversation context
  • Full text search
  • Vector similarity search & Hybrid Search
  • Built-in monitoring dashboard

Made with ❤️ by Rafael

⭐ Star us on GitHub!

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

openai_agents_redis-0.2.0rc1.tar.gz (69.5 kB view details)

Uploaded Source

Built Distribution

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

openai_agents_redis-0.2.0rc1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file openai_agents_redis-0.2.0rc1.tar.gz.

File metadata

File hashes

Hashes for openai_agents_redis-0.2.0rc1.tar.gz
Algorithm Hash digest
SHA256 00681b02f1c8cbf903e8ac9f8586486a9b5a1fbb03c7ddc73009d67f81617053
MD5 6a6a8ffcd857596bfdcb3929a368a7f5
BLAKE2b-256 e15c4e6ccb0de67d80fe8ac726e1a29449c87346d17a7b18f8311953665ca9ba

See more details on using hashes here.

File details

Details for the file openai_agents_redis-0.2.0rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for openai_agents_redis-0.2.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 c29b70d9a763f43807012a5fb0ffe1e0c0238337eee089dfbb6a0f189eac3a14
MD5 fb2330d6f5fc9dc3c7909c885429a16c
BLAKE2b-256 d4a699b6bc411e6556b9d9f229b0526b5dec8656eb88779baa7d8beb093b8a83

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