memory

Maintains persistent bot memory via a structured task ledger and decision log.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/bkrsna/gemini-cli --skill memory-bkrsna
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: memory
Source: https://github.com/bkrsna/gemini-cli/tree/main/tools/gemini-cli-bot/.gemini/skills/memory
Command: npx skills add https://github.com/bkrsna/gemini-cli --skill memory-bkrsna

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Autonomous agents lose context between sessions, repeating investigations and forgetting prior decisions. This Skill standardizes how the Gemini CLI Bot synchronizes with previous sessions, tracks task status, and preserves root-cause findings across runs. ## Core Features & Use Cases - Structured Memory File: Maintains lessons-learned.md with a Task Ledger, Hypothesis Ledger, Decision Log, and investigation findings sections. - Session Synchronization Rituals: Enforces a mandatory Phase 0 context retrieval (reading memory and verifying state via the GitHub CLI) and a Phase 6 memory preservation step at the end of each run. - Memory Pruning: Keeps only the 50 most recent tasks and 20 most recent decision entries to prevent context bloat. - Use Case: A scheduled bot run picks up where the last session ended by reading the Task Ledger, marks merged PRs as DONE, investigates failures, and appends new findings to the Decision Log before finishing. ## Quick Start Activate the memory skill to read lessons-learned.md, synchronize the task ledger with current GitHub state, and record your findings before finishing.

Frequently Asked Questions about memory

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

FAQPage Schema
How do I give an AI agent persistent memory across sessions?

Store state in a structured Markdown file such as lessons-learned.md containing a task ledger, hypothesis ledger, and decision log. The agent reads this file at the start of each session and updates it before finishing.

How to prevent agent memory files from growing too large?

Apply rolling-window pruning to the memory file. This Skill keeps only the 50 most recent tasks in the Task Ledger and the 20 most recent entries in the Decision Log to prevent context bloat.

Can sub-agents update the shared memory file directly?

No. Worker agents are strictly forbidden from writing to lessons-learned.md. They return findings to the orchestrator, which remains the sole authority for state preservation.

How does the bot verify task state before acting?

During Phase 0 it reads the memory file and uses the GitHub CLI (gh pr view or gh issue view) to verify the current state of the trigger, then updates ledger statuses such as marking merged PRs as DONE.

What happens to failed tasks in interactive mode?

In interactive mode the bot ignores FAILED, STUCK, or pending tasks entirely. Its only goal is to address the specific user comment that triggered the run.