PIPO is a memory-powered personal AI assistant that maintains context across conversations and sessions.
Unlike a conventional chatbot, PIPO is designed to:
- Remember important facts and preferences about users
- Build long-term personal memory
- Retrieve relevant memories before generating responses
- Maintain short-term conversational context
- Consolidate important information into long-term memory
- Use an LLM for response generation
- Gradually improve the quality of personalization over time
PIPO combines a React frontend, FastAPI backend, Supabase authentication/database, Redis session memory, ChromaDB vector memory, DistilBERT-based memory classification, and Ollama for local LLM inference.
| Component | Technology | Purpose |
|---|---|---|
| Frontend | React | Chat interface, authentication, routing |
| Backend | FastAPI | API routing, authentication, chat orchestration, memory logic |
| Authentication | Supabase Auth | User signup, login, JWT authentication |
| Database | Supabase PostgreSQL | User metadata and application data |
| Vector Database | ChromaDB | Long-term semantic memory |
| Session Memory | Redis | Short-term conversational context |
| Memory Classifier | DistilBERT | Determines the importance of information |
| LLM | Ollama + Mistral | Local text generation |
┌──────────────────┐
│ React Frontend │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ FastAPI Backend │
└────────┬─────────┘
│
┌───────────────┼────────────────┐
│ │ │
▼ ▼ ▼
Supabase Redis ChromaDB
Auth + Database Short-term Long-term
Memory Memory
│ │
└───────┬────────┘
▼
Memory Pipeline
│
┌─────────────┴─────────────┐
▼ ▼
DistilBERT Ollama
Memory Classifier Mistral
│
▼
AI Response
PIPO uses a multi-stage memory pipeline.
User messages are first maintained as short-term conversational context using Redis.
User Message
↓
Redis
↓
Short-term Context
Important information is identified by the memory classification layer.
Relevant information is converted into embeddings and stored in ChromaDB as long-term memory.
User Message
↓
Memory Classification
↓
Important?
/ \
No Yes
↓
Embedding
↓
ChromaDB
When a user sends a new message, PIPO can retrieve semantically relevant memories from ChromaDB.
New Message
↓
Embedding / Retrieval
↓
Relevant Memories
↓
Context Construction
↓
LLM
Low-value or outdated memories can be removed or decayed over time based on their importance and usage.
PIPO/
│
├── backend/
│ ├── routers/
│ ├── services/
│ │ ├── redis_service.py
│ │ ├── chroma_service.py
│ │ ├── supabase_service.py
│ │ ├── ollama_service.py
│ │ ├── distilbert_service.py
│ │ └── context_summarizer.py
│ ├── main.py
│ ├── requirements.txt
│ └── .env.example
│
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ ├── context/
│ │ ├── hooks/
│ │ └── utils/
│ ├── package.json
│ └── .env.example
│
├── .gitignore
└── README.md
Install the following before running PIPO:
- Python 3.10+
- Node.js
- npm
- Docker Desktop
- Ollama
- Git
A machine with sufficient resources for running the selected Ollama model is recommended.
git clone https://github.com/VinayHanni/PIPO.git
cd PIPONavigate to the backend:
cd backendCreate a virtual environment:
python -m venv venv
venv\Scripts\activate
source venv/bin/activateInstall Python dependencies:
pip install -r requirements.txt
Create a local .env file:
backend/.env
Use backend/.env.example as the template.
Do not commit .env files or credentials to Git.
Example:
SUPABASE_URL=your_supabase_project_url SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key REDIS_URL=redis://localhost:6379/0 PIPO_CHROMA_DATA_PATH=./chroma_data PIPO_OLLAMA_BASE_URL=http://localhost:11434
The exact environment variables may change as the project evolves.
Redis is used for short-term conversational memory.
Using Docker:
docker run -d --name pipo-redis -p 6379:6379 redis
Verify that Redis is running:
docker exec -it pipo-redis redis-cli pingExpected:
PONG
PIPO currently uses ChromaDB for persistent local vector storage.
The application initializes a persistent ChromaDB client and stores its local data in the configured Chroma data directory.
By default:
backend/chroma_data/
This directory is local runtime data and should not be committed to Git.
Note: The current implementation uses ChromaDB's persistent local client. A separate ChromaDB server/container is not required for the current development setup.
PIPO uses Ollama for local LLM inference.
Install Ollama from the official Ollama website and then pull the model:
ollama pull mistral
Verify:
ollama list
Run the model:
ollama run mistral
Ollama normally exposes its local API at:
http://localhost:11434
PIPO connects to this local endpoint from the backend.
The LLM is intentionally kept outside the Python environment because Ollama is a separate inference service.
The memory classification service uses a DistilBERT model for classification.
The required model is downloaded when it is first loaded through the Transformers library.
The first run therefore requires internet access to download the model.
From the backend directory:
uvicorn main:app --reload
The FastAPI server should be available at:
http://localhost:8000
Interactive API documentation:
http://localhost:8000/docs
Open another terminal and navigate to:
cd frontendInstall dependencies:
npm install
Create:
frontend/.env
using:
frontend/.env.example
as the template.
Then start React:
npm start
The frontend should be available at:
http://localhost:3000
Environment files containing credentials are intentionally excluded from Git.
The repository should contain:
frontend/.env.example
backend/.env.example
but not:
frontend/.env
backend/.env
Never commit:
- Supabase service-role keys
- API keys
- Authentication tokens
- Passwords
- Private credentials
- Local database files
- ChromaDB persistent data
- Supabase authentication
- User signup/login
- React routing
- Backend JWT authentication
- User profile handling
- Per-user ChromaDB collection allocation
Goal: Users can securely sign up, log in, and access the chat application.
- React chat UI → FastAPI
- FastAPI → Ollama
- Redis short-term memory
- ChromaDB long-term memory
- Memory retrieval before response generation
- Relevant memory passed into the LLM context
Goal: Fully functional conversational AI with memory recall.
- DistilBERT-based classification
- Memory importance scoring
- Memory strength
- Access tracking
- Memory decay
- Improved consolidation rules
Goal: Store useful information rather than treating every conversation as permanent memory.
- PIPO personality traits
- Rolling conversation summaries
- Daily memory summarization
- Long-term memory consolidation
- Improved personalization
Goal: Provide continuity across sessions and improve personalization over time.
Planned deployment architecture:
- React → Vercel / Google Cloud
- FastAPI → Google Cloud Run / similar platform
- Redis → Managed Redis
- ChromaDB → Hosted/managed vector infrastructure
- LLM → Remote/local inference endpoint
- Secure service-to-service communication
Goal: Make the system deployable and scalable beyond local development.
- React
- Tailwind CSS
- Python
- FastAPI
- Ollama
- Mistral
- DistilBERT
- Transformers
- Supabase PostgreSQL
- ChromaDB
- Redis
- Docker
- Git
- npm
🚧 Active Development
React
↓
FastAPI
↓
Redis
↓
Memory Retrieval
↓
ChromaDB
↓
Ollama / Mistral
↓
AI Response
PIPO is being designed as more than a conventional chat interface.
The long-term goal is to build an assistant capable of managing and automating multiple parts of a user's workflow using persistent context, memory, retrieval, and AI-driven actions.
PIPO is currently a personal development project.
The architecture is being kept modular to allow future experimentation, integrations, and open-source contributions.