BotWire Memory vs Pinecone: When to Use Which

Free · Open source (MIT) · Works with LangChain, CrewAI, AutoGen · No signup

Choosing between agent key-value storage like BotWire Memory and vector databases like Pinecone is confusing developers daily. You need persistent agent memory but aren't sure if vector search justifies the complexity. This comparison cuts through the noise with concrete examples and decision criteria.

The Problem: Vector DB Overkill for Simple State

Most agents need basic persistent memory — remembering user preferences, conversation context, or workflow state. Developers reach for vector databases because they're familiar, but end up with unnecessary complexity.

Consider a customer service bot that needs to remember a user's account number, previous issues, and preferred communication style. You don't need semantic similarity search across thousands of embeddings. You need: "What's user-42's account number?" and "Did they already report this billing issue?"

Vector databases excel at finding semantically similar content, but require embedding models, dimension tuning, and similarity thresholds. For simple key-value persistence across agent restarts, they're architectural overkill that slows development and increases operational overhead.

The Fix: Simple Key-Value Memory

BotWire Memory provides persistent agent storage without vector complexity. Install and store data in three lines:

pip install botwire
from botwire import Memory

# Persistent memory that survives restarts
memory = Memory("customer-bot")
memory.set("user-42-account", "ACC-789012")
memory.set("user-42-issues", ["billing", "login-failed"])

# Later (different process, different machine)
account = memory.get("user-42-account")  # "ACC-789012"
issues = memory.get("user-42-issues")    # ["billing", "login-failed"]

This data persists across process restarts and different machines. No embeddings, no similarity search, just reliable key-value storage.

How It Works

The Memory class connects to BotWire's HTTP API with automatic namespacing. Each namespace is isolated — your "customer-bot" data won't conflict with "sales-bot" data.

from botwire import Memory

# Different namespaces for different use cases
customer_memory = Memory("customer-support")
sales_memory = Memory("lead-qualification")

# Store complex objects (JSON serialized automatically)
customer_memory.set("user-profile", {
    "name": "Alice Chen",
    "tier": "premium",
    "last_contact": "2024-01-15",
    "preferences": {"email_updates": False, "sms_ok": True}
})

# List all keys in namespace
keys = customer_memory.list()  # Returns all keys as list
print(f"Stored keys: {keys}")

# Delete when needed
customer_memory.delete("old-session-data")

Data persists indefinitely until explicitly deleted. The free tier provides 1000 writes per day per namespace with unlimited reads — sufficient for most agent workloads.

Cross-process access works seamlessly. Your web API can store user context, then your background job agent can read it later. No shared databases or message queues required.

LangChain Integration

BotWire integrates directly with popular agent frameworks through purpose-built adapters:

from botwire import BotWireChatHistory
from langchain.memory import ConversationBufferMemory
from langchain.llms import OpenAI

# Chat history that persists across sessions
chat_history = BotWireChatHistory(session_id="user-42")

# Use with LangChain memory
memory = ConversationBufferMemory(
    chat_memory=chat_history,
    return_messages=True
)

# Your conversation history survives app restarts
llm = OpenAI()
# ... rest of your LangChain setup

The session_id becomes your namespace key. Each user gets isolated conversation history that persists across sessions without additional configuration.

When NOT to Use BotWire

FAQ

Why not Redis or PostgreSQL? Redis requires server management and loses data on restart without persistence config. PostgreSQL needs schema management. BotWire works immediately with zero setup.

Is this actually free? Yes. 1000 writes/day per namespace, 50MB storage, unlimited reads. No credit card, no trial period, no surprise bills.

What about data privacy? Self-host the open source version (MIT license, single FastAPI + SQLite service) if you need full data control. The hosted version at botwire.dev uses standard HTTPS encryption.

BotWire Memory solves the 80% case where agents need simple persistent state without vector search complexity. pip install botwire and try it at https://botwire.dev.

Install in one command:

pip install botwire

Start free at botwire.dev