GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - VinayHanni/PIPO: AI-powered personal memory assistant that remembers context across conversations using DistilBERT embeddings, ChromaDB vector storage, and a rolling summary system. Built with FastAPI, Redis, and Supabase.

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
backend
backend
 
 
frontend
frontend
 
 
.gitignore
.gitignore
 
 
API_CONTRACT_ROLLING_SUMMARY.md
API_CONTRACT_ROLLING_SUMMARY.md
 
 
README.md
README.md
 
 

Repository files navigation

PIPO — Persistent Personal AI Assistant

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.


Architecture

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

High-Level Flow

                    ┌──────────────────┐
                    │   React Frontend │
                    └────────┬─────────┘
                             │
                             ▼
                    ┌──────────────────┐
                    │  FastAPI Backend │
                    └────────┬─────────┘
                             │
             ┌───────────────┼────────────────┐
             │               │                │
             ▼               ▼                ▼
          Supabase         Redis           ChromaDB
       Auth + Database   Short-term       Long-term
                          Memory            Memory
                             │                │
                             └───────┬────────┘
                                     ▼
                              Memory Pipeline
                                     │
                       ┌─────────────┴─────────────┐
                       ▼                           ▼
                  DistilBERT                    Ollama
               Memory Classifier                Mistral
                                                   │
                                                   ▼
                                             AI Response

Memory Lifecycle

PIPO uses a multi-stage memory pipeline.

1. Formation

User messages are first maintained as short-term conversational context using Redis.

User Message
     ↓
Redis
     ↓
Short-term Context

2. Consolidation

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

3. Recall

When a user sends a new message, PIPO can retrieve semantically relevant memories from ChromaDB.

New Message
     ↓
Embedding / Retrieval
     ↓
Relevant Memories
     ↓
Context Construction
     ↓
LLM

4. Forgetting / Decay

Low-value or outdated memories can be removed or decayed over time based on their importance and usage.


Project Structure

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

Local Development Setup

Prerequisites

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.


1. Clone the Repository

git clone https://github.com/VinayHanni/PIPO.git
cd PIPO

2. Backend Setup

Navigate to the backend:

cd backend

Create a virtual environment:

python -m venv venv

Windows

venv\Scripts\activate

macOS / Linux

source venv/bin/activate

Install Python dependencies:

pip install -r requirements.txt

3. Configure Backend Environment Variables

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.


4. Start Redis

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 ping

Expected:

PONG

5. ChromaDB

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.


6. Ollama + Mistral

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.


7. DistilBERT

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.


8. Start the Backend

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

9. Frontend Setup

Open another terminal and navigate to:

cd frontend

Install 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 Variables & Security

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

Development Phases

Phase 1 — Authentication & Routing

  • 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.


Phase 2 — Chat + Memory Routing

  • 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.


Phase 3 — Memory Intelligence

  • 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.


Phase 4 — Personality & Persistence

  • 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.


Phase 5 — Deployment & Scaling

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.


Technology Stack

Frontend

  • React
  • Tailwind CSS

Backend

  • Python
  • FastAPI

AI / ML

  • Ollama
  • Mistral
  • DistilBERT
  • Transformers

Storage

  • Supabase PostgreSQL
  • ChromaDB
  • Redis

Development

  • Docker
  • Git
  • npm

Current Status

🚧 Active Development

React
  ↓
FastAPI
  ↓
Redis
  ↓
Memory Retrieval
  ↓
ChromaDB
  ↓
Ollama / Mistral
  ↓
AI Response

Future Direction

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.


Contributing

PIPO is currently a personal development project.

The architecture is being kept modular to allow future experimentation, integrations, and open-source contributions.

About

AI-powered personal memory assistant that remembers context across conversations using DistilBERT embeddings, ChromaDB vector storage, and a rolling summary system. Built with FastAPI, Redis, and Supabase.

Topics

chromadbdistilbertfastapillmmemory-ainlppythonredissupabasevector-database

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.