Architecture & Integration Guide
LLM Memory is a searchable knowledge base designed to help LLM agents (like Claude Code) access documentation, lessons learned, and institutional knowledge across sessions.
The core problem: each conversation starts fresh. Agents repeatedly make the same mistakes because they don't remember past lessons. This service is an experiment in giving agents persistent, searchable memory.
Claude Code can query the API using WebFetch:
WebFetch https://memory.aisloppy.com/api/search?q=deploy+flask+app
Pros: Works now, no setup required
Cons: Manual invocation, agent must remember to use it
MCP (Model Context Protocol) allows Claude Code to call external tools directly. An MCP server would expose memory search as a native tool.
# Claude could call directly:
search_memory(query="how to deploy flask app")
Pros: Cleaner integration, feels native
Cons: Requires local MCP server setup, adds complexity
Note on MCP performance: MCP works best as a local subprocess alongside Claude Code. Browser-based MCP interactions are slow because they require proxying through additional layers. For CLI tools like Claude Code, MCP is snappy.
Claude Code supports hooks that run before/after certain actions. A hook could automatically query memory before starting certain tasks.
Full-text search across all documents.
{
"query": "deploy flask",
"count": 2,
"results": [
{
"id": 1,
"title": "How to Deploy on AI Sloppy Hub",
"snippet": "...Flask backend with deploy script...",
"doc_type": "infrastructure",
"rank": -2.5
}
]
}
List all indexed documents. Optional ?type= filter.
Get full content of a specific document.
Add a new lesson learned.
{
"title": "Always use authreturn components for auth",
"content": "Don't hand-roll auth forms. Use the standard..."
}
Re-run the document indexer to pick up new/changed files.
This is v1 - a minimal viable experiment. Current limitations: