Dev.to AI šŸ¤– Ai šŸ‘ 0 šŸ“– 1 min read

chatstore – persistent chat history service for LLM apps, zero infrastructure

šŸš€ I just open-sourced chatstore — a lightweight, framework-agnostic persistent chat library for LLM applications. If you've ever built an AI assistant or agent, you know the pain: → Where do I store conversation history

chatstore – persistent chat history service for LLM apps, zero infrastructure


šŸš€ I just open-sourced chatstore — a lightweight, framework-agnostic persistent chat library for LLM applications.

If you've ever built an AI assistant or agent, you know the pain:
→ Where do I store conversation history?
→ How do I feed a sliding window to the LLM without blowing the context limit?
→ How do I retrieve relevant past context without spinning up a server?

Most solutions either lock you into a framework (LangChain), require Docker + a running server (Zep), or need an LLM call just to store a memory (Mem0).

chatstore does none of that.

āœ… One class. Zero infrastructure.
āœ… Works with any LLM — OpenAI, Gemini, Anthropic, Ollama, anything
āœ… Persistent history backed by SQLite (swappable to Postgres)
āœ… Sliding window context — configurable, token-aware
āœ… Optional semantic search with local embeddings (no API key needed)

š—©š—²š—æš˜€š—¶š—¼š—» šŸ­ — drop in and go:
pip install chatstore

š—©š—²š—æš˜€š—¶š—¼š—» šŸ® — add vector memory with one flag:
pip install chatstore[semantic]

Start using it in 3 lines:

from chatstore import ChatService
chat = ChatService(project_id="my_app")
chat.save_message("user", "Hello!")

That's it. No config files. No environment setup. No servers.

šŸ”— GitHub → https://github.com/namankr/chatstore

If this saves you even an hour of boilerplate work, drop a ⭐ on the repo — it genuinely helps more developers discover it.

And if you're building something with LLMs, I'd love to hear what you're working on. Drop a comment or DM me šŸ‘‡

OpenSource #Python #LLM #AI #GenAI #MachineLearning #Developer #BuildInPublic #ArtificialIntelligence #ChatGPT #Gemini

šŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.