This project demonstrates how to integrate openai-agents-redis using Docker containers.
More details about openai-agents-redis can be found in its repo.
To run the project, follow these steps:
- Start Redis and RedisInsight using Docker Compose:
docker compose up
- Build the CLI container:
docker build -t openai-agents-cli . - Run the CLI container in interactive mode, ensuring it uses the same Docker network as the other containers (e.g.,
openai-agents-redis-example_agent-net):docker run -it \ --network openai-agents-redis-example_agent-net \ -e AZURE_OPENAI_ENDPOINT="..." \ -e AZURE_OPENAI_API_VERSION="..." \ -e AZURE_OPENAI_DEPLOYMENT="..." \ -e AZURE_OPENAI_KEY="..." \ openai-agents-cli
The docker-compose.yml file includes services for the OpenAI agents application and a Redis container for storing session data.
RedisInsight, a free tool from Redis, can be used to connect to the Redis container and visualize session data. To use RedisInsight, launch the application and connect to the RedisInsight instance using the container's host and port (typically localhost:5540 if mapped).
This allows you to inspect keys, view stored session information, and monitor interactions in real time.