┌─────────────────────────────────────────────────────────┐│ GLOBAL ││ Visible to ALL agents, ALL projects ││ Use for: Company-wide best practices │├─────────────────────────────────────────────────────────┤│ AGENT-SHARED ││ Visible to specified agents ││ Use for: Team knowledge, project context │├─────────────────────────────────────────────────────────┤│ AGENT-PRIVATE ││ Visible only to the creating agent ││ Use for: Working notes, draft reasoning │└─────────────────────────────────────────────────────────┘
# Private - only this agent sees itclient.add("My working notes", scope="agent-private")# Shared - specific agents can see itclient.add("Task breakdown", scope="agent-shared", shared_with_agents=["executor", "reviewer"])# Global - everyone sees itclient.add("Always use type hints", scope="global")
# Store user-specific preferenceclient.add("Prefers dark mode", user_id="user_123")# Retrieve for that usercontext = client.query("preferences", user_id="user_123")
# Define what "done" meansclient.features.create("user-auth", test_steps=["Can login", "Can logout", "Token expires correctly"])# Only mark complete after verificationclient.features.mark_complete("user-auth", verified_by="tester")
Runs track agent task execution end-to-end, linking memories used to outcomes:
# Start a run before executing a taskrun = client.start_run("task-42", "executor", memory_ids_used=["m1", "m2"])# Complete with outcome -- auto-votes and auto-reflectsclient.complete_run("task-42", success=True, evaluation={"score": 0.95})
On success, memories used get “helpful” votes. On failure, they get “harmful” votes and a reflection memory is created automatically.