pixelmemory
Health Warn
- License — License: Apache-2.0
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 7 GitHub stars
Code Pass
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Pixelmemory — A multimodal memory layer for your agents and mcp servers.
Pixelmemory
Reference Implementation: Multimodal Memory Layer Built on Pixeltable
Overview
Pixelmemory demonstrates how to build sophisticated memory layers using Pixeltable's declarative data infrastructure. This reference implementation shows how to create persistent, searchable, multimodal memory for stateful AI agents.
graph TB
A[Your AI Agent] --> B[Pixelmemory Layer]
B --> C[Pixeltable Foundation]
C --> D[(Local Storage)]
C --> E[Vector Indexes]
C --> F[Computed Columns]
B --> G[Text Memory]
B --> H[Image Memory]
B --> I[Video Memory]
B --> J[Audio Memory]
B --> K[Document Memory]
G --> L[Semantic Search]
H --> L
I --> L
J --> L
K --> L
Why Use Pixelmemory?
Most AI applications today are stateless - they forget everything between sessions. Pixelmemory solves this by providing:
- Persistent memory that survives between sessions
- Semantic search across all data types
- Local-first storage with no vendor lock-in
- Multimodal support for text, images, videos, audio, documents
- Production-ready foundation built on Pixeltable
Installation
pip install pixelmemory
Note: Pixeltable is automatically installed as a dependency - no additional setup required.
Quick Start
from pixelmemory import Memory
from pixelmemory.context import Text
# Define memory structure
context = [
Text(id="content", embed=True), # Searchable content
Text(id="user_id", embed=False), # Metadata
]
# Create memory instance
memory = Memory(context=context, namespace="chatbot")
# Add memories
entry = memory.Entry(content="I love Python programming", user_id="user_123")
memory.add(entry)
# Semantic search
results = memory.search("programming languages", min_score=0.5)
for r in results:
print(r["score"], r["text"])
Architecture
sequenceDiagram
participant App as Your App
participant PM as Pixelmemory
participant PT as Pixeltable
participant DB as Pixeltable Storage
App->>PM: Create memory with context
PM->>PT: Create table with schema
PT->>DB: Initialize table & indexes
App->>PM: Add memory entry
PM->>PT: Insert with computed columns
PT->>DB: Store data + embeddings
App->>PM: Search memories
PM->>PT: Query with similarity
PT->>DB: Vector search
DB-->>App: Ranked results
Examples
Basic Text Memory
from pixelmemory import Memory
from pixelmemory.context import Text
context = [Text(id="content", embed=True)]
memory = Memory(context=context)
# Add and search
entry = memory.Entry(content="Learning about AI")
memory.add(entry)
# Semantic search
results = memory.search("artificial intelligence", min_score=0.3)
Multimodal Memory
from pixelmemory.context import Text, Image, Video
# Support multiple data types
context = [
Text(id="description", embed=True),
Image(id="screenshot", provider="openai", model="gpt-4o-mini"),
Video(id="demo_video"),
]
memory = Memory(context=context, namespace="multimodal_app")
Integration with LangChain
from pixelmemory import Memory
from pixelmemory.context import Text
from langchain.chat_models import init_chat_model
# Persistent chat memory
context = [
Text(id="session_id", embed=False),
Text(id="messages", embed=False),
]
memory = Memory(context=context, namespace="langchain_chat")
model = init_chat_model("gpt-4o-mini", model_provider="openai")
# Chat with memory
def chat_with_memory(session_id: str, message: str):
# Retrieve history, generate response, save back to memory
# (See examples/integrations/langchain_chat_history.py)
pass
Example Files
All examples use the context-based API and are ready to run:
Basic Examples (no external dependencies):
examples/getting_started/01_basic_memory.pyexamples/multimodal/text.py
Multimodal Examples (require OpenAI API key):
examples/multimodal/images.pyexamples/multimodal/video.pyexamples/multimodal/audio.py
Integration Examples:
examples/integrations/langchain_chat_history.py(requires OpenAI API key)examples/integrations/crewai_agentic_rag.py(requirespip install crewai)examples/fastapi/memory_service.py(requirespip install fastapi uvicorn)
Next Steps
Ready to build more advanced AI applications?
- Explore Pixeltable - Master the underlying infrastructure
- Read the documentation - Comprehensive guides and tutorials
- Join the community - Get help and share your implementations
- See advanced examples - RAG, computer vision, audio processing
Learn more about building stateful agents: Building Memory-Powered AI: Creating Stateful Agents with Pixeltable
Remember: Pixelmemory is a reference implementation. Use it as inspiration to build your own memory architecture using Pixeltable's flexible primitives.
License
Apache 2.0 License
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found