Agent Memory

Store and retrieve facts, lessons, and entities across AI agent sessions using SQLite.

8|1|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/Tugoukezhang/workbuddy-skills --skill agent-memory-tugoukezhang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Agent Memory
Source: https://github.com/Tugoukezhang/workbuddy-skills/tree/main/skills/agent-memory
Command: npx skills add https://github.com/Tugoukezhang/workbuddy-skills --skill agent-memory-tugoukezhang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

AI agents often lose important context between sessions, making conversations repetitive and inefficient. Agent Memory provides a durable store for facts, lessons, and entity contexts so agents can recall and reason across sessions.

Core Features & Use Cases

  • Facts: remember and retrieve discrete facts with tags and confidence.
  • Lessons: capture what worked or failed to guide future actions.
  • Entities: track people, projects, and other referenced items with attributes.
  • Semantic Search: fast recall using natural-language queries.
  • Auto-cleanup: prune stale data to keep memory lean.
  • Zero Dependencies: works with Python stdlib and SQLite.

Quick Start

Initialize AgentMemory and start recording a fact using mem.remember to verify persistence.

Frequently Asked Questions about Agent Memory

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

FAQPage Schema
How do I persist context for AI agents across sessions?

To persist context for AI agents across sessions, you can use a SQLite-backed memory layer that stores facts, lessons, and entities. This ensures conversations maintain continuity without losing important referenced items between sessions.

What is the best way to implement semantic search over agent memory?

Implementing semantic search over agent memory allows fast recall of stored facts using natural-language queries. This mechanism works by indexing discrete facts with tags and confidence levels within a SQLite persistence layer.

Do I need external dependencies to maintain AI agent memory in Python?

No, you do not need external dependencies to maintain AI agent memory in Python. This approach works entirely with the Python standard library and SQLite, requiring zero external packages to store facts and track entity attributes.

How do I automatically prune stale facts and lessons from agent memory?

To automatically prune stale facts and lessons from agent memory, you can use an auto-cleanup mechanism that applies automatic aging and supersession. This keeps the memory store lean by removing outdated context over time.

Can I track people and projects as entities in a SQLite persistence layer?

Yes, you can track people and projects as entities in a SQLite persistence layer. The database schema includes dedicated tables for entities, allowing you to store specific attributes and link referenced items across experiments.