Celoris Logo
LearnJob CenterPricingPlayAboutContact
Celoris Logo

Empowering individuals and businesses through comprehensive learning, earning opportunities, and engaging experiences in one unified platform.

Platform

  • Pricing & Plans
  • Learn
  • Job Center
  • Classrooms
  • Apps

Company

  • About
  • Contact
  • Careers
  • Blog

Support

  • Help Center
  • Privacy Policy
  • Terms of Service
  • Refund & Cancellation
  • Cookie Policy

Connect

  • Newsletter
  • Community
  • Events
  • Partners

Celoris Designs LLP

LLP Identification No: AAP-3965

GST No: 09AAOFC5435B1ZJ

Established: 23rd May 2019

© 2019–2026 Celoris Designs LLP. All rights reserved.

Incorporated under the Limited Liability Partnership Act, 2008

Registered with Ministry of Corporate Affairs, Government of India

PrivacyTermsRefundsCookies
    Back to Insights
    Project Series • Local AI • Python 12 MIN READ

    Build a Local AI That Remembers You

    Using Ollama + Supabase + Python | Beginner to Intermediate

    C

    Celoris Team

    Official Creator

    May 2026
    Share Post
    LevelIntermediate
    PrerequisitesBasic Python
    SeriesBuild Your Own AI Agent

    What Are We Building?

    Imagine an AI assistant that:

    • Runs 100% on your own computer — no internet needed, no API charges
    • Remembers every conversation you have ever had with it
    • Can do tasks — read files, search the web, answer questions, write code
    • Keeps your data private — nothing leaves your machine

    This is not a dream. With three free tools — Ollama, Supabase, and Python — you can build exactly this. This is Class 01. By the end, you will understand the full architecture. In the next classes, we will build it step by step.

    Why Build a Local AI?

    Most AI tools like ChatGPT are cloud-based. That means:

    Your conversations are stored on someone else's server
    You pay per message (API costs add up fast)
    You need internet to use it
    If the company changes pricing or shuts down, you are stuck

    A local AI solves all of this. You run the model on your own computer. Your data stays with you. Zero cost per message. Works offline.

    Real World Use Case

    Think of a CA firm that wants an AI assistant trained on their client files. They cannot use ChatGPT because client data is confidential. A local AI is the only safe option. Same applies to hospitals, law firms, HR departments — any place where privacy matters.

    The Three Tools You Will Use

    1. Ollama — Your Local AI Model Runner

    Ollama lets you download and run large language models (LLMs) on your own computer. Think of it as the engine that powers your AI.

    • Free and open source
    • Supports LLaMA 3, Mistral, Gemma
    • Works on Windows, Mac, Linux
    • Simple to install

    2. Supabase — Your Database (Memory Storage)

    Supabase is an open source database platform built on PostgreSQL. We use it to store:

    Chat History

    Every message saved permanently.

    Vector Embeddings

    Mathematical meaning for smart search.

    3. Python — The Brain

    Python is the glue. It receives your message, searches memory, sends context to Ollama, and saves replies.

    How Memory Works: Two Layers

    Layer 1: Short-Term

    Within one conversation, the AI remembers everything you said by passing the full current history to Ollama.

    Layer 2: Long-Term

    Uses vector embeddings to search months-old messages for similar meanings and injects them as context.

    The Flow of Long-Term Memory:

    1. 1You type a message
    2. 2Python converts it to a vector embedding (nomic-embed-text)
    3. 3Supabase searches old chat history for similar meanings
    4. 4Top 3-5 relevant memories are injected into the prompt
    5. 5Ollama generates a reply with full context
    6. 6New message is saved for future recall

    What Tasks Can Your AI Do?

    Task TypeHow It Works
    Answer questionsUses LLM knowledge + your memory context
    Read & summarize filesPython reads .txt/.pdf, passes content to Ollama
    Write and save codeAI generates code, Python saves it to disk
    Remember preferencesStored in Supabase, retrieved via memory search
    Search the webPython calls search API, passes results to Ollama
    Run system commandsPython executes shell commands based on AI instructions

    7-Class Project Roadmap

    01

    Architecture

    Understand the full system (this class)

    02

    Setup & Ollama

    Install Ollama, run first model, chat via Python

    03

    Supabase Setup

    Create database, tables, connect from Python

    04

    Memory System

    Embed messages, store and search with pgvector

    05

    Full Chat Loop

    Complete chatbot with long-term memory

    06

    Add Tools

    File reading, web search, task execution

    07

    Final Project

    Your personal AI assistant — fully working

    The Code Structure

    local-ai/
      main.py          # Main chat loop
      memory.py        # Supabase memory: save + retrieve
      embeddings.py    # Convert text to vectors using Ollama
      tools.py         # Extra abilities: files, web search
      config.py        # Settings: model name, DB URL, etc.
      requirements.txt # Python libraries needed

    A Sneak Peek: Chatting with Python

    Python 3.10+
    import requests
    
    response = requests.post('http://localhost:11434/api/generate', json={
        'model': 'llama3',
        'prompt': 'Hello! Who are you?',
        'stream': False
    })
    
    print(response.json()['response'])

    Your Homework

    1

    Go to ollama.com and download Ollama for your OS

    2

    Install it and run 'ollama pull llama3' in terminal

    3

    Run 'ollama run llama3' and type 'Hello' to verify

    4

    Create a free account at supabase.com

    Ready to Build?

    This series is designed so that anyone with basic Python knowledge can build a production-grade AI agent. Stay tuned for Class 02 where we write our first lines of code.

    Learn AI with Celoris

    Master the hottest skills in the industry — from local LLMs to Vector Databases.

    WhatsApp QueryAll Classes

    Explore More

    Building Real-time Voice AI with LiveKitMetatrader 5 Python AI Trading AutomationMultimodal Agentic AI GuideBest Python for AI Course in Noida
    local aiollamasupabasepython aivector databasellama3ai agent

    Celoris AI Lab | Build the Future Locally

    © 2026 Celoris.in • Class 01 of 07