ContextStore Python SDK
Talk to your ContextStore company brain — compiled memory + agent team — from Python. The SDK is a typed client over your backend's MCP JSON-RPC layer.
Install
pip install contextstore-sdk
Quickstart
import os
from contextstore import ContextStore
client = ContextStore(api_key=os.environ["CONTEXTSTORE_KEY"])
# Remember something
client.memory.add(
content="Board approved usage-based pricing on Sep 12",
metadata={"project": "pricing", "owner": "maya"},
)
# Ask the company brain — with sources
res = client.memory.query("What did we decide about pricing?")
print(res.answer)
print(res.sources)
Local / self-hosted
Point at your own backend (default is the hosted one):
client = ContextStore(
api_key=os.environ["CONTEXTSTORE_KEY"],
base_url="https://contextstore.onrender.com",
)
For local development you can pass a JWT instead of an api_key:
client = ContextStore(token="<jwt>")
Namespaces / methods
| Python | Backend MCP tool |
|---|---|
client.memory.add(...) |
memory_store |
client.memory.query(...) |
memory_recall |
client.memory.log_turn(...) |
log_conversation_turn |
client.context.snapshot() |
get_context_snapshot |
client.context.checkin(...) |
smart_checkin |
client.company.learn(...) |
company_learn |
client.company.map() / .set_map(...) |
company_map |
client.company.review(run=True) |
company_review |
client.company.approve(...) / .reject(...) |
review_propagation |
client.company.pending(...) |
list_propagation_queue |
client.permissions.grant/revoke/list(...) |
permission admin tools |
client.permissions.check_authority(...) |
check_action_authority |
Errors
AuthenticationError— bad/expired/scoped-out API keyApiError— the MCP tool returned an errorContextStoreError— network / transport issues
No external dependencies — uses only the Python standard library.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file contextstore_sdk-0.1.0.tar.gz.
File metadata
- Download URL: contextstore_sdk-0.1.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d070f01a65c180c42f818cfe2e9aa0f208d87fdfbf068e698f92ab62fbe8a202
|
|
| MD5 |
6ed71e565364be55bef7f5b6ee3ebff1
|
|
| BLAKE2b-256 |
347c7925ffc8cd72bc8075a8e7813a54f83983466ebe486ccc30c41e0130eb6d
|
File details
Details for the file contextstore_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: contextstore_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5726922331a9d53cb6e8f9bc7fe161799ddd1d915a7ac49bed4fef84b495ebaf
|
|
| MD5 |
73bff701e797643e5fe5af7dcb442f57
|
|
| BLAKE2b-256 |
dccef3d3987f42934d5b4ffbedc3913111b952b2b1fcd23f2dcaabb0a6f990cb
|