Code
persistent_session_history.py
Usage
1
Set up your virtual environment
2
Install required libraries
3
Set environment variables
4
Start PostgreSQL database
5
Run the agent
Store agent conversation history in PostgreSQL and limit how many past runs are added to the context with num_history_runs.
Set up your virtual environment
Install required libraries
Set environment variables
Start PostgreSQL database
Run the agent