En

@0xkobold/pi-learn

Open-source AI Agent Persistent Memory Infrastructure

其他 存储长期记忆搭建智能体开发环境管理对话历史 通用 ★ 165 Updated 2026-08-02

Install & Use

Copy this prompt and send it to your AI assistant (Claude / Cursor / TRAE / Codex / WorkBuddy etc.) to auto-install:

Help me install this AI Skill: @0xkobold/pi-learn.
It is used for: Open-source AI Agent Persistent Memory Infrastructure
Full Skill content: https://321skill.com/skills/0xkobold-pi-learn/raw/index.md
Read that page and install it.

The prompt includes a link to the full Skill content. You can also view the full content.

This Skill addresses the issue of AI agents losing memory across session interactions. In practical development, agents often fail to remember user preferences, historical conversations, or project context, resulting in each conversation starting from scratch and a fragmented user experience. Pi-Learn enables AI agents to possess persistent, retrievable "memory" by providing structured memory storage, reasoning, and context assembly, thereby supporting more natural and intelligent continuous dialogues.

Usage is straightforward: simply install Pi-Learn as a Skill into your AI agent, then use the learn_add_message tool to store conversation messages or learn_add_observation to log raw observations. Subsequently, the AI agent will automatically perform reasoning (learn_reason_now) and dream processing (learn_trigger_dream) to generate user profiles, conclusions, and summaries. When context is needed, calling learn_get_context retrieves a complete memory snapshot for the current user or project.

It is particularly suitable for development teams building agents that require long-term user relationships or ongoing project collaboration—especially those already using the Pi Agent framework or developers looking to upgrade their AI agents from "one-time tools" to "memory-capable partners." Whether for chatbots, personal assistants, project managers, or educational tutoring applications, all can benefit.

For initial setup, it is recommended to initialize basic user information via learn_update_peer_card and periodically run learn_prune to trigger memory cleanup policies and prevent data bloat. Note that it primarily relies on local storage; for handling massive user volumes, external database scaling may be necessary. Additionally, dream reasoning is an asynchronous background task, requiring the agent to have sustained runtime to take effect.

Key Features

Unlike Honcho, Pi-Learn offers a hybrid memory architecture (global scope + project scope) and introduces a "dream" background reasoning mechanism capable of proactively uncovering deep patterns, rather than merely storing and retrieving messages.

Limitations

The current version is based on Python 3.10+, relies on local filesystem storage, is not suitable for ultra-large-scale distributed deployments, and requires Pi Agent framework support.

FAQ

How do I install Pi-Learn into my AI agent?

After cloning the repository via git, import SKILL.md into your Claude Code or compatible AI agent; no additional dependency installation is required.

Does Pi-Learn support multiple users?

Yes, it supports multiple users through a workspace mechanism that separates different users or projects, with memory stored independently per workspace.

Installation guide for AI assistants

If your AI coding assistant (Claude Code, Cursor, TRAE etc.) can see this page, send it this message to auto-install:

Visit https://321skill.com/skills/0xkobold-pi-learn/raw/index.md to read the original Skill definition (Markdown format) for @0xkobold/pi-learn, and install it according to the instructions.