Quickstart
Call Korely from your own code — any language over REST, or Python and Node
via pip install korely-memory / npm install
korely-memory. The path for building persistent memory into an app,
an agent, or a backend.
Prerequisites. Python 3.9+, Node.js 18+, or any HTTP
client for the REST API. You'll mint a free kor_live_ key in
step 2 — one command, no signup form.
REST API & Python SDK
1. Install
pip install korely-memory
The Python and Node SDKs are thin, zero-dependency clients over the REST
API — same package name (korely-memory) on
PyPI and
npm. Every method
maps 1:1 onto an endpoint in the
REST API reference.
2. Get an API key
The fastest way is one command. pip install korely-memory ships
the korely CLI; korely init --agent mints a free
Hobby key (kor_live_…) and saves it locally, so the CLI works
immediately. Any language can mint one over REST instead:
korely init --agentSee Sign up as an agent for the full flow. To call Korely from the Python or Node SDK (rather than the CLI), set the key as an environment variable — the SDK reads it automatically:
export KORELY_API_KEY=kor_live_...3. Your first memory
from korely_memory import Korely
korely = Korely() # reads KORELY_API_KEY from the environment
# Remember something your agent learned about an end userkorely.add( "Maria prefers email over Slack, and her renewal is in October.", user_id="customer-4812",)
# Later — even in a new session — pull a prompt-ready block backctx = korely.get_context( query="how does Maria like to be contacted?", user_id="customer-4812",)print(ctx.context) # drop straight into your system prompt
That's the whole loop: add to remember,
get_context (or search) to recall. Behind
add, Korely extracts typed, bi-temporal facts and builds a
graph — you just hand it text.
4. Search, and see what comes back
get_context is the recall path you'll reach for most — it
assembles the active typed facts Korely extracted into a block you drop
straight into a prompt. When you'd rather inspect raw ranked hits,
search runs a semantic vector search and returns memories
ordered by relevance score:
hits = korely.search("contact preference", user_id="customer-4812")for h in hits: print(h.score, h.snippet)5. What you can do
The SDK has fifteen methods, each mapping to one REST endpoint. The headlines (the full list is in the SDK reference):
| Method | What it does |
|---|---|
add(content, user_id=…) | Remember something — extracts typed facts. |
get_context(query, user_id=…) | The primary recall path — assembles active typed facts into a prompt-ready block. |
search(query, user_id=…) | Semantic vector search over memories — ranked raw hits. |
get_facts(user_id=…, as_of=…) | Typed facts, point-in-time with as_of. |
get_profile(user_id=…) | Everything known about one end user. |
add_fact_triple(s, p, o) | Write a fact directly, skipping extraction. |
update / delete / delete_all | Edit, forget one, or forget every memory for a user (GDPR). |
history(id) / users() | A memory's timeline; the end users you store data for. |
batch(...) | Bulk import, for migrating from another store. |
Full detail with examples: the SDK reference and the REST API reference. Limits per plan are on the pricing page.
Next steps
You're up and running. Where to go from here:
- Explore the full SDK surface: the SDK reference covers all methods with examples for Python and Node.
- Use the REST API directly: the API reference documents every endpoint, request body, and response shape.
- Understand how memory works: read the memory model to learn how Korely extracts facts, builds a graph, and handles contradictions over time.
- Wire it into a framework: the integrations index has step-by-step guides for AI SDK, LangGraph, n8n, and OpenClaw.
- Use the CLI: the
CLI reference covers
korely add,korely search,korely context, and the other subcommands — useful for scripts and one-off queries.
Stuck somewhere? Email [email protected] — every message gets read and answered within a day, and your feedback shapes what gets fixed first.