Skip to content

devgomesai/LTM-AI-Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🤖 LTM-AI-Agent

LTM-AI-Agent is an AI chatbot with Long-Term Memory (LTM) that remembers user interactions, recalls past conversations, and adapts responses based on stored context.

🚀 Features

  • Persistent Memory: Stores & retrieves chat history from SQLite.
  • Context Awareness: Remembers user details across sessions.
  • Contradiction Handling: Updates facts when new information is provided.
  • Inference & Reasoning: Understands and adapts responses based on memory.
  • Time-Based Memory: Can recall past events over time.

🛠 Tech Stack

  • Python 🐍
  • SQLite 🗄️
  • Pydantic AI 🤖
  • OpenAI GPT-3.5 Turbo

📂 Project Structure

📦 LTM-AI-Agent
├── 📜 store_conversation_advance.py  # Chatbot logic & memory handling
├── 📜 conversation1.db               # SQLite database (auto-created)
├── 📜 requirements.txt               # Dependencies
├── 📜 README.md                      # Project documentation

🚀 Clone & Run

1️⃣ Clone the repository

git clone https://github.com/gomesjonathan99/LTM-AI-Agent.git

2️⃣ Install dependencies

pip install -r requirements.txt

3️⃣ Run the chatbot

python store_conversation_advance.py

📌 Usage

  • Start a conversation

    print(chat(session_id="session_12", message="Hello!"))
  • Retrieve past knowledge

    print(chat(session_id="session_12", message="What do you remember about me?"))
  • Handle contradictions

    print(chat(session_id="session_12", message="Actually, I don't have a pet."))
    print(chat(session_id="session_12", message="Do I have a pet?"))

About

LTM-AI-Agent is an AI-powered chatbot with Long-Term Memory (LTM), enabling it to retain and recall past interactions. It uses SQLite for persistent storage and Pydantic AI to process conversations, making it context-aware, adaptive, and capable of handling contradictions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages