# basemem memory

> Local-first persistent project memory for coding agents using SQLite to track decisions and code structure.

basemem memory is a free AI agent skill on Agensi by ashvin-to, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [ashvin-to](https://www.agensi.io/creators/ashvin-to)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Uses: 3
- Version: 1.0
- Last updated: 2026-10-16
- Security: scan passed (2026-10-16); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/basemem-memory
- Tags: ai-agents, prompt-engineering, python, sqlite, mcp-server, context-management

## About this skill

Agents lose context between sessions, forcing you to re-explain architectural decisions and project constraints. This skill provides a local-first persistent memory layer that stores decisions, project state, and code-graph evidence in a SQLite database.

### What it does
- **Persistent memory** stores decisions, facts, and architectural constraints across multiple agent sessions.
- **Code intelligence** indexes project symbols, callers, and callees to provide structural context without full-file reads.
- **Session management** tracks progress with session starts, recaps, and end summaries to maintain continuity.
- **Conflict resolution** identifies and manages contradictory notes or outdated project information.
- **Local storage** maintains all data in a local SQLite database with no requirement for external vector stores or hosted services.

### How it works
1. **Initialize** the memory by calling `code_init` to index the project and `update_planet` to set the initial goal.
2. **Record** significant decisions mid-work using `logInteraction` to ensure constraints are preserved.
3. **Recover** context at the start of new sessions using `session_recap` or `read_planet`.
4. **Search** for specific historical context using `search_notes` or `code_find` when encountering unfamiliar symbols.

### Frameworks & tools
This tool requires Python 3.10+, Node.js, and Git. It utilizes a local SQLite database for storage and optionally integrates with `ripgrep` for fast text searches.

### Why this beats prompting it yourself
Standard prompts are transient and lose detail once the context window rolls over or a new session starts. This skill automates the retrieval of specific historical facts and structural code data that manual prompting cannot reliably recall or maintain.

### Use cases
- **Multi-day refactoring** where the agent must remember why a specific pattern was chosen across several sessions.
- **Onboarding agents** to large codebases by providing an indexed symbol graph and recorded architectural decisions.
- **Tracking constraints** to prevent the agent from suggesting solutions that were previously rejected for specific technical reasons.

### Known limitations
Data paths vary between the curl installer and manual setup, requiring explicit environment variables to avoid ambiguity. Session-start context injection is limited to specific supported agents.

## Requires

- Python
- Node.js
- Basemem MCP
- Mem MCP
- MCP-only
- Git

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the basemem memory skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this memory skill differ from just providing a detailed system prompt?

Unlike standard prompts that are lost when a session ends, this skill uses a local SQLite database to store architectural decisions and code structures permanently, ensuring your agent never forgets past constraints or project context.

### Does my project data get sent to a third-party cloud service for storage?

The skill stores all data locally on your machine in a SQLite database, meaning your project's architectural history and code symbols never leave your environment or require a subscription to an external vector database.

### What are the technical requirements to run basemem memory locally?

You will need Python 3.10 or higher, Node.js, and Git installed; for optimal performance during symbol searches, the tool also integrates with ripgrep if available on your system.

### Can this skill help an agent maintain continuity during a long-term refactoring project?

Yes, it is specifically designed for multi-day workflows by using 'session_recap' and 'read_planet' functions to bridge the context gap between different sessions or agent restarts.

### How does the skill handle outdated or contradictory information as the project evolves?

The tool includes built-in conflict resolution features that identify and manage contradictory notes, ensuring that outdated project information doesn't interfere with current development goals.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
