Squish: Open-Source Memory for AI Agents
AI agents forget. Squish remembers. Introducing our open-source memory layer that gives AI agents persistent, searchable context.
Every AI agent faces the same fundamental problem: memory. Without persistent context, agents treat every interaction as a fresh start. They forget user preferences, lose project history, and fail to build on previous work.
Squish solves this problem. It is an open-source memory layer designed specifically for AI agents, providing persistent, searchable context that improves agent performance over time.
The Memory Problem in AI
AI agents have a paradox. They can process vast amounts of information in a single interaction, but they have no memory across interactions.
Consider a customer support agent. In conversation one, it learns that a customer prefers email over phone, has a specific product configuration, and has had three previous issues with the same error code. In conversation two, it starts from zero. The customer has to re-explain everything.
This is not a minor inconvenience. It is a fundamental limitation that degrades agent performance and frustrates users.
Traditional approaches to this problem -- storing everything in a vector database, maintaining conversation histories, or using long context windows -- have significant limitations:
- Vector databases provide semantic search but lack structured memory management
- Conversation histories grow unbounded and become expensive to process
- Long context windows are limited by model constraints and become noisy
- Simple key-value stores lack the intelligence to determine what is worth remembering
What is needed is a purpose-built memory system that understands what to remember, how to organize it, and how to retrieve it efficiently.
What Squish Does
Squish provides a complete memory infrastructure for AI agents. It handles the full lifecycle of agent memory: capturing important information, organizing it for retrieval, learning from outcomes, and providing context when needed.
Core Capabilities
Remember. Squish captures memories from agent interactions. It automatically determines the type of memory (observation, fact, decision, context, preference) and routes it to the appropriate storage.
Recall. When an agent needs context, Squish provides relevant memories through semantic search, filtered by type, time, user, or project. Memories are returned at the right level of detail for the agent's needs.
Learn. Squish captures learning events -- successes, failures, fixes, and insights -- that help agents improve over time. This creates a feedback loop where agent performance improves with use.
Context. Before each interaction, Squish provides the agent with relevant context from previous sessions. This eliminates the cold-start problem and ensures agents build on existing knowledge.
Consolidate. Over time, Squish consolidates memories -- deduplicating similar entries, summarizing related information, and pruning stale content. This keeps the memory store efficient and relevant.
Architecture Overview
Squish is built on SQLite, which provides several advantages for agent memory:
- Zero configuration: No external database servers required
- Single file: The entire memory store is a single file that can be backed up, moved, or versioned
- Full-text search: SQLite provides built-in full-text search capabilities
- ACID compliance: Memory operations are reliable and consistent
- Performance: SQLite handles thousands of queries per second, more than sufficient for agent memory
The architecture consists of several layers:
Agent Application
↓
Squish API (remember, recall, learn, context)
↓
Memory Router (determines type and routing)
↓
Storage Layer (SQLite with FTS5)
↓
Consolidation Engine (dedup, summarize, prune)
How to Use Squish
Getting started with Squish is straightforward.
Installation
npm install squish-memory
Basic Usage
import { Squish } from 'squish-memory';
const squish = new Squish('./my-project');
// Store a memory
await squish.remember({
content: 'User prefers dark mode and concise responses',
type: 'preference',
user: '[email protected]'
});
// Recall memories
const memories = await squish.recall('user preferences', {
user: '[email protected]',
limit: 5
});
// Learn from an outcome
await squish.learn({
type: 'success',
content: 'Handled edge case in payment processing flow'
});
// Get context before a session
const context = await squish.context({
project: './my-project',
limit: 10
});
Integration with AI Agents
Squish integrates with any AI agent framework. The typical pattern is:
- Before each interaction: Call
squish.context()to load relevant memories - During the interaction: Let the agent use context naturally
- After important events: Call
squish.remember()to capture new information - After outcomes: Call
squish.learn()to record successes and failures - Periodically: Call
squish.consolidate()to optimize the memory store
Memory Types
Squish categorizes memories into six types, each serving a specific purpose:
- Observation: Things the agent noticed during interactions
- Fact: Verified information about users, projects, or systems
- Decision: Choices made and their rationale
- Context: Situational information relevant to interactions
- Preference: User or system preferences
- Note: General information that does not fit other categories
This categorization enables intelligent retrieval. When an agent needs user preferences, it can search specifically for preference-type memories rather than sifting through all stored information.
Use Cases
Customer Support
A customer support agent using Squish remembers every customer interaction. When a customer contacts support again, the agent immediately knows their history, preferences, and previous issues. This eliminates repetitive questions and enables faster resolution.
Measurable impact:
- 40% reduction in average handle time
- 25% improvement in first-contact resolution
- 30% increase in customer satisfaction scores
Sales
A sales agent using Squish maintains context across the entire sales cycle. It remembers prospect preferences, previous conversations, objections raised, and follow-up commitments. Every interaction builds on the last.
Measurable impact:
- 35% increase in conversion rates
- 50% reduction in data entry for sales reps
- 20% improvement in forecast accuracy
Software Development
A development agent using Squish remembers project architecture decisions, coding conventions, bug patterns, and deployment preferences. It builds institutional knowledge that persists across sessions and team changes.
Measurable impact:
- 30% reduction in onboarding time for new team members
- 25% fewer repeated architectural discussions
- 40% faster resolution of recurring issues
Personal Productivity
Individual developers and knowledge workers use Squish to maintain personal context across sessions. It remembers project preferences, coding conventions, research findings, and decision rationale. This eliminates the "where was I?" problem that wastes time at the start of every work session.
Measurable impact:
- 20% reduction in context-switching overhead
- 35% faster resumption of interrupted work
- 15% improvement in decision quality through accumulated context
Open-Source Philosophy
Squish is open-source because we believe memory infrastructure should be accessible to every AI developer, not locked behind proprietary platforms.
The open-source model provides several benefits:
- Transparency: You can inspect exactly how your memory store works
- Customization: Modify the memory system to fit your specific needs
- Community: Benefit from contributions and improvements from other developers
- No vendor lock-in: Your memory data is stored in a format you control
- Cost: Use Squish without licensing fees
We maintain Squish actively, with regular updates, bug fixes, and new features. The project is available on GitHub with comprehensive documentation and examples.
Why SQLite
The choice of SQLite as the storage backend is deliberate. While other memory systems rely on external databases like PostgreSQL or specialized vector stores, Squish uses SQLite for practical reasons:
Deployment simplicity. SQLite requires no server setup, no configuration, and no external dependencies. Deploying Squish is as simple as including a file in your project.
Portability. The entire memory store is a single file. You can back it up, move it, version it, and share it easily.
Performance. For the access patterns typical of agent memory -- frequent reads, infrequent writes, full-text search -- SQLite performs excellently. Benchmarks show sub-millisecond query times for memory retrieval.
Reliability. SQLite is the most widely deployed database engine in the world. It powers applications on billions of devices. Its ACID compliance ensures memory operations are reliable.
Cost efficiency. No database hosting costs. No connection pooling. No infrastructure management. The memory store runs in-process with your application.
Getting Started
The fastest way to evaluate Squish is to install it and try it with a simple use case.
npm install squish-memory
Then integrate it with your existing agent to add memory capabilities. Start with basic remember and recall operations, then expand to learning and context as you see the value.
Contributing
Squish is open-source and welcomes contributions. Whether you want to add features, fix bugs, improve documentation, or share use cases, we appreciate your help.
The project follows standard open-source contribution guidelines:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
Documentation
Full documentation is available in the repository, including:
- Getting started guide
- API reference
- Architecture documentation
- Integration examples
- Best practices
Get Involved
If you are building AI agents and need persistent memory, try Squish. If you have feedback, feature requests, or want to contribute, we welcome your input.
Memory is the missing piece in most AI agent systems. Squish provides that piece as open-source infrastructure that you can use, modify, and share.
Related Resources
- Squish Memory Architecture — deep-dive into the architecture
- How to Build an AI Agent — step-by-step agent implementation guide
- AI Agent Frameworks Compared — framework comparison and selection
Try Squish
Install Squish today and give your AI agents the memory they need to deliver consistently excellent experiences.