Sdk python

Python SDK

The unisonlabs package: sync and async clients (httpx), environment configuration, and the brain surface from Python 3.9+.

python-sdk

The official Python SDK - pip install unisonlabs. Sync and async clients included, powered by httpx, Python 3.9+.

from unisonlabs import UnisonBrain

client = UnisonBrain()                                          # reads UNISON_TOKEN
ctx = client.context("payment service architecture")           # prompt-ready recall
results = client.search("architecture decisions", limit=5)     # raw ranked hits
doc = client.write("/private/notes/my-note.md", "# Note\n...")
doc2 = client.get("/private/notes/my-note.md")
print("" if ctx.weak_evidence else ctx.context_md)
client.close()

Environment

VariableDefaultDescription
UNISON_TOKENrequiredyour usk_live_... API key
UNISON_API_URLhttps://brain.unisonlabs.aioverride to target another backend

Async

The async client mirrors the sync surface - use it inside agent frameworks' event loops (see the LangGraph and CrewAI pages for the recall/write-back pattern).

Start with the Python quickstart; the full HTTP contract is the Brain API reference.

On this page