Build with Durbl
Python and TypeScript SDKs to add memory, state, and intelligence to any AI application.
Installation
Python
pip install durblTypeScript
npm install @durbl/sdkGet started in 3 steps
Step 1: Install the SDK
pip install durblStep 2: Initialize the client
from durbl import Durbl
client = Durbl(api_key="drbl_your_api_key")Get your API key from the Durbl dashboard after signing up.
Step 3: Write your first memory
client.memory.write(
entity="user/ahmed",
content="Prefers vegetarian food, allergic to nuts",
type="preference",
)
# That's it. Ahmed's AI now remembers this — forever.Complete SDK Reference
Every capability exposed through a simple, typed interface.
Memory Operations
# Write a memory
client.memory.write(entity, content, type, importance=None, metadata=None)# Recall memories relevant to a query
client.memory.recall(entity, query, limit=10)# Get a specific memory by ID
client.memory.get(memory_id)# List all memories for an entity
client.memory.list(entity, type=None, limit=50)# Delete a memory
client.memory.delete(memory_id)State Operations
# Get current state
client.state.get(entity_id)# Update state
client.state.update(entity_id, data, reason=None)# Get state history
client.state.history(entity_id, limit=20)Context Operations
# Build goal-aware context
client.context.build(entity, goal, max_memories=20)# Quick recall without full assembly
client.context.recall(entity, query, limit=5)Lifecycle Operations
# Reinforce a memory
client.lifecycle.reinforce(memory_id, boost=0.1)# Summarize old memories
client.lifecycle.summarize(entity, older_than="30d")# Archive memories
client.lifecycle.archive(memory_id)# Forget memories
client.lifecycle.forget(entity, older_than="90d")Intelligence Operations
# Get signals
client.intelligence.signals(limit=20)# Get patterns
client.intelligence.patterns()# Get memory health for an entity
client.intelligence.health(entity_id)Policy Operations
# Create a policy
client.policies.create(type, rules, target_entity=None)# List policies
client.policies.list()# Delete a policy
client.policies.delete(policy_id)Build something real
Production-ready guides and architectural patterns.
Chatbot with persistent memory
Build a chatbot that remembers users across conversations.
AI agent that learns
Build an agent that stores outcomes and improves its strategies over time.
Multi-user personalization
Add per-user memory and preferences to your AI-powered app.