Quickstart
Store and recall your first memory in under two minutes.
Install
pip install orecloudSign in and create a store
orecloud login --host https://<your-orecloud-host>
orecloud store create user-42 --expose-textstore create registers a cloud-writer store (server-side embeddings, the
minilm preset by default), mints a secret key scoped to it, and prints a
ready-to-run snippet. --expose-text lets reads return stored text — you
want it for memory workloads, since context_block and get return text.
Without it, keys can rank results but never read payload back.
Put the printed credentials in your environment:
export ORECLOUD_HOST="https://<your-orecloud-host>"
export ORECLOUD_TOKEN="ore_sk_..."Store and recall
import orecloud
client = orecloud.Client() # org + environment come from the key
memory = client.store("user-42") # one store per end user
memory.add("likes hiking near Seattle")
context = memory.context_block("plan my weekend")
print(context)A few things happened implicitly:
- No create step per user.
client.store(name)makes no HTTP call, and a store that doesn't exist yet is provisioned by its first write. A new end user is just a new store name. - The write is durable when
addreturns. Writes are accepted asynchronously (durable and ordered), then folded into the index within seconds. - Read-your-writes. A search from this handle waits for this handle's
own writes to become visible, so the
context_blockcall already reflects theaddabove.
Search
search is classic top-k retrieval; recall takes a whole raw user
message and lets the server derive sub-queries:
hits = memory.search("outdoor plans", k=5)
for score, id, metadata in hits:
print(score, id, metadata)
hits = memory.recall("what should I do this weekend?")