Build with your coding agent
Give your coding agent Oort's developer docs, and it builds memory into your app the way the SDK expects. Paste the prompt below, or install the skill so the agent loads it when you ask for memory.
On this page
Paste this prompt
Paste it into Claude Code, Codex, Cursor, Gemini CLI or any agent that can read a URL. It sends the agent to llms-full.txt and gives it the rules from the oort-sdk skill: memory in the prompt only through formatForPrompt, keys only on the server, one scoped handle per end user, errors by code.
Add Oort memory to this project. Oort is open-source long-term memory for AI agents: the oortmem 0.9.0 package on npm (npm i oortmem, Node.js 22.15 or newer).
First read https://oortcloud.dev/llms-full.txt, or load the oort-sdk skill if it is installed. Use only the names it documents: do not guess a method, option or flag.
Then build it the Oort way:
1. Ask me which mode to use, unless this project already says: local (memory on this machine) or cloud (Oort Cloud, with the key in OORT_API_KEY).
2. Create one handle per process with createOort(), and close it (or use `await using`). In server code pass the options explicitly: mode, home (local), org, project, projectConfig: false and keySources.
3. Before each model call, recall and put formatForPrompt(result) in the system prompt. After answering, observe the turn, and await it before a serverless function returns. Use remember only for facts the user stated or confirmed.
4. Memory reaches a prompt only through formatForPrompt. Never concatenate memory text into a prompt.
5. Keys come from the environment or a secret manager, never from code, a committed config, a prompt or a log line. On a server pass keySources: ['env'].
6. If the app has end users, keep one root handle per tenant (org, never 'local') in trusted server code and give the model only oort.scoped({ user: userId }). A missing user id throws user-missing: do not catch it and fall back. In cloud mode, end users need a server key ("Acts for end users") and oortmem 0.8.0 or newer; with an older oortmem, use local mode.
7. Model-facing code runs in the agent judge role. Use judge: { role: 'expert' } only on a code path where a person really decided.
8. Handle errors by OortError.code. Retry only what is retryable, waiting retryAfter seconds when it is set.
9. Do not send secrets to memory.
When you are done, go through the skill's "Before you finish" list.Add Oort memory to this project. Oort is open-source long-term memory for AI agents: the oortmem 0.9.0 package on PyPI (pip install oortmem, Python 3.10 or newer).
First read https://oortcloud.dev/llms-full.txt, or load the oort-sdk skill if it is installed. Use the native client (from oortmem import Oort, or AsyncOort) and only the names the docs give: do not guess a method, option or flag.
Then build it the Oort way:
1. Ask me which mode to use, unless this project already says: local (memory on this machine; needs Node.js 22.15 and the oort CLI) or cloud (Oort Cloud, with the key in OORT_API_KEY; no Node).
2. Create one handle per process with Oort(...), and close it (or use `with Oort(...) as oort:`). In server code pass the options explicitly: mode, org (local), project and project_config=False.
3. Before each model call, recall and put format_for_prompt(result) in the system prompt. After answering, observe the turn. Use remember only for facts the user stated or confirmed.
4. Memory reaches a prompt only through format_for_prompt. Never concatenate memory text into a prompt.
5. Keys come from the environment or a secret manager, never from code, a committed config, a prompt or a log line. On a server set OORT_NO_KEYCHAIN=1.
6. If the app has end users, keep the root handle in trusted server code and give the model only oort.scoped(user=user_id). A missing user id is refused: do not fall back. In cloud mode, end users need a server key ("Acts for end users") and oortmem 0.8.0 or newer; with an older oortmem, use local or remote mode.
7. Model-facing code runs in the agent judge role. Use judge_role="expert" only where a person really decided.
8. Handle errors by OortError.code. Retry only what is retryable, waiting retry_after seconds when it is set.
9. Do not send secrets to memory.
When you are done, go through the oort-sdk skill's "Before you finish" list.The agent asks you for the mode if your project does not say. Local keeps memory on your machine; cloud uses Oort Cloud and your Oort key. See the TypeScript SDK or Python for what each needs.
Install the skill
The oort-sdk skill is the same guidance as an Agent Skill: a SKILL.md and references the agent reads only when it needs them. Once installed, the agent loads it when you ask for memory in an app, with no prompt to paste. It adds no hooks and no MCP server; for memory in your own sessions, see the Quickstart.
Claude Code
claude plugin marketplace add oortmem/oort
claude plugin install oort-dev@oortmemOr inside a session:
/plugin marketplace add oortmem/oort
/plugin install oort-dev@oortmemClaude loads the skill when you ask it to add memory to an app; /oort-dev:oort-sdk runs it by name.
Codex
codex plugin marketplace add oortmem/oort
codex plugin add oort-dev@oortmemOr open /plugins in Codex and install oort-dev from the Oort marketplace. Mention it with $oort-sdk, or let Codex pick it from the task.
Cursor, Gemini CLI and other agents
Copy the skill folder into your repository's .agents/skills/ directory. Cursor and Gemini CLI both load skills from there.
src="$(mktemp -d)" && git clone --depth 1 https://github.com/oortmem/oort "$src"
mkdir -p .agents/skills && cp -R "$src/skills/oort-sdk" .agents/skills/Or use the skills installer, which knows each agent's directory: npx skills add oortmem/oort --skill oort-sdk. A copy does not update itself: copy it again after you upgrade oortmem. The skill's README lists the other directories.
llms.txt
For agents and tools that read the llms.txt format, the same docs are plain markdown, generated from the oortmem 0.9.0 release, so they match the packages on npm and PyPI:
- llms.txt: the index, with a link to each file.
- llms-full.txt: the oort-sdk skill and its references, the TypeScript and Python guides and the API reference, in one file.
- The oort-sdk skill on GitHub, where every code block is a tested example.