Metadata-Version: 2.2
Name: mem-llm
Version: 2.4.8
Summary: Privacy-first, memory-enabled AI assistant with workflow engine, knowledge graph, multi-agent systems, multi-backend LLM support (Ollama, LM Studio), vector search, and analytics - 100% local and production-ready
Author-email: Cihat Emre Karatas <karatasqemre@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/emredeveloper/Mem-LLM
Project-URL: Bug Reports, https://github.com/emredeveloper/Mem-LLM/issues
Project-URL: Source, https://github.com/emredeveloper/Mem-LLM
Keywords: llm,ai,memory,agent,multi-agent,chatbot,ollama,lmstudio,multi-backend,local,privacy,vector-search,chromadb,response-metrics,semantic-search,quality-analytics,embedding,streaming,function-calling,tools,async,validation,workspace,collaboration
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.31.0
Requires-Dist: pyyaml>=6.0.1
Requires-Dist: click>=8.1.0
Requires-Dist: aiohttp>=3.9.0
Requires-Dist: psutil>=5.9.0
Requires-Dist: networkx>=3.0
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: pytest-mock>=3.11.0; extra == "dev"
Requires-Dist: httpx>=0.24.0; extra == "dev"
Requires-Dist: black>=23.7.0; extra == "dev"
Provides-Extra: web
Requires-Dist: flask>=3.0.0; extra == "web"
Requires-Dist: flask-cors>=4.0.0; extra == "web"
Provides-Extra: api
Requires-Dist: fastapi>=0.104.0; extra == "api"
Requires-Dist: uvicorn[standard]>=0.24.0; extra == "api"
Requires-Dist: websockets>=12.0; extra == "api"
Provides-Extra: postgresql
Requires-Dist: psycopg2-binary>=2.9.9; extra == "postgresql"
Provides-Extra: mongodb
Requires-Dist: pymongo>=4.6.0; extra == "mongodb"
Provides-Extra: databases
Requires-Dist: psycopg2-binary>=2.9.9; extra == "databases"
Requires-Dist: pymongo>=4.6.0; extra == "databases"
Provides-Extra: all
Requires-Dist: pytest>=7.4.0; extra == "all"
Requires-Dist: pytest-cov>=4.1.0; extra == "all"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "all"
Requires-Dist: pytest-mock>=3.11.0; extra == "all"
Requires-Dist: httpx>=0.24.0; extra == "all"
Requires-Dist: black>=23.7.0; extra == "all"
Requires-Dist: flask>=3.0.0; extra == "all"
Requires-Dist: flask-cors>=4.0.0; extra == "all"
Requires-Dist: fastapi>=0.104.0; extra == "all"
Requires-Dist: uvicorn[standard]>=0.24.0; extra == "all"
Requires-Dist: websockets>=12.0; extra == "all"
Requires-Dist: psycopg2-binary>=2.9.9; extra == "all"
Requires-Dist: pymongo>=4.6.0; extra == "all"

﻿# Mem-LLM 🧠💻

[![PyPI version](https://badge.fury.io/py/mem-llm.svg)](https://pypi.org/project/mem-llm/)
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/emredeveloper/Mem-LLM/blob/main/LICENSE)

**Mem-LLM** is a privacy-first, local Python framework for building memory-enabled AI assistants. By running entirely on your local machine, it combines persistent multi-user conversation history with configurable knowledge bases, robust storage backends, and seamless multi-model support. 

Perfect for privacy-first, production-ready workflows!

### 🔗 Quick Links
- **GitHub Repository:** [github.com/emredeveloper/Mem-LLM](https://github.com/emredeveloper/Mem-LLM)
- **PyPI Package:** [pypi.org/project/mem-llm/](https://pypi.org/project/mem-llm/)
- **Issue Tracker:** [Report a Bug or Request a Feature](https://github.com/emredeveloper/Mem-LLM/issues)

---

## 🚀 What's New in v2.4.8?

This release finalizes the recent hardening and packaging updates:
- **Security Hardening:** Safer API auth defaults, upload handling, workspace validation, and tool execution behavior.
- **Safer Built-in Tools:** Calculator execution now uses AST-based parsing instead of unsafe evaluation.
- **LM Studio Defaults Updated:** LM Studio examples and defaults now use `qwen3.5-2b`.
- **Documentation Cleanup:** README files and remaining encoding issues were normalized.

---

## ✨ Core Highlights

- **Persistent Multi-User Memory:** Keep context across sessions. Supports lightweight JSON or robust SQLite databases.
- **Advanced Tool Calling:** Endow your agent with superpowers! Use built-in tools or easily create your own with the `@tool` decorator.
- **Multi-Backend Flexible Support:** Switch seamlessly between **Ollama** and **LM Studio**.
- **Knowledge Base (RAG) & Vector Stores:** Empower your agent with your own documents and databases organically.
- **Conversation Analytics:** Track interactions, model performance, and agent behavior systematically.
- **REST API + Web UI:** Deploy your local agent instantly with the built-in, ready-to-use API server and slick web interface.
- **Real-Time Streaming:** Stream chat responses chunk by chunk for ultra-low latency experiences.

---

## 📦 Installation

Get up and running in seconds. 

```bash
pip install mem-llm
```

**Optional Power-ups:**
```bash
# Add API server dependencies (FastAPI, Uvicorn)
pip install mem-llm[api]

# Add advanced database support
pip install mem-llm[databases]
```

---

## ⚡ Quick Start

### Using Ollama 🦙
Make sure your Ollama instance is running, then try this simple example:

```python
from mem_llm import MemAgent

# Initialize the agent
agent = MemAgent(backend="ollama", model="granite4:3b")

# Set the active user (memory will be uniquely tied to this ID)
agent.set_user("alice")

# Chat and watch it remember!
print(agent.chat("Hi! My name is Alice and I am a Software Engineer."))
print(agent.chat("What was my name and what do I do?")) 
```

### Using LM Studio 🛠️
Ensure LM Studio's local server is running on its default port:

```python
from mem_llm import MemAgent

agent = MemAgent(backend="lmstudio", model="qwen3.5-2b")
agent.set_user("bob")

print(agent.chat("Explain Python memory management in 2 sentences."))
```

---

## 📄 License

Mem-LLM is proudly open-source and released under the [MIT License](https://github.com/emredeveloper/Mem-LLM/blob/main/LICENSE). Build away!
