agno-memory-sessions

Configure Agno agent memory and session persistence with DynamoDB or SQLite backends.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/allankltsn/setup_kiro --skill agno-memory-sessions-allankltsn
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agno-memory-sessions
Source: https://github.com/allankltsn/setup_kiro/tree/main/.kiro/skills/agno-memory-sessions
Command: npx skills add https://github.com/allankltsn/setup_kiro --skill agno-memory-sessions-allankltsn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires agno, boto3, sqlalchemy.

What problem does it solve? Building AI agents that remember users across conversations requires choosing storage backends, managing session history, and controlling the token cost of memory extraction — decisions that are easy to get wrong and expensive in production. ## Core Features & Use Cases - Pluggable persistence by environment: Wire DynamoDB (preferred, with TTL configuration) or SQLite (local fallback) into Agno agents via environment variables without changing domain code. - Two memory management modes: Compare automatic memory extraction (update_memory_on_run) versus agentic memory (enable_agentic_memory), with a clear cost trade-off analysis and guidance on when the expensive mode is justified. - Cost optimization toolkit: Use a cheap dedicated model in a custom MemoryManager, limit retrieval with last_n/first_n/agentic methods, and prune old memories to keep context and token spend under control. - Use Case: You are deploying a support agent on AWS Lambda and need per-user long-term memory that survives across sessions, expires old data via DynamoDB TTL, and stays within a token budget. ## Quick Start Ask the agent to set up an Agno agent with DynamoDB-backed sessions and factual user memory using automatic memory extraction and a cheap MemoryManager model.

Frequently Asked Questions about agno-memory-sessions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add persistent memory to an Agno agent?▼

Attach a Db backend (DynamoDB or SQLite) to the Agent and set update_memory_on_run=True with add_memories_to_context=True. Always pass a user_id so factual memories are stored per user and persist across sessions.

What is the difference between Agno sessions and user memories?▼

Sessions store the message history of a single conversation, keyed by session_id. User memories store durable facts about a user, keyed by user_id, and are retrieved across different sessions to personalize responses.

Should I use update_memory_on_run or enable_agentic_memory in Agno?▼

Use update_memory_on_run for predictable cost — it extracts facts once per run. enable_agentic_memory gives the agent autonomy but triggers extra LLM calls per memory operation, so reserve it for high-value, long-term relationships where recall quality justifies token spend.

How do I reduce token cost of agent memory in Agno?▼

Use a cheap dedicated model in the MemoryManager (e.g., gpt-4o-mini), prefer automatic mode over agentic mode, limit retrieval with last_n and a low limit, and periodically prune old memories. These steps reduce both extraction cost and context size.

Does Agno DynamoDB storage support TTL for expiring sessions?▼

Agno does not expose a native TTL parameter on its DynamoDb class. You must enable TTL on the table yourself (e.g., via update-time-to-live with an expires_at attribute) and ensure items carry the expiration epoch attribute, since DynamoDB only expires items containing it.

Can I use SQLite instead of DynamoDB for Agno agent storage?▼

Yes, Agno provides SqliteDb for local development without AWS, requiring sqlalchemy. Switch backends via an environment variable so the same agent code runs locally on SQLite and in production on DynamoDB.