Prerequisites
- Python 3.9+
- A database (PostgreSQL recommended for production)
- OpenAI API key (or another model provider)
Setup
1
Set up your virtual environment
2
Install dependencies
3
Run PostgreSQL with PgVector
Install Docker Desktop and run:
4
Set your API key
Your First Learning Agent
Create a file calledlearning_agent.py:
learning_agent.py
What Just Happened?
Withlearning=True, the agent:
- Extracted profile info from Session 1 (name: Sarah, preferred name if mentioned)
- Recalled this profile in Session 2 to answer accurately
learning=True only enables user profile extraction. For user memory, session context, and other stores, use explicit LearningMachine configuration.