Add Unison to a Python Agent - SDK Quickstart
Give your Python agent persistent team memory with the unisonlabs package: pip install, first search, and the write-back loop.
Learn how to give your Python agent persistent team memory using the Unison SDK.
1. Install and authenticate
pip install unisonlabs
export UNISON_TOKEN=usk_live_...2. Search and write
from unisonlabs import UnisonBrain
client = UnisonBrain() # reads UNISON_TOKEN
results = client.search("architecture decisions", limit=5) # hybrid search
doc = client.write("/private/notes/session-42.md", "# Learned\n- queue moved to pgmq")
doc2 = client.get("/private/notes/session-42.md")
print(doc2.body)
client.close()Both sync and async clients ship (httpx-powered); Python 3.9+.
3. Prompt-ready recall
For fused, prompt-ready memory use context — one call returns a markdown block ready to inject, with a weak_evidence flag for when the brain has nothing confident to offer:
ctx = client.context("payment service architecture")
memory = "" if ctx.weak_evidence else ctx.context_mdNext: LangGraph integration, CrewAI integration, or the API reference.
TypeScript SDK
Install @unisonlabs/sdk and use the complete, typed brain surface from TypeScript or Bun: context recall, ingest, documents, the knowledge graph, and actor delegation.
Python SDK
The unisonlabs package: sync and async clients (httpx), environment configuration, and the brain surface from Python 3.9+.