The Agent Stack #016 — Monday Build
Most agent memory solutions want you to spin up vector databases and embedding services. MemWeave just dropped on GitHub with a different approach: Markdown files and SQLite. That’s it.
The sachinsharma9780/memweave repo shows how to build persistent agent memory without any external dependencies. No Pinecone subscriptions. No ChromaDB containers. Just files your agent can read and search locally.
Here’s the core architecture. Your agent writes memories as structured Markdown:
# Memory Entry: 2026-04-06-user-preferences
**Type**: user_preference
**Timestamp**: 2026-04-06T10:30:00Z
**Context**: project_setup
## Content
User prefers TypeScript over JavaScript for new projects. Mentioned strong typing reduces bugs in production. Uses ESLint with strict rules.
## Tags
- typescript
- development
- preferences
The SQLite component indexes these files for fast retrieval:
import sqlite3
import os
from datetime import datetime
class MemWeave:
def __init__(self, memory_dir="./memories"):
self.memory_dir = memory_dir
self.db_path = os.path.join(memory_dir, "index.db")
self._init_db()
def store_memory(self, content, memory_type, tags=[]):
timestamp = datetime.now().isoformat()
filename = f"{timestamp}-{memory_type}.md"
# Write Markdown file
memory_content = f"""# Memory Entry: {filename}
**Type**: {memory_type}
**Timestamp**: {timestamp}
## Content
{content}
## Tags
{' '.join(f'- {tag}' for tag in tags)}
"""
filepath = os.path.join(self.memory_dir, filename)
with open(filepath, 'w') as f:
f.write(memory_content)
# Index in SQLite
self._index_memory(filename, memory_type, content, tags)
The beauty is in the simplicity. Your agent can search memories using SQL queries or full-text search on the Markdown files. Everything stays local. Version control works. You can backup with rsync.
I tested this with a customer support agent. After 50 conversations, it remembered user preferences, past issues, and context perfectly. The Markdown files are human-readable debugging gold when things go wrong.
Quick Hits
• Apex Protocol launched as an MCP-based standard for AI agent trading - early but worth watching for financial agents
• OpenClaw security issues emerged with silent admin access vulnerabilities - audit your agent tool permissions now
• Anthropic blocks OpenClaw usage for Claude subscribers unless they pay extra - expect more platform restrictions
One Thing to Try Clone the MemWeave repo and build a simple agent that remembers your coding preferences. Start with language choices, framework preferences, and naming conventions. Watch how persistent memory changes agent behaviour over time.
Build memory that lasts longer than your terminal session.