Documentation Index
Fetch the complete documentation index at: https://agno-v2-shaloo-ai-support-link.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
The following example requires the memori library.
uv pip install -U memori sqlalchemy python-dotenv
Example
The following agent uses Memori to maintain persistent memory across conversations with SQLite:
import os
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from dotenv import load_dotenv
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from memori import Memori
load_dotenv()
db_path = os.getenv("DATABASE_PATH", "memori_agno.db")
engine = create_engine(f"sqlite:///{db_path}")
Session = sessionmaker(bind=engine)
model = OpenAIResponses(id="gpt-5.2")
mem = Memori(conn=Session).agno.register(openai_chat=model)
mem.attribution(entity_id="customer-456", process_id="support-agent")
mem.config.storage.build()
agent = Agent(
model=model,
instructions=[
"You are a helpful customer support agent.",
"Remember customer preferences and history from previous conversations.",
],
markdown=True,
)
if __name__ == "__main__":
print("Customer: Hi, I'd like to order a large pepperoni pizza with extra cheese")
response1 = agent.run(
"Hi, I'd like to order a large pepperoni pizza with extra cheese"
)
print(f"Agent: {response1.content}\n")
print("Customer: Actually, can you remind me what I just ordered?")
response2 = agent.run("Actually, can you remind me what I just ordered?")
print(f"Agent: {response2.content}\n")
print("Customer: Perfect! And what size was that again?")
response3 = agent.run("Perfect! And what size was that again?")
print(f"Agent: {response3.content}")
Key Features
- LLM Agnostic: OpenAI, Anthropic, Bedrock, Gemini, Grok (xAI) - all modes (streamed, unstreamed, sync, async)
- Smart Attribution: Track memories by entity (e.g., customer) and process (e.g., support agent)
- Advanced Augmentation: AI-powered memory augmentation with no latency impact
- Database Flexibility: Supports PostgreSQL, MySQL/MariaDB, SQLite, MongoDB, CockroachDB, Neon, Supabase, Oracle, and more
Setup
- Create Database Engine: Use SQLAlchemy to create a database connection
- Initialize Memori: Create a Memori instance with the database session
- Register with Model: Register Memori with your Agno agent using
.agno.register()
- Set Attribution: Define entity and process IDs for memory tracking
- Build Storage: Initialize the database schema with
.config.storage.build()
Developer Resources