AgentOps + BotWire: Observability + Durable State
Free · Open source (MIT) · Works with LangChain, CrewAI, AutoGen · No signup
AgentOps gives you excellent observability into your agent's execution traces, but it doesn't solve persistent state. When your agent needs to remember data between sessions, restarts, or different processes, you need durable memory that survives beyond AgentOps' ephemeral session tracking. BotWire provides exactly that — persistent key-value storage that complements your existing AgentOps monitoring.
The AgentOps Memory Gap
AgentOps excels at capturing what happened during a session, but sessions are temporary by design. Your agent might need to remember user preferences, previous conversation context, or learned facts that persist across multiple AgentOps sessions. Without persistent storage, your agents start fresh every time.
Here's the typical pain: your agent learns that "user-42 prefers concise responses" during one session, AgentOps dutifully logs this interaction, but when the user returns tomorrow, that preference is gone. Your agent asks the same questions, makes the same mistakes, and provides a frustrating experience. You're monitoring everything perfectly with AgentOps, but you're not retaining anything meaningful between sessions.
This gets worse with multi-agent systems where agents need to share state, or with agents that run across different processes or machines. AgentOps shows you what each agent did, but doesn't help them coordinate through shared memory.
The Fix: BotWire for Persistent State
Install BotWire alongside your existing AgentOps setup:
pip install botwire
Add persistent memory to your agent:
from botwire import Memory
import agentops
# Your existing AgentOps setup
agentops.init()
# Add persistent memory
memory = Memory("user-preferences")
@agentops.record_function("get_user_preference")
def get_user_preference(user_id: str, key: str):
return memory.get(f"{user_id}:{key}")
@agentops.record_function("save_user_preference")
def save_user_preference(user_id: str, key: str, value: str):
memory.set(f"{user_id}:{key}", value)
# Now your agent remembers across sessions
user_style = get_user_preference("user-42", "response_style") or "detailed"
How BotWire Memory Works
BotWire provides a simple key-value store that persists data beyond your AgentOps sessions. The Memory("namespace") call creates an isolated storage space — think of it as a persistent dictionary that survives process restarts.
The API is intentionally minimal:
memory.set(key, value)stores datamemory.get(key)retrieves data (returnsNoneif missing)memory.delete(key)removes datamemory.list_keys()shows what's stored
Keys and values are strings, but you can store JSON for complex data:
import json
from botwire import Memory
memory = Memory("agent-state")
# Store complex data
user_context = {
"preferences": {"style": "concise", "topics": ["tech", "science"]},
"history_summary": "Discussed Python performance optimization",
"last_seen": "2024-01-15T10:30:00Z"
}
memory.set("user-42", json.dumps(user_context))
# Retrieve and use
stored_data = memory.get("user-42")
if stored_data:
context = json.loads(stored_data)
print(f"Welcome back! Last time we talked about {context['history_summary']}")
The memory persists across processes and machines — perfect for distributed agent systems where different components need shared state. Your AgentOps traces will show the memory operations, giving you full observability into both execution and state changes.
Data has no automatic expiration (TTL), so you control lifecycle. Use memory.delete() to clean up when appropriate, or memory.list_keys() to audit what's stored.
Integration with AgentOps Monitoring
BotWire operations appear in your AgentOps traces when you wrap them with decorators, giving you complete visibility into both execution flow and state management:
import agentops
from botwire import Memory
agentops.init()
memory = Memory("conversation-state")
@agentops.record_function("load_conversation_context")
def load_conversation_context(session_id: str):
context = memory.get(f"conversation:{session_id}")
return json.loads(context) if context else {"messages": [], "topic": None}
@agentops.record_function("save_conversation_context")
def save_conversation_context(session_id: str, context: dict):
memory.set(f"conversation:{session_id}", json.dumps(context))
# Your AgentOps dashboard now shows both execution traces
# AND the persistent state operations
agentops.start_session()
context = load_conversation_context("sess-123")
# ... agent processing ...
context["messages"].append({"role": "assistant", "content": "How can I help?"})
save_conversation_context("sess-123", context)
agentops.end_session("Success")
When NOT to Use BotWire
BotWire isn't the right choice for:
• Vector search or semantic memory — it's key-value only, not a vector database for embeddings or similarity search • High-throughput applications — the free tier caps at 1000 writes/day per namespace, and network latency adds overhead • Sub-millisecond latency requirements — HTTP round-trips make it slower than in-memory caches for real-time use cases
FAQ
Why not just use Redis or a database? BotWire requires zero setup — no servers, no connection strings, no authentication. It's designed for prototyping and small-scale production where you want persistent state without infrastructure overhead.
Is this actually free? Yes, permanently. 1000 writes per day per namespace, 50MB storage per namespace, unlimited reads. No credit card, no trial expiration.
What about data privacy? Data is stored on BotWire's servers by default. For sensitive data, self-host the open-source version — it's a single FastAPI service with SQLite.
BotWire fills the gap between AgentOps' excellent observability and your agent's need for persistent memory. Install it alongside your existing setup and start retaining state across sessions.
pip install botwire
Try it at botwire.dev — no signup required.