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.

✨ 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.1.0.tar.gz (43.7 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.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file openai_agents_redis-0.1.0.tar.gz.

File metadata

  • Download URL: openai_agents_redis-0.1.0.tar.gz
  • Upload date:
  • Size: 43.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.0

File hashes

Hashes for openai_agents_redis-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c9905fa13d67f1624f89cf6a9c7198cec95160ed31ebbf00bdc54141a80ded80
MD5 258a068b915699c9d6dd1e42cacc3083
BLAKE2b-256 a5b81c1931b1caa199a19e1930cce6de9c913603bb06d58b82f4fa48d5a99c18

See more details on using hashes here.

File details

Details for the file openai_agents_redis-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openai_agents_redis-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05a244255f64f56a413d72b3fa9055657d64cd692adcc6c77e4af0ce1af670d6
MD5 e8db40f7b3de8cff658c4e6138aa3cb6
BLAKE2b-256 8e3e76fd70a620fd920a819e7302bc83b26c5ed9afffcc1b58ff3a8117e574a1

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