Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.08 KB

File metadata and controls

34 lines (23 loc) · 1.08 KB

Session Memory Examples

Session memory examples for OpenAI Agents SDK integrated with Temporal workflows.

Adapted from OpenAI Agents SDK session memory examples

Before running these examples, be sure to review the prerequisites and background on the integration.

Running the Examples

PostgreSQL Session Memory

This example uses a PostgreSQL database to store session data.

You need can use the standard PostgreSQL environment variables to configure the database connection. These include PGDATABASE, PGUSER, PGPASSWORD, PGHOST, and PGPORT. We also support the DATABASE_URL environment variable.

To confirm that your environment is configured correctly, just run the psql command after setting the environment variables. For example:

PGDATABASE=postgres psql

Start the worker:

PGDATABASE=postgres uv run openai_agents/memory/run_postgres_session_worker.py

Then run the workflow:

uv run openai_agents/memory/run_postgres_session_workflow.py