← Back to Blogs
HN Story

Kept: Building a Local-First Knowledge Base from AI Conversations

May 9, 2026

Kept: Building a Local-First Knowledge Base from AI Conversations

For many of us, AI chat interfaces have become a primary form of "working memory." We use them to trace debugging paths, draft research notes, refine product decisions, and store snippets of code. However, this valuable intellectual history is typically locked inside proprietary vendor UIs, making it difficult to search across different platforms or integrate into a broader personal knowledge management (PKM) system.

Kept is an open-source, local-first agentic knowledge manager designed to solve this problem. By extracting conversations from multiple AI providers and storing them as plain Markdown files on your own machine, Kept transforms ephemeral chat history into a permanent, searchable, and owner-controlled archive.

The Architecture of Local-First Archiving

Kept employs a three-tier architecture to move data from the cloud to your local disk without relying on fragile web scraping of rendered pages.

1. The Chromium Extension

Instead of scraping the DOM, the browser extension intercepts conversation data directly from provider API endpoints using the user's signed-in session. It normalizes the messages and image assets from various providers—including ChatGPT, Claude, Gemini, Grok, and Kimi—and transmits the payload to a local server.

2. The Desktop Application

Built with Tauri 2 (React frontend and Rust backend), the desktop app acts as the central hub. It receives data from the extension via a local server (http://localhost:18241) and performs several critical functions:

  • Vault Management: Writes conversations as Markdown files with YAML frontmatter to ~/.kept/vault/.
  • Indexing: Uses SQLite FTS5 for high-performance full-text search.
  • Knowledge Graph: Builds a local knowledge graph using CozoDB to visualize connections across disparate conversations.

3. The MCP Server

To make the archive "agentic," Kept includes a Model Context Protocol (MCP) server. This allows AI coding agents (like Claude Code or OpenClaw) to programmatically list, read, search, and manage the vault, effectively giving the agent access to your historical AI interactions as a context source.

Why Markdown Files Over a Database?

One of the most significant design choices in Kept is the use of an Obsidian-compatible Markdown vault as the source of truth. While a database might offer faster initial queries, the file-based approach provides several long-term advantages:

  • Interoperability: The vault can be opened directly in VS Code, Obsidian, or any text editor.
  • Future-Proofing: Because the data is stored in plain text, the archive remains readable even if the Kept application is deprecated or if provider APIs change.
  • Recoverability: Search and graph databases are treated as caches; they can be entirely rebuilt from the Markdown files at any time.

Privacy and Security

In an era of cloud-syncing everything, Kept takes a strict local-first stance:

  • No Cloud Sync: There are no hosted accounts or cloud backups. All data stays in ~/.kept/.
  • Local Communication: The extension communicates with the desktop app over localhost using a per-install bearer token.
  • Configurable Intelligence: Optional features like topic discovery and chat-over-archive can be routed through the user's chosen provider or a local Ollama server for complete privacy.

Challenges and Considerations

While Kept provides a powerful way to reclaim AI history, it faces the inherent challenges of relying on private provider APIs. As noted by the community, these connections can be fragile because they rely on undocumented endpoints that vendors may change without notice.

However, by prioritizing the Markdown vault as the primary storage layer, Kept mitigates the risk of data loss. Even if a provider adapter breaks, the conversations already saved to the local disk remain intact and accessible.

Getting Started

Kept is MIT licensed and available for macOS, Windows, and Linux. Installation typically involves running a quick-install script that sets up the desktop app and provides the Chromium extension for manual loading in Developer Mode. For those looking to integrate their archive into their AI workflow, the MCP server can be installed via a one-line script, enabling agents to grep_vault or read_file directly from your historical AI knowledge base.

References

HN Stories