curu-memory
What is this
curu-memory is a shared knowledge base for ComfyUI and generative media. It reads OKF concept files about workflows, models, parameters, prompt techniques and findings. Then it indexes them and serves them to agents through MCP and to persons through a command. An agent can search the knowledge, read a concept and follow its links to related concepts. An agent can also propose a new concept. A person with maintain, or another agent with a grant of maintain, reviews and merges it. The global knowledge stays in plain Markdown files that you keep in git. The files of a private space are encrypted in git.
What you can do
| Task | Command | Section |
|---|---|---|
| Understand the parts, the flows and where each file is | Read the diagrams | How curu-memory works |
| Set up one computer from start to end | Follow the tutorial | Tutorial: set up curu-memory on one computer |
| Run the curu-vision service at each login on macOS | launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/local.curu-vision.plist |
Run the embedder as a service |
| Keep the settings of each shell in one file | . ~/.config/curu-memory/env |
Keep the settings in a file |
| Check each function of a setup by hand | Follow the test plan | Check each function by hand |
| Write a concept for the index | Add <name>.md with front matter |
Write a concept file |
| Start a concept file from a template with each provenance key | curu-memory concept new a-short-claim |
Start a concept from a template |
| Give each concept a proof that a reader can reproduce | Add an evidence list to the front matter |
Give a proof for each concept |
| Check concept files before you index them | curu-memory validate knowledge |
Check concept files |
| Add a concept by a commit, a proposal or an edit of an encrypted space | Follow the how-to | Add a concept to a space |
| Refuse the host of your own repositories in the sources | export CURU_MEMORY_SOURCES_NO_HOST=github.com/me/ |
Refuse the host of your own repositories in the sources |
| Add images, audio and video to a concept | Add a media: list to the front matter |
Add media to a concept |
| Build the index from your concept files | curu-memory index --concepts ./knowledge |
Index your knowledge |
| Keep team notes and personal notes apart from the global knowledge | curu-memory index --space personal/me |
Keep team and personal knowledge apart |
| Keep the team and the personal spaces encrypted on disk | curu-memory key new ~/.config/curu-memory/kek |
Keep private knowledge encrypted |
| Let only your SSH key open the key file | curu-memory key new ~/.config/curu-memory/kek --protect --ssh-key ~/.ssh/id_ed25519.pub --issuer URL |
Protect the key file with your SSH key |
| Open the key file after the loss of your SSH key | curu-memory key recover --ssh-key ~/.ssh/new_id_ed25519.pub --issuer URL |
Recover the key file |
| Replace a plain key file with a protected key file | curu-memory key protect --old OLD --new NEW --ssh-key PUB --issuer URL |
Protect an existing key file |
| Encrypt the concept files of a private space for git | curu-memory space encrypt --space team/look ./look-plain ./look |
Encrypt the concept files of a private space |
| Edit an encrypted space with any editor, and commit the change | curu-memory space checkout --space team/look ./look |
Edit an encrypted space |
| Log in to a server for an edit through the server | curu-memory login --server https://memory.example.com |
Edit a space through the server |
| Edit an encrypted space with no key file, through the server | curu-memory space checkout --space team/look --server https://memory.example.com ./look |
Edit a space through the server |
| Sign the commits of an encrypted space | Set CURU_MEMORY_ALLOWED_SIGNERS |
Sign the commits of an encrypted space |
Read the plaintext changes of an encrypted space in git diff and git log -p |
curu-memory git install |
Read the diff of an encrypted space |
| Resolve a merge conflict of an encrypted space | curu-memory space checkout --space team/look --merge ./look |
Resolve a merge conflict of an encrypted space |
| Merge two branches of an encrypted space | git merge -S other |
Merge the branches of an encrypted space |
| Stop a push that puts plaintext into an encrypted space | curu-memory space hook install |
Check the commits before a push |
| Remove the plaintext of a space from the git history | git filter-repo --invert-paths --path look-plain |
Rewrite the plaintext history |
| Change the key of the private spaces while the server answers | curu-memory key rotate --old OLD --new NEW |
Rotate the key |
| Encrypt a space again under a new space key, after a leak | curu-memory space rekey --space team/look ./look |
Rekey an encrypted space |
| Give each person their own spaces, and see who reads which space | curu-memory access person add me |
Give each person their own spaces |
| Connect agents with tokens of Authentik or of the shipped rauthy | Set CURU_MEMORY_OIDC_ISSUER |
Connect agents with OIDC tokens |
| Give a second person the role to review proposals | curu-memory access role set ada --space global --role maintain |
Give a person a role for review |
| Stop knowledge that skipped review from reaching search | curu-memory access protect global |
Protect the global space |
| Give an agent a role in one space for some days | curu-memory access grant scout --space team/look --role read |
Give an agent its own access |
| Let an agent merge proposals under its own name | curu-memory proposal merge <id> --grant 7 |
Let an agent merge proposals |
| Search the knowledge from a terminal | curu-memory search "VAE for WAN2.2 5B" |
Search the knowledge |
| Give the knowledge to a local agent | curu-memory serve |
Connect a local agent |
| Give the knowledge to a remote agent | curu-memory serve --transport http |
Connect a remote agent |
| Run curu-memory, rauthy, an embedder and a TLS proxy on a server with Docker Compose | deploy/stack/init.sh |
Deploy the stack with TLS |
| Search with an image, a clip or a video, for example an output of a workflow | curu-memory search --media output.png |
Search with media |
| Search by meaning with the curu-vision model service | Set CURU_MEMORY_EMBEDDER_URL and CURU_MEMORY_EMBEDDER_TOKEN |
Use the curu-vision model service |
| Search by meaning with an OpenAI-compatible server | Set CURU_MEMORY_EMBEDDER_PROTOCOL=openai |
Search by meaning |
| Browse the knowledge in a web browser | curu-memory browse |
Browse the knowledge |
| Review, merge and close proposals in a web browser, also from a phone | Open /review of curu-memory browse |
Review a proposal in the browser |
| Read a concept and its links | The get_concept and concept_neighbours tools |
Read a concept and follow its links |
| Let an agent propose a new concept for review | The propose_concept tool |
Propose a concept |
| Let an agent propose a change of a concept for review | The read_concept_file and propose_change tools |
Propose a change of a concept |
| Let an agent propose many new or changed concepts for one review | The propose_batch tool |
Propose many concepts in one batch |
| Let an agent keep notes of its work in your personal space, out of the knowledge | The write_scratch_note tool |
Keep scratch notes of an agent |
| Close a proposal that nobody will merge | curu-memory proposal close <id> |
Close a proposal |
Move a concept to a team space or to global, for review |
curu-memory proposal move <id> --from personal/me --to global |
Move a concept to a wider tier |
| Review a proposal and merge it into the knowledge | curu-memory proposal merge <id> |
Review and merge a proposal |
| Add the missing author, confidence, tier and date to old concepts | curu-memory proposal complete --space global --author <handle> --confidence <map> |
Complete the provenance of old concepts |
| Find why a call failed | The code of the error |
Handle errors |
| Build and read the knowledge from a Python program | curu_memory.open_knowledge() |
Use curu-memory from Python |
| Propose a concept, a change or a move from a Python program | knowledge.propose_concept("global", "tiled-vae", text) |
Write through the library |
| Find the person or the agent of an OIDC subject from a Python program | knowledge.principal_for_subject(issuer, subject) |
Find the principal of an OIDC subject |
| Test a program that writes, with no server | git init -b main /tmp/kb |
Test a program that writes |
Install
You need Python 3.12 or later and uv.
uv tool install "curu-memory[server] @ git+https://github.com/darth-veitcher/curu-memory"
This installs the curu-memory command with the server extra. serve and browse need the extra. Without it, index, search and access work, and serve and browse stop with exit code 78.
To install a release from PyPI, give a version range:
uv tool install "curu-memory[server]>=0.10,<0.11"
A program that uses curu-memory as a library pins a range in its pyproject.toml, with no extra. A new minor version can change the Python API or the MCP tools, so the range stops before the next minor version.
Quickstart
This example makes one concept, indexes it, searches it, and gives it to Claude Code. Make a directory for your concept files:
mkdir -p knowledge
Save this text as knowledge/wan22-5b-vae.md:
---
type: Model Component
title: WAN2.2 5B VAE
description: "The VAE that the WAN2.2 5B model loads."
tags: [vae, wan]
status: verified
sources:
- id: the-card
resource: https://huggingface.co/Wan-AI
author: person:owner
last_modified: "2026-10-01"
evidence:
- id: the-template
kind: source
url: https://github.com/Comfy-Org/workflow_templates
commit: a8bc07a76478dfada740fa8fa49ac87be1bff519
path: templates/video_wan2_2_5B_ti2v.json
lines: 93-134
---
The [WAN2.2 5B family](./wan22-5b.md "USES_COMPONENT") loads this VAE.
## Settings
Use the `wan2.2_vae.safetensors` file.
Then index the directory and search it:
curu-memory index --concepts ./knowledge
curu-memory search "VAE for WAN2.2 5B" --limit 5
The first command prints a report. skipped: 0 means that each concept file is in the index. broken links: 1 means that wan22-5b.md is not in the directory yet. The second command prints the concept, with its sources.
Then give the knowledge to Claude Code:
claude mcp add curu-memory -- curu-memory serve
The server reads the index in the same data directory as the index command. Claude Code can now use the search_knowledge, search_knowledge_by_media, get_concept and concept_neighbours tools.
Write a concept file
A concept file is a Markdown file with YAML front matter between two --- lines. The file in the Quickstart is an example. The front matter must have description. It must also have evidence, a proof, unless the file is a scratch note. type, title, tags, sources, status, media, tier, confidence, date, author and agent are optional for the index. A proposal and an edit of an encrypted space need some of them: see Call the tool and Give a proof for each concept.
- The identifier of a concept is its file name without
.md. In the example, it iswan22-5b-vae. - A missing
titlebecomes the identifier. A missingtypebecomesUntyped, and the index report gives a warning. - A link to another concept is a Markdown link to its
.mdfile. Its title in quotes is the link kind. - The link kinds are
USES_COMPONENT,HAS_TURBO_VARIANT,SAME_LINEAGE_AS,SHARES_CLIP_TYPE_LABEL_WITH,EVIDENCED_BY,SHARES_GUARD_CONVENTION_WITH,DISTINCT_FAILURE_CLASS_FROM,RETRACTS_CLAIM_INandINSTANCE_OF_FAMILY. INSTANCE_OF_FAMILYlinks a concept to a concept of the typeArchitecture Family, for example a ComfyUI workflow template to the family of its models.validatedoes not check the type of the target.- A link resolves by file name in all the subdirectories, so two concept files must not have the same name.
- Write each
##heading for one topic. Search by meaning compares each section separately. - A section of more than 30,000 characters becomes parts. The index cuts it at the end of a paragraph, else of a sentence, else at 30,000 characters. Each later part starts with the heading line of its section, and gets the slug
<slug>-part-<n>. The match of meaning for a concept is the best score of its units, so a concept with more parts does not rank higher. - When the curu-vision service refuses a part as too long, the index cuts that part in two and sends the two parts again. A part of fewer than 1,000 characters that the service refuses stops the index run with the error
embedder_failed, and the old index stays.
Start a concept from a template
Write the template of a new concept. Then fill it in with any editor:
curu-memory concept new a-short-claim --type "Engineering Finding" --dir knowledge
- The command writes
knowledge/a-short-claim.md. The identifier is also the file name. Use 1 to 128 lowercase letters, digits,.,_and-. Start with a letter or a digit, and do not end with.md. - The command fills
tier,author,date,typeandtitle.tieris the value of--space, and the default isglobal.authoris the value of--author, elseCURU_MEMORY_PRINCIPAL.dateis the date of today.titlecomes from the identifier, unless you give--title. - The command leaves
description,confidence,sourcesandevidenceempty. The emptydescriptiongives a fault of the kindokf, so the index skips the file. After you filldescription,validategives a fault for each of the other three. The emptyevidencealso makes the index skip the file, until you give a proof. The comments of the template show a source with no host and an example of each kind of proof. - The default type is
Engineering Finding. - The command does not overwrite a file, and it does not commit. A file that exists gives exit code 1. A bad identifier gives exit code 2. A directory that does not exist also gives exit code 2.
Give a proof for each concept
Each concept gives 1 or more proofs that a reader can reproduce, in the key evidence. A proof is a run, a test or a source:
evidence:
- id: comfyui-validates-ancestors
kind: source
url: https://github.com/comfyanonymous/ComfyUI
commit: 3b2671fb3e3f9723ef224c36ba9618d7d73af00a
path: execution.py
lines: 512-540
- kind: test
repo: curu
commit: 3b2671fb3e3f9723ef224c36ba9618d7d73af00a
path: tests/unit/test_loader.py
name: test_the_loader_reads_the_file
- kind: run
recipe: {repo: curu, commit: 3b2671fb3e3f9723ef224c36ba9618d7d73af00a, path: ops/workflows/sweep.json}
inputs:
- model: krea2_turbo_lora_rank_64_bf16.safetensors
sha256: 9f2c0d4e8b7a6f5e4d3c2b1a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e
- seed: 42
result: {value: 0, metric: face defects in 8 images}
| Kind | What it gives |
|---|---|
source |
Upstream code: repo or url, commit, path and lines. lines is a number or N-M, where M is not less than N. |
test |
An automated test: repo or url, commit, path and name. |
run |
A recipe, its inputs and its result. The recipe is a file (repo or url, commit, path) or a command. Each input is a mapping, and an input with model needs its sha256. The result is a file, a url, or a value with its metric. |
- Each
commitis a full commit identifier of 40 or 64 lowercase hexadecimal characters. A branch or a tag can move, and a short identifier can become ambiguous. Each gives a fault. - Documentation alone, an analysis of a reference image, untested advice and a measurement with no recorded recipe are not proofs.
- The rule of no host applies to each
urlof a proof too. idis optional. A fault names the proof by itsid, else asproof N.- curu-memory checks only the form of a proof. It does not run a recipe or a test, and it does not open a repository. A reviewer checks the proof before a merge.
- A scratch note needs no proof.
propose_concept,propose_changeand a move refuse a concept with no valid proof.space commitrefuses a new or changed concept with no valid proof.- Seven paths do not refuse a concept with no proof:
- a direct signed commit;
space encrypt;space rekey;- a moved file in
space commit; - a git merge of an encrypted space;
- the merge of a proposal from before version 0.16.5;
proposal complete.
- Each of these paths moves existing content, or comes from a person who can write to the repository.
- The index skips each concept with no valid proof, whatever path brought it in. The index report names the file, and the reason starts with
evidence:. So search never finds a concept with no proof. - An agent cannot read a skipped concept, so
propose_changecannot repair it. Give the proof in the file in git, then run the index command again.
Check concept files
Check a file or a directory before you index it. The check uses the rules of the index command, and it writes nothing.
curu-memory validate knowledge
- The command lists each fault as
path:line: kind: message, orpath: kind: messagewhen the fault has no line. Then it printsfaults: N. The exit code is 1 when there is a fault, else 0. --spaceis the space of the files, for the check oftier. The default isglobal. For a personal space, give--space personal/me.--jsonprints{"faults": [...]}. Each fault haspath,line,messageandkind.- A path that does not exist, and an encrypted space, give exit code 2.
From Python:
import curu_memory
for fault in curu_memory.validate("knowledge"):
print(fault.kind, fault.path, fault.line, fault.message)
validategives a list of faults. Givespace="personal/me"for the files of a personal space. With no fault of the kindokf, the index command indexes each file of the directory, unless an identifier is also in another space.validaterefuses an encrypted space withInvalidArgument, because it checks plaintext files only.kindisokforprovenance. A fault of the kindokfmakes the index command skip the file. A missing or bad proof is of the kindokf, and its message starts withevidence:. A fault of the kindprovenancenames a missing or wrong provenance key:tier,sources,author,confidenceordate. The index command still reads that file, but the toolpropose_conceptrefuses it. The server adds a missingauthor, so a missingauthordoes not stop the tool.pathis relative to the directory that you give. For one file, it is the file name.linecounts from the first---line, and it is None when the fault has no line. For a fault of the kindokf,messageis the reason that the index command reports. For a fault of the kindprovenance, it starts with the key, for exampleconfidence: give a number from 0 to 1, andlineis None.- A warning of the index command is not a fault, for example a missing
typeor a link to a missing concept. - A Markdown link in a code block still needs a link kind. A wiki-link
[[...]]in code is text. curu_memory.LINK_KINDSholds the link kinds.curu_memory.OKF_VERSIONis0.2, the version of the format.- The package ships the format:
schema.json, a JSON Schema of the front matter, and conformance fixtures.curu_memory.conformance_fixtures()gives the directory of the fixtures. Its parent directory holdsschema.json. - To test a parser in another language, give it each file of
valid/and ofinvalid/. Compare its faults withexpected.toml.
Refuse the host of your own repositories in the sources
A source that names the host of a repository breaks when the repository moves. Give such a source as repo, commit and path in the front matter:
sources:
- id: the-loader
repo: curu
commit: 293ed35db73e72cfac91dc2cc6c5d3bc85abc567
path: src/curu/loader.py
lines: 120-140
To refuse the host, set the prefixes of your repositories:
export CURU_MEMORY_SOURCES_NO_HOST=github.com/me/,git.example.com/me/
- Each value is an address prefix with no
https://, separated by commas. - A source whose
urlorresourcestarts with one of the prefixes gives a fault of the kindprovenance. The fault names theidof the source.propose_conceptandpropose_changerefuse the concept, andvalidatelists the fault. - A proof whose
urlorresourcestarts with one of the prefixes gives a fault of the kindprovenancetoo. Its message starts withevidence:. The write paths refuse it, but the index still reads the concept. So the index does not change with this setting. - A source of another host stays valid, for example a page of a project of another person.
- Without the setting, no address gives this fault.
Add media to a concept
Add example outputs, reference images, audio clips or videos to a concept with a media list. Each path is relative to the concept file:
---
type: Finding
description: A CFG above 7 burns the colours of WAN2.2 5B.
media:
- images/cfg-9-burnt.png
- images/cfg-5-good.png
- audio/cfg-notes.flac
- video/cfg-9-motion.mp4
---
- The index command embeds each image, clip and video in the same space as the text, so a question in words can find it. This needs an embedder that accepts these media, for example EmbeddingGemma 2 on SGLang.
- An image must be a PNG, JPEG or WebP file. A clip must be a WAV, FLAC, MP3 or Ogg file. A video must be an MP4, MOV, WebM or MKV file. Each file must be 10 MB or less. The command reads the format from the first bytes of the file, not from its name.
- Keep one topic in each clip. A long clip with many topics matches each topic less well.
- The model sees 1 frame of a video each second, at most 32 frames. A longer video gets 32 frames, spread evenly, so a short event in it can be lost.
- Each path must stay in the concept directory, also through a symbolic link. Keep the media files in git with the concept files.
- A media file with a problem gives a warning. The concept stays in the index with its text.
- curu ignores the
mediakey, so the same concept files still index in curu.
Index your knowledge
Run the index command after each change to the concept files:
curu-memory index --concepts ./knowledge
You can also set CURU_MEMORY_CONCEPTS_DIR and run curu-memory index with no option. Add --json to get the report as a JSON object.
The report gives these values:
| Value | Meaning |
|---|---|
files read |
The .md files in the directory and its subdirectories. A README.md file and the files in a hidden directory, for example .git, are not concepts. |
concepts indexed |
The concepts in the new index. It is files read minus skipped. |
skipped |
The files that are not in the index. The report gives the file, the line and the reason for each file. |
warnings |
Problems that did not stop a file, for example a missing type. |
broken links |
Links to a concept that is in no space. A link to a concept of another space is not broken. The concept stays in the index. |
embedder |
The embedding model of the index, or none for an index of words only. |
media embedded |
The images, clips and videos that a search by meaning can find. |
media skipped |
The images, clips and videos that a search by meaning cannot find. Each one is also a warning, with the path and the reason. |
index |
The path of the index file in the data directory. |
The command exits with 0 when it skipped no file, and with 1 when it skipped one or more files. The command skips a file for one of these causes:
- The file is not UTF-8 text, or it has no front matter.
- The front matter has no closing
---line, is not valid YAML, or is not a YAML mapping. - The front matter has no
description. - The body has a
[[wiki-link]], or a link with no kind or an unknown kind. - Two files have the same name. The command skips both files.
- The concept is not a scratch note, and it has no valid proof. The reason starts with
evidence:, and it gives each fault of the proofs, separated by;. - The identifier of the concept is in another space. The reason names that space.
A media file with a problem gives a warning. The command does not skip the concept. It does not put the file in the index for one of these causes:
- The file does not exist, or the path is not a file.
- The path goes outside the concept directory, or it is an absolute path.
- The file is larger than 10 MB, or it is not an image, a clip or a video of a known format.
- The
mediavalue is not a list of paths. The command ignores the full list, andmedia skippeddoes not count it.
When no embedder is set, or the embedder did not embed a file, the file has no embedding. It stays in the index, and the browser shows it or plays it. A search by meaning cannot find it, and the report gives a warning. An embedder that accepts only text gives this warning for each file.
The command sends each image, clip and video to the embedder one time, with no task prompt. It keeps each vector in an embedding cache. The next run sends only the changed text and media. The same files always give the same index. The command writes a new index file and then replaces the old one. A server that runs at that time uses the old index until the new index is complete. If the embedder fails on a text, the old index stays.
Keep team and personal knowledge apart
Give each part of the knowledge its own space. Index each directory into its space:
curu-memory index --concepts ./knowledge
curu-memory index --concepts ./look --space team/look
curu-memory index --concepts ./me --space personal/me
The directory of a team space or a personal space is an encrypted space. Make it with curu-memory space encrypt, as Encrypt the concept files of a private space says.
- A space is
global,team/<slug>orpersonal/<handle>. The default isglobal. - The team slug is the short name of the team, and the handle is the short name of the person. Each has 1 to 40 characters from
atoz,0to9and-. The first character is a letter. - Each space has its own index file. An index run changes only the index file of its space. The index of a team space or a personal space is encrypted. See Keep private knowledge encrypted.
- The global space uses the embedding cache. A team space or a personal space does not use it, so each index run of that space embeds its text again.
- A concept identifier must be unique in all spaces. The command skips a concept whose identifier is in another space, and the report names that space.
- All spaces must use one embedder: one model with one protocol. When the embedder is not the embedder of another space, the command stops with exit code 1 and changes no index. The command accepts a space with no embeddings. A search of that space uses words only.
- To change the embedder, index each space again with
--new-embedder. The report then gives a warning for each space that still has the old embedder. A search of that space uses words only until you index it again. - Only one index run can run at a time. A second run stops with exit code 1 and the message "Another index run holds the lock".
- A bad space name stops the command with exit code 2.
A caller reads only its readable spaces: the spaces where its principal has a role. A caller with no principal reads global only. See Give each person their own spaces. A search finds concepts in each readable space, and each result names its space. concept_neighbours and the browser resolve a link to a concept in another readable space.
Keep private knowledge encrypted
The index of each private space (a team space or a personal space) is encrypted on disk. A copy of the data directory then does not show the private knowledge. Make a key file one time, outside the data directory:
curu-memory key new ~/.config/curu-memory/kek
Then name it in the environment of each index, serve, browse and search process. A Python program that calls build_space or open_knowledge also needs it:
export CURU_MEMORY_KEK_FILE=~/.config/curu-memory/kek
- The command writes one line with mode 0600: 32 random bytes in base64url. Only you can read the file. It does not replace a file that exists, because the old key opens the old indexes.
- Keep the key file out of the data directory, out of each repository and out of each backup of the data. A copy of the data and the key together is a copy of the private knowledge.
- Keep a copy of the key file in a safe place, for example a password manager. Without the key file, nobody can read the private indexes. If you lose it, delete each
*.sqlite.encfile in the data directory. Then make a new key file, and index each private space again. indexof a private space stops with exit code 78 when the key file is not set or does not exist. It also stops when the file holds no key. It stops when the key file is a symbolic link or is in the data directory. It also stops when the file has another hard link, belongs to another user, or other users can read it. It also stops when it cannot read the file. The message names the cause.- A private space with a wrong or missing key file does not open. When no other readable space with an index opens, the read gives the error
index_unreadable. The message names the space and the cause. For a missing or unsafe key file, the message names no path, and the log of the process names the full cause. - A read of more than one space answers from each space that opens. A private space that does not open gives nothing to the answer. The
noticeof a search names that space and the cause. A list of concepts, a read of a concept and the links of a concept leave it out. Only when no readable space with an index opens does the read giveindex_unreadable. - For a program,
closed_spacesof a search result lists each readable space that does not open, with itsspaceand itscause.Knowledge.closed_spaces()gives the same list with no search. The errorindex_unreadablealso hasspaceandcause. Use these fields, not the text of the notice, because the text can change. - The global space is not encrypted. A read of it needs no key file. An index run reads each other space for its checks. Thus each index run needs the key file when the data directory has a private space. An index run of a private space checks the key file first, so a bad key file gives exit code 78. In an index run of the global space, a wrong, missing or unsafe key file gives exit code 1 and the error
index_unreadable. - The index of a private space is
team--look.sqlite.encorpersonal--me.sqlite.enc. An older version of curu-memory wroteteam--look.sqliteas plaintext. A read refuses that file. The next index run of the space deletes it. Index each private space again after the upgrade. - Version 0.5.0 wrote an encrypted index of an older format. A read refuses it with
index_unreadable. An index run also stops on it, because it reads each other space. Delete each*.sqlite.encfile of 0.5.0. Then index each private space again. - An index run of a private space sends its text only to an embedder on loopback or with
https://. It stops with exit code 78 for anhttp://embedder on another computer.
Warning: The encryption protects a stolen copy of the data directory and of git. It does not protect against a person who has the key file and a copy of the data directory or of git.
Protect the key file with your SSH key
A protected key file opens only with your SSH key in ssh-agent, or after an OIDC login to a key service. A copy of the file alone opens no space. Use it when an agent runs as your user and must not decrypt without your SSH key.
You need these:
- An
ssh-ed25519key with no hardware part. The command refuses an ECDSA key and ansk-key, because their signatures change each time. - A key service with a transit key and an OIDC login. Run the key service in the stack tells how to start OpenBao.
- OpenSSH 10 or later.
-
Add your SSH key to ssh-agent:
ssh-add ~/.ssh/id_ed25519 -
Set the address of the key service:
export CURU_MEMORY_KEK_SERVICE_URL=https://keys.example.com
-
Unseal the key service.
-
Make the protected key file:
curu-memory key new ~/.config/curu-memory/kek --protect --ssh-key ~/.ssh/id_ed25519.pub --issuer https://auth.example.com/auth/v1/
-
Name the key file:
export CURU_MEMORY_KEK_FILE=~/.config/curu-memory/kek
-
Then refuse each plain key file:
export CURU_MEMORY_KEK_PROTECTED=1
- The command asks you to log in at the issuer, with the client
curu-memory-keys. Open the address that it prints. Enter the code. - The token of the login goes to the key service one time. curu-memory does not save it, and the key service revokes it after the request. The client
curu-memory-keysgives no refresh token. - The command writes no plain key file. The protected key file holds the agent slot and the recovery slot.
- Each command then opens the key-encryption key through ssh-agent, with no prompt. With no SSH key in ssh-agent, each command that opens a private space stops with exit code 78.
- A server keeps the key-encryption key of its indexes in memory after the first read of a private space. Thus a search still reads the private indexes after
ssh-add -D. Some requests sign through ssh-agent each time: an edit of an encrypted space through the server, a proposal in it and a move from it. Afterssh-add -D, these requests fail. - With
CURU_MEMORY_KEK_PROTECTED=1, each command refuses a plain key file, also inCURU_MEMORY_KEK_FILE_PREVIOUS. Only--oldofkey rotateand ofkey protectaccepts a plain key file. - A protected key file of another key-encryption key than your spaces stops each command with exit code 78. Thus a person who changes the file cannot give a key of their choice.
ssh-add -casks you to confirm each signature. It needs an askpass program: a program that shows the prompt of ssh-agent, whichSSH_ASKPASSnames. With no askpass program, ssh-agent refuses each signature. Each git process of an encrypted space asks again.--rolenames the role in the key service, and--transit-keynames the transit key. The defaults arecuru-memory-ownerandcuru-memory-kek, as the stack makes them. The proxy of the stack passes only the transit keycuru-memory-kek.CURU_MEMORY_SSH_KEYGENgives the absolute path ofssh-keygen. Without it, curu-memory uses/usr/bin/ssh-keygen,/opt/homebrew/bin/ssh-keygenor/usr/local/bin/ssh-keygen. It never searches thePATH.- Each command of the CLI turns off core files, because it can hold the key-encryption key in memory.
Warning: Each process of your user that can reach ssh-agent while your SSH key is loaded can open the key file. An AI agent that runs as your user can do it too. A remote host with agent forwarding (
ssh -A) can do it too. Use a separate SSH key for curu-memory. Do not forward the agent that holds it.
Recover the key file
Use the recovery slot when you lose the SSH key, or when you change to a new SSH key. The key-encryption key does not change, so no index and no space record changes.
-
Unseal the key service.
-
Add the new SSH key to ssh-agent:
ssh-add ~/.ssh/new_id_ed25519 -
Open the key-encryption key through the key service, and add a slot for the new SSH key:
curu-memory key recover --ssh-key ~/.ssh/new_id_ed25519.pub --issuer https://auth.example.com/auth/v1/
- The command asks you to log in at the issuer, as
key new --protectdoes. Only the person of the role of the key service can decrypt. - The command prints
wrote a new agent slot for SHA256:... in .... The old SSH key then opens nothing. - A refused login, or a refused decrypt, stops the command with exit code 78. The file does not change.
- When a later OpenSSH gives another signature for your SSH key, each command stops with "the signature of the key changed". Then recover with the same SSH key.
Protect an existing key file
key protect replaces a plain key file with a protected key file. It makes a new key-encryption key, so the old plain key file opens nothing after it.
curu-memory key protect --old ~/.config/curu-memory/kek --new ~/.config/curu-memory/kek-protected --ssh-key ~/.ssh/id_ed25519.pub --issuer https://auth.example.com/auth/v1/
- The command rotates each private index and each space record to the new key-encryption key, as
key rotatedoes. Give--space-dirfor each encrypted space in git. - It deletes the plain key file only after it rotates each space. Then it prints
remove each backup of .... Remove each copy of the old file, because each copy opens the old key-encryption key. - When a space fails, the plain key file stays, and the exit code is 1. Fix the space. Then run the command again. It continues with the same new key-encryption key, and prints its fingerprint.
- When the command stops after it wrote the new file, run it again. It deletes the plain key file.
- Then set
CURU_MEMORY_KEK_FILEto the new file.
Encrypt the concept files of a private space
Encrypt the concept files of a private space, so that git and each remote hold only ciphertext. Run the command one time for each space, on the server, with the key file of the server:
curu-memory space encrypt --space team/look ./look-plain ./look
curu-memory index --concepts ./look --space team/look
./lookmust be new or empty../look-plaindoes not change. Put./lookin git in its place../lookholdsspace.json,.gitattributesand the directoryobjects/. Each concept file and each media file becomes one object with a random name of 26 characters. The object holds the path, so the file names show no concept.- The command ignores hidden files and
README.md. It names each other file that it does not encrypt, and gives exit code 1. Such a file is, for example, a.txtfile, a symbolic link or a file larger than 10 MB. It still writes the encrypted space, with the other files, and its space record. To add a named file, delete./lookandspaces/team--look.json, and run the command again. - Each space gets its own space key. The data directory holds it in the space record
spaces/team--look.json, under the key of the key file.space.jsonis a copy of the record. The index refuses aspace.jsonof another space, another generation or another current space key than the record. - The index decrypts the objects in memory, and writes no plaintext to disk. It refuses a changed object, an object under another name or of another space, and two objects of the same path. It also refuses each file beside
space.jsonandobjects/that is not hidden, for example a plaintextnotes.md. It names the first such file or object and gives exit code 1. Remove it, and run the index again. - The index of a private space refuses a directory of plaintext concept files, and names
space encrypt. The index ofglobalrefuses an encrypted space. Each gives exit code 78. - The command refuses
global, which stays plaintext, and a target that is not empty, with exit code 2. A second run for the same space into a new directory gives exit code 78. The command also gives exit code 1 when an index run holds the lock. - The old plaintext files stay in the git history until you rewrite it, for example with
git filter-repo. A copy on a git host can stay after a rewrite, for example in old pull requests and forks. Treat that plaintext as known to others, or move the space to a new repository.
To upgrade a space that version 0.8.0 encrypted, encrypt it again. The new version reads only objects of the new format. Do these steps on the server, with the key file of the server:
- Run version 0.8.0 to make a checkout:
uvx --from 'curu-memory==0.8.0' curu-memory space checkout --space team/look --to ~/look-plain ./look. The checkout must be outside each git work tree. - Delete the record
spaces/team--look.jsonof the data directory, and the directory./lookof the encrypted space. - With the new version, run
curu-memory space encrypt --space team/look ~/look-plain ./look. - Commit the space with a signature:
git add --all look, thengit commit -S. - Lock the checkout:
curu-memory space lock ~/look-plain.
The space then has a new space key. The old objects stay in the git history under the old key. After the upgrade, git log -p shows a locked line for each object of 0.8.0 in older commits. This is correct. Do not run space encrypt for this space again.
These facts still show in git:
- The number of objects, and the size of each object in a small range. A file of up to 64 KiB shows its size to within 1 KiB. A larger file shows its size to within about 3 %.
- How often each object changes, and the time and the author of each commit. Write commit messages that name no concept.
- The space name and the key identifiers in
space.json.
The output of index and of space encrypt names the paths of private files. Keep that output and its log private.
Edit an encrypted space
Edit the files of an encrypted space with any editor. Decrypt the space into a checkout: a private directory. Change the files there. Then commit the change. For a space in git, first do the steps in Sign the commits of an encrypted space:
curu-memory space checkout --space team/look ./look
curu-memory space status --space team/look
curu-memory space commit --space team/look
curu-memory space lock --space team/look
space checkoutprints the checkout. Edit the files there. The checkout has mode 700, and each file has mode 600.- The default checkout is
$XDG_RUNTIME_DIR/curu-memory/checkouts/team--lookwhenXDG_RUNTIME_DIRis set. Else, on macOS, it is in~/Library/Caches/curu-memory/checkouts/. Else it is in~/.cache/curu-memory/checkouts/.--to DIRgives another new or empty directory.space checkoutrefuses a directory in a git work tree or in the space, because agit addcould then commit the plaintext. For the default checkout on Linux with noXDG_RUNTIME_DIR,space checkoutgives a warning, because a backup of the home directory can copy~/.cache. - On macOS, the command asks Spotlight and Time Machine to skip each checkout. When Time Machine cannot skip it, the command gives a warning.
space statusprints one line for each changed, new and deleted path, for examplechanged: 'notes/quokka.md'. No line means no change. It also says when the space changed sincespace checkout, for example after a commit of another person.space commitencrypts only the new and the changed files. A moved file keeps its object, and a deleted file loses its object. In git, the command makes one signed commit with the messagecuru-memory: update an encrypted space, which names no path. It prints the number of changed, new, deleted and moved files, and the new commit. Outside git, it makes no commit and gives a warning. With no change, it makes no commit.- When git cannot sign,
space commitstops with exit code 78 after it writes the objects. Set up the signature, then commit the space withgit commit -S. space commitstops with exit code 1, and changes no object, when another person changed an object sincespace checkout. Lock this checkout withspace lock. Then make a new checkout. Change the file again. It also stops for a rebase in progress, and for a merge in progress when the checkout is not ofspace checkout --merge, and for conflict markers. It stops for a symbolic link, a special file, a file larger than 10 MB, a hidden file and a bad path. It also stops for a new path that another object holds, or that differs from a path only in case. Another commit of the same space at the same time also stops it.space commitstops with exit code 1, and changes no object, when a new or changed concept has no valid proof. The message names each file and its fault. An unchanged or a moved concept with no proof does not stop the commit.space lockdeletes the checkout. It refuses a directory that is not a checkout. The delete is a normal delete, not a secure erase.
Warning: The plaintext of a checkout is on disk until
space lock. An editor can keep copies in other places. Examples are the local history of VS Code or JetBrains, and the swap and backup files of vim or Emacs. Use disk encryption, for example FileVault. Turn off these copies for the checkout.
Edit a space through the server
Edit an encrypted space with no key file. The curu-memory server decrypts and encrypts each object after it checks your role on the space. The space key stays on the server. Log in one time. Then check out with --server, and commit with the same --server:
curu-memory login --server https://memory.example.com
export CURU_MEMORY_ALLOWED_SIGNERS=~/.config/curu-memory/allowed_signers
curu-memory space checkout --space team/look --server https://memory.example.com ./look
curu-memory space commit --space team/look --server https://memory.example.com
login prints the issuer, an address and a code. Open the address in a web browser on any device. Log in there. Enter the code. The command then prints logged in to https://memory.example.com.
loginfinds the issuer in the metadata of the server. The metadata must name the address of the server with/mcp, so a server cannot start a login for another server.--issuer URLgives the issuer when the metadata of the server names none. In the basic mode, the server accepts only the static token, so useCURU_MEMORY_SERVER_TOKEN.loginasks for read and write access.--read-onlyasks for read access only, and a commit then stops with exit code 78.loginstops with exit code 1 when you deny the code, or when the code expires before you enter it. Runloginagain.- The token cache keeps the tokens, one entry for each server. Its default is
$XDG_CONFIG_HOME/curu-memory/login/tokens.jsonwhenXDG_CONFIG_HOMEis set. Else it is~/.config/curu-memory/login/tokens.json.CURU_MEMORY_TOKEN_CACHEgives another file. The file has mode 600, and its directory has mode 700. - The commands refuse a token cache that other users can read or write, or that another user owns. They also refuse a link, and a cache that is not valid. They also refuse such a directory of the cache. For a file, delete it, then log in again. For a directory, set its mode to 700.
- The commands renew an access token that expires in less than 60 seconds. When the issuer refuses the renewal, the command deletes the entry and stops with exit code 78. Log in again. When the issuer does not answer, the command keeps the entry and stops with exit code 78.
- The commands send a token of the cache only to the server of its entry, and to the issuer of the entry. The audience of the token must name the address of the server with
/mcp. They print no token. curu-memory logout --server https://memory.example.comdeletes the entry of that server, and printslogged out of https://memory.example.com.CURU_MEMORY_SERVER_TOKENhas priority over the cache. Use it for a token that you got in another way, for example the static token. Each command prints the server that gets it.- The issuer, its device endpoint, its token endpoint and the address that you open must use
https://, except on127.0.0.1,::1orlocalhost. They must be on the host of the issuer. Elseloginstops with exit code 78.
Warning: Enter only a code that you started yourself with
curu-memory login. A person who sends you a code and an address can get a token of your account when you enter that code.
--serveris the address of the server, with no/mcp. It must start withhttps://. Plainhttp://is only for a server on127.0.0.1,::1orlocalhost. For another address, the command stops with exit code 78 and sends no token.- In OIDC mode, the token is an access token of the provider for you or for your agent. A commit with a token of a person needs the scope
knowledge:write. A token withknowledge:reador with no known scope reads only. In the basic mode (the static token), the token is theCURU_MEMORY_HTTP_TOKENof the server. - A checkout needs a read role on the space, and a commit needs a write role. A member of a team has a write role on the team space. An agent has the weaker of two roles: the role of its grant and the role of its person.
- A commit of the checkout needs the
--serverof the checkout. A commit with no--serveror with another--serverstops with exit code 2 and sends nothing. Thus a change of the state file cannot send your token and your files to another server.space statusandspace lockneed no server and no token. - Your computer still does each check of Edit an encrypted space and of Sign the commits of an encrypted space. A
space.jsonwith another generation or another space key than the record of the server stops the command with exit code 78. - The command stops with exit code 78 for a refused token, no role or a read role on a commit. Exit code 78 is also for no record on the server, a record that the server cannot open, or no answer. The server gives the same answer for no role and for a space that does not exist. An object that the server refuses stops the command with exit code 1.
- The command uses no proxy of the environment or of the system, so the token and the files go only to the server.
- The command uses TLS 1.3 or later and the certificates that the system trusts. For another certificate authority, set
SSL_CERT_FILEto a file of its root certificates. That file then replaces the certificates of the system. - Each request with a valid token writes one line to the audit log of the server. A request with a wrong Host header or a wrong content type writes no line.
The server accepts the static token only when the operator turns on the setting. Set it in the environment of serve:
export CURU_MEMORY_SERVER_UNLOCK_STATIC_TOKEN=1
- Each holder of the static token then has the roles of
CURU_MEMORY_PRINCIPALon each space. Keep the static token as safe as the key file. - The setting accepts
1,trueoryes, and0,falseorno. Another value stopsservewith exit code 78. - Without the setting, the server refuses each request of the static token with HTTP 403. In OIDC mode, the setting has no effect, because each token has its own person.
Sign the commits of an encrypted space
A space in git opens only at a signed commit. index, space checkout and space commit verify the signature of the last commit, and refuse an uncommitted change of the space, with exit code 78. Thus a person with write access to the git host cannot add, change or delete an object without a valid signature.
-
In the git repository of the space, sign each commit with an SSH key:
git config gpg.format ssh git config user.signingkey ~/.ssh/id_ed25519 git config commit.gpgsign true
-
Write the file of allowed signers. Each line is an email,
namespaces="git"and a public key:echo "me@example.com namespaces=\"git\" $(cat ~/.ssh/id_ed25519.pub)" > ~/.config/curu-memory/allowed_signers
-
Name the file in the environment of
index,space checkoutandspace commit:export CURU_MEMORY_ALLOWED_SIGNERS=~/.config/curu-memory/allowed_signers.
- Only an SSH signature of a key in the file of allowed signers passes. git checks a GPG signature against a keyring, not against this file, so a GPG signature does not pass.
- Keep the file of allowed signers outside the repository. The commands refuse a file inside the work tree, because a person who can push could then add a key of their own. A relative path in
CURU_MEMORY_ALLOWED_SIGNERSstarts at the current directory. - A commit must hold the
space.jsonof the space. An ignored file in the space is an uncommitted file. Thus a space that git ignores does not open. - A space is in git when its directory or a parent directory holds
.git. With noCURU_MEMORY_ALLOWED_SIGNERS,index,space checkoutandspace commitstop with exit code 78. With no git on thePATH,index,space checkout,space commitandspace statusstop with exit code 78. - A space outside git has no history to check. The report of
indexthen has the warningnot in git: no signature of the space was checked. - The check does not find a roll back of the whole branch to an older signed commit. Read the git log to find it.
Read the diff of an encrypted space
See the plaintext changes of an encrypted space in git diff, git log -p and git show. Set up each clone one time:
curu-memory git install
git log -p -- look/
git installwrites the textconv of the diff drivercuruto the.git/configof this clone only, with the absolute path of curu-memory. Run it again after you move curu-memory.- After
git install --server https://memory.example.com, the diff decrypts through the server, with the token ofcuru-memory loginor ofCURU_MEMORY_SERVER_TOKEN. Aftergit installwith no--server, the diff uses the key file. - The text of each object starts with the lines
space: <space>andpath: <path>. git shows them for a new, a deleted or a moved file, and for a change near the start of a file. A media file showsmedia: <media type>, <size> bytes, not its bytes. - When the diff cannot open an object, it shows
curu-memory: locked object <object> (<hash>): <reason>, and continues. The reason is, for example, no role on the space or no key file. It is also a space key that no space of the repository holds, or that more than one space holds.<hash>is the first 16 characters of the SHA-256 of the object file. Thus two different locked objects give two different lines, and a change always shows. When the settings are not valid, the line has no hash. - A file that is not an object of a space shows as it is, also when a
.gitattributesnames the drivercurufor it. - The diff shows each control character of a text, but not the tab or the line end, as an escape, for example
\x1b. Thus a text cannot change the terminal. git installturns off the cache of the textconv, because git keeps that cache in refs that a push can send.space statusstops with exit code 78 when the cache is on. Rungit installagain.- The diff decrypts each object in memory, and writes no file.
- git starts curu-memory once for each side of each changed object. One start takes about 0.1 to 0.3 seconds, so a
git log -pof many commits is slow. Agit log -pof 20 commits takes about 15 seconds with the key file, and more through the server. Give it a path or a range, for examplegit log -p -5 -- look/.
Merge the branches of an encrypted space
Merge two branches of an encrypted space with git. curu-memory git install also sets up the merge driver curu. Merge with a signature:
git merge -S other
- When both branches changed a file, the driver decrypts the three versions in memory and merges them. It writes no plaintext file. Changes of different lines merge with no conflict when one or more unchanged lines separate them. Changes of adjacent lines, and two different inserts at the same place, are a conflict, as in git.
- When a file changed on one branch only, git takes that version, and the driver does not run.
- The driver merges the path apart from the text. A move on one branch and a change on the other merge. Two different moves of one file are a conflict, and the file keeps the path of your branch. On a terminal, the message names both paths. When the output is not a terminal, for example a log file, the message names only the object, because a path can show a concept.
- A change of the same line on both branches is a conflict. git reports
CONFLICT (content), and the object then holds the text with the conflict markers<<<<<<< ours,=======and>>>>>>> theirs. - A media file that both branches changed is a conflict. The file keeps the version of your branch.
- When the driver cannot open a version, for example with no key file, it reports a conflict and keeps your version. It does the same for a result larger than 10 MB. It also does so when the lines of the base, multiplied by the lines of the larger side, are more than 2,000,000. Two versions of about 1,400 lines each are at that limit.
- A version under an old space key is a conflict too. Such a key is neither the key of the base nor the current key. The version can be an old one that a person put back.
- The merge commit needs a signature, as each commit of an encrypted space. Use
git merge -S, orgit config commit.gpgsign true. The index refuses a merge commit with no signature. - Two branches can give two objects the same path, for example with two new files, or with a move and a new file. git then merges with no conflict, but the index refuses the space, because two objects hold one path. Run
git reset --hard ORIG_HEAD. Then rename the file on one branch, and merge again. - The signature of the merge commit is your signature. The index checks only the signature of the last commit, so your signature is the only check of the commits of the other branch. Read them with
git log -pbefore you merge.
Resolve a merge conflict of an encrypted space
Resolve a conflict of a merge of an encrypted space. Check out the space of the merge. Remove the conflict markers, then commit:
curu-memory space checkout --space team/look --merge ./look
curu-memory space commit --space team/look
space checkout --mergeruns only during a merge of two branches. The last commit of your branch (HEAD) and the last commit of the branch that you merge must each have a valid signature.- Each file of the space must be of one of the two branches, or an object that the merge driver wrote. Only an object can have a conflict here: a conflict of
space.jsonor.gitattributesstops the command. - The command stops with exit code 78 with no merge in progress, a rebase or a bad signature. It does the same for a symbolic link or a file of neither branch, and names it. It also stops for an object of the merge driver that is not under the current space key, and names the object.
- Edit the files of the checkout. Remove each conflict marker, and keep the text that you want.
space commitends the merge with one signed merge commit, also when you change no file. The message of the commit names no branch and no path.space commitstops with exit code 1 for a file with conflict markers. It also stops for a conflict outside the space, and for a staged change outside the space that is not of the merge. Then no object changes. Resolve a conflict outside the space with git first.space commitalso stops when an object of the space changed since the checkout. It stops when the merge is not the merge of the checkout, for example aftergit merge --abort.- To stop the merge, run
git merge --abort, then lock the checkout withspace lock. space checkout --mergerefuses a rebase, and stops with exit code 78. Usegit merge.
Check the commits before a push
Stop a push that puts plaintext into an encrypted space. Install the pre-push hook one time in each clone:
curu-memory space hook install
- Before each push, the hook checks each commit that the push sends. It reads the full tree of each commit. In a directory with
space.json, each file must bespace.json, the.gitattributesof the space or an object. Each other file stops the push. A symbolic link, a submodule, a file that is not a regular or an executable file, and a space inside a space also stop it. - The message names the commit and the file, for example
3f2a9c1d0b7e: 'look/notes.md': it is not an object of the encrypted space, so it can be plaintext. The line starts with the first 12 characters of the commit identifier. Remove the file from that commit, for example withgit rebase -i. Then push again. - The hook calls curu-memory by its absolute path. Run
space hook installagain after you move curu-memory. It replaces its own hook. - The command refuses to replace a hook that it did not write. If it refuses, add the line
curu-memory space check --pre-push "$@"to your hook. It also refuses a hook that is a symbolic link. - A person can push with
--no-verify, so run the same check in the CI of the repository of the space:curu-memory space check origin/main..HEAD. CI needs the full history, for examplefetch-depth: 0ofactions/checkout. Without it, git cannot findorigin/main, and the check stops with exit code 1 and the messagegit rev-list failed. curu-memory space check --allchecks each commit of each ref. The check reads the commits, not the work tree. It cannot find plaintext outside the directory of a space.- Exit code 1 means a file that breaks a rule, or a git error. Exit code 2 means a revision that starts with
-, or no git work tree.
Rewrite the plaintext history
Remove the old plaintext files of a space from the whole git history after space encrypt. Install git filter-repo first. The old plaintext was in a git remote, so treat it as known to others, also after the rewrite. Do these steps in this order:
- Make a new mirror clone:
git clone --mirror <url> look.git. Go into it:cd look.git. - Write the file
../words.txt, outside the mirror. Write one line for each word that the commit messages must lose, for exampleZebroquokka==>(removed). - Remove the plaintext directory and the words:
git filter-repo --invert-paths --path look-plain --replace-message ../words.txt. Then delete../words.txt. - Find each branch and each tag whose name shows content:
git for-each-ref --format='%(refname)'. Rename each one, for examplegit branch -m notes-on-zebroquokka notes-1, or delete it. - Check each commit. Make a normal clone of
look.git. In the clone, runcuru-memory space check --all. - Push the rewritten history:
git push --force --mirror <url>. - In a new clone, add a signed commit:
git commit --allow-empty -S -m "curu-memory: sign the rewritten history". Then push it. The rewrite removes each signature of a rewritten commit. Then each person deletes their clone and makes a new one. - Ask the git host to remove its copies of the old commits, for example the refs of old pull requests and its caches. If it cannot, move the space to a new repository.
- A clone from before the rewrite can push the old history back. The hook and the check of CI do not stop it, because the old plaintext is outside the directory of a space. Delete each old clone.
Rotate the key
Rotate the key to change the key file of the private indexes. The rotation encrypts each private index again under a new data key. With the previous key file, the server answers during the rotation. Do these steps in this order:
-
Make a new key file:
curu-memory key new ~/.config/curu-memory/kek-2. -
Restart the server with the new key file and the old key file. The old key file is the previous key file:
export CURU_MEMORY_KEK_FILE=~/.config/curu-memory/kek-2 export CURU_MEMORY_KEK_FILE_PREVIOUS=~/.config/curu-memory/kek
-
Rotate each private index. Give the clone of each encrypted space with
--space-dir:curu-memory key rotate --old ~/.config/curu-memory/kek --new ~/.config/curu-memory/kek-2 --space-dir ./look. -
When
key rotateprints its total line withfailed 0, push the commit of each space in git, for examplegit -C ./look push. -
Remove
CURU_MEMORY_KEK_FILE_PREVIOUS. Then restart the server.
During the rotation, each read with the two key files opens each index with the key that the index names. An index run also reads each other space in this way. Each index run writes under CURU_MEMORY_KEK_FILE only.
The command also wraps the space key of each encrypted space again under the new key. It changes no object. Without --space-dir, git sees no change. It prints one line for each private index, one line for each encrypted space, for example space team/look: rotated, and a total, for example rotated 2, skipped 0, failed 0:
rotated: the index is now under the new key, with a new data key.skipped: the new key already opens the index. Thus you can run the command again after a stop.failed: the old key does not open the index, or the index has an older format. Or a person or a fault changed the file, or the index is plaintext. The command does not change the file. Index that space again.
For a space line, rotated means that the new key wraps the same space key. skipped means that the new key opens the record already. failed means that the old key does not open the record, and the record does not change.
With --space-dir DIR, the command also writes the new record into DIR/space.json, and makes one signed commit with the message curu-memory: wrap the space keys again. No object changes. Give --space-dir one time for each space. Then push each commit. Thus the old key file opens no space key in the new commits of git. The command prints one line for each directory, for example space.json /srv/look: rotated:
rotated: the command wrotespace.jsonand made the signed commit. For a space outside git, the command writesspace.jsonand makes no commit.skipped:space.jsonis equal to the record already. The command makes no commit.failed: a check failed, andspace.jsondoes not change. In git, the space must be at a signed commit, with no uncommitted change and no merge. Its generation and its space keys must equal those of the record. The line gives the reason.
--space-dir decrypts no object, so it works also when CURU_MEMORY_KEK_FILE still names the old key file.
The command holds the index lock, so it stops with exit code 1 when an index run is active. It gives exit code 1 when a space failed. It stops with exit code 78 for a missing or unsafe key file. It also stops with 78 when the old key and the new key are the same key. It does not read the concept files and does not call the embedder. It warns when CURU_MEMORY_KEK_FILE does not hold the new key, because each index run writes under that key file.
If a person steals the key file, rotate the key at once, with the five steps and --space-dir. Then destroy the old key file, each copy of it, and each backup of the data directory from before the rotation. The rotation changes each data key of an index too, so you need no index run.
The rotation does not change a space key. The old space.json in the git history still opens the space keys with the old key file. Thus a person with the old key file and a copy of git can read each encrypted space. Treat its contents as known. Then rekey each space with --remove-old.
If you lose the key file, a rotation cannot help. Delete each *.sqlite.enc file, make a new key file, and index each private space again.
Warning: A rotation does not change a backup. Each backup from before the rotation opens with the old key. Keep the old key file while you keep those backups, or destroy both together.
Rekey an encrypted space
Rekey a space to encrypt each object again under a new space key. Rekey after a leak of a space key, or after a leak of the key file. Do these steps on the server, with the key file of the server, in a clone of the space:
-
Merge each branch of the space first. A merge after the rekey can keep objects of the branch under the old space key. After
--remove-old, the merge driver cannot open those objects, and it reports a conflict. Merge or close each open proposal of the space too. -
Rekey the space:
curu-memory space rekey --space team/look ./look
-
Push the commit:
git -C ./look push.
- The command adds a new generation with a new random space key to the record. It encrypts each object again under the new key. Each object keeps its name. It writes
space.json, makes one signed commit with the messagecuru-memory: rekey an encrypted space, and then saves the record. - It prints the new generation, the number of objects and the commit, for example
generation: 2,objects: 3andcommit: 3f2a9c1d…. - The record keeps the earlier space keys, so
git log -pstill shows the earlier commits. - After a leak, add
--remove-old. The record then keeps only the new space key. The command printsremoved: N, the number of earlier space keys that it removed.git log -pthen shows a locked line for each object of an earlier commit. A person with the leaked key and a copy of git can still read the earlier commits, so treat their contents as known. To remove them from git too, rewrite the history or move the space to a new repository. - A rekey does not take back plaintext that a person already has, for example in a checkout. A person who edits through the server never holds a space key. Thus the removal of their role is enough, and the space needs no rekey.
- A checkout from before the rekey cannot commit a changed file, because its object changed. Lock it, and make a new checkout.
- The space must be in git, at a signed commit, with no uncommitted change and no merge or rebase in progress. The command stops with exit code 78 else, or when git cannot make the signed commit. Then the space and the record do not change.
- The command holds the index lock, the lock of
space commitand the lock of the work tree. It stops with exit code 1 when an index run or a commit holds a lock. It waits for 10 seconds when a proposal or a merge holds the work tree. Then it stops with exit code 1. - An open proposal of the space, or a branch
proposal/<id>of the space with no record, stops the command with exit code 1. The command names each one. A rekey writes each object again, so each open proposal goes stale. - Add
--close-proposalsto close each open proposal of the space first. The command then printsclosed: Nbefore the other lines. N is the number of closed proposals, plus the number of deleted branches with no record. Each proposal gets the reasonrekey, and the command deletes its branch. One audit line records the close. If the rekey stops after the close, the proposals stay closed. The authors propose again after the rekey. - If the command cannot save the record after the commit, it names the commit and stops with exit code 78. The space does not open then. Reset the branch to the parent of that commit, for example with
git reset --hard HEAD~1, and rekey again. - The space name is in the encryption of each object. A rekey keeps the name, so it cannot rename a space.
Give each person their own spaces
Register each person and each team. The first person is an instance owner:
curu-memory access person add me
curu-memory access person add guest
curu-memory access team add look
curu-memory access member add look guest
Then set CURU_MEMORY_PRINCIPAL to the handle of the person of each serve, browse or search process. For example, set CURU_MEMORY_PRINCIPAL=me in the environment of the MCP client. A registered principal reads only the spaces where it has a role. With no principal, a process reads global only:
| Space | Role of each person |
|---|---|
global |
admin for an instance owner, else read. |
team/<slug> |
admin for an instance owner, write for a member of the team, else no role. |
personal/<handle> |
admin for that person only. An instance owner has no role in the personal space of another person. |
- Without
CURU_MEMORY_PRINCIPAL, a process readsglobalonly. - A
CURU_MEMORY_PRINCIPALthat names no registered person stopsserve,browseandsearchwith exit code 78. - A value that is not a valid handle stops each command with exit code 78.
- A running server reads the access store at each request. When you remove a person, that person reads nothing from the next request. A tool then gives the error
access_refused, and the browser shows the page "No access" with HTTP 403. A media request gets HTTP 404. Each such request writes a refused line to the audit log. curu-memory access person add HANDLE --ownerregisters another instance owner. The command refuses to remove the last instance owner.curu-memory access person remove,access team removeandaccess member removeremove a person, a team or a member. When you remove a person or a team, the command also removes its team memberships.- A removed person or team keeps the index of its space. The command says so. Delete its index file in the data directory, for example
personal--me.sqlite.encorteam--look.sqlite.enc. Else a new person or team with the same handle or slug reads it. - A bad handle or slug gives exit code 2. A change that the rules refuse, for example a new member of a team that does not exist, gives exit code 1.
Show the persons, the teams and the role of each person in each space:
curu-memory access show
curu-memory access show --json
The access store is access.sqlite in the data directory. It holds handles and slugs, and no token and no secret. The roles are, from the weakest to the strongest:
| Role | It allows |
|---|---|
read |
Search and read the concepts of the space, and decrypt them through the server. |
triage |
read, and close each proposal of the space. |
write |
triage, propose a new concept or a change, and encrypt through the server. |
maintain |
write, and list, show, merge and complete the proposals of the space. |
admin |
maintain, and the merge of an own proposal in a protected space with proposal merge --bypass. |
Give a person a role for review
The table of the spaces in Give each person their own spaces gives read in global to each person who is not an owner. To let a second person review the proposals of your agents, give that person maintain:
curu-memory access role set ada --space global --role maintain
curu-memory access role remove ada --space global
- An assigned role is
triageormaintain. It only raises a role that the person already has. A personal space has no assigned roles. - A grant can then give an agent of that person
triageormaintain. - Each change writes an audit line with the action
role.setorrole.remove.
Protect the global space
When a second person can review, protect global:
curu-memory access protect global
curu-memory access unprotect global
access protectrecords the commit ofmainas the protection base. You can protect onlyglobalnow.- In a protected space, the author of a proposal cannot merge it. The author of a proposal of an agent is the person of the agent. Another person with
maintain, or an agent of another person with a grant ofmaintain, merges it. - An admin can merge their own proposal with
curu-memory proposal merge <id> --bypass. The merge commit then has the lineCuru-Bypass: <handle>, and the audit line has the reasonbypass. - Before each index of a protected space, the index checks each first-parent commit of
mainafter the base. Each one must be a merge that the server key signed, with the linesCuru-ProposalandReviewed-by. The reviewer must not be the author, unless the commit has the lineCuru-Bypass. - If a commit fails the check, the index refuses the space, names the commit and exits with code 1. Search keeps the last good index. Revert the commit through a proposal.
- The index also refuses a work tree that is not on
main, or that has an uncommitted change or a merge in progress. It also refuses a history that no longer holds the base. - A protected space needs
CURU_MEMORY_SIGNING_KEYandCURU_MEMORY_ALLOWED_SIGNERS, also forcuru-memory index. - After a rotation of the server key, the old merges fail the check. Protect the space again to set a new base.
- Each protect and unprotect writes an audit line with the old and the new base.
Read the audit log
audit.jsonl in the data directory gets one JSON line for each change of access and each refused read. It also gets a line for each proposal, each merge, each close and each refused show of a proposal. Each scratch write and each refused scratch write also gets a line. Each login of the browser gets a line browse.login. A login that the issuer, the ID token check or the person link refuses also gets a line browse.login. A refused read is a request for a concept, its links, its page or its media in a space without a role. A request of a principal with no role in any space is also a refused read. The caller gets the same answer as for a concept that does not exist.
| Key | Value |
|---|---|
time |
The UTC time, for example 2026-10-31T21:00:00Z. |
principal |
person:<handle>, agent:<name>, anonymous for a process with no principal or for a refused token, or operator for the command access. |
acts_for |
The person that an agent acts for, or null. |
action |
For example person.add, person.link, member.remove, agent.add, grant.add, grant.revoke, get_concept, concept_neighbours, read_concept_file, page, media or token. For an edit through the server: space_info, space_decrypt or space_encrypt. For a proposal: proposed, merged, closed or proposal_show, the refused show of a proposal. For a protection: protect, unprotect, role.set, role.remove or index. For a scratch note: scratch. |
space |
The space of the change, of the grant or of the refused read. null for a change of a person or an agent, for a principal with no role in any space, and for a refused token. Also null for an edit through the server that the server refuses before it reads the space. Also null for a refused scratch write of a principal with no person. |
outcome |
changed or refused. For an edit through the server, allowed or refused. |
reason |
For a change, the message that the command prints, for example added the person me. For an edit through the server, ok, no role, no record, read only, static token off, bad request, too large, object refused or record refused. For a refused read, no role in the space or no role in any space. For a refused token, the reason of the token check, for example expired, wrong audience or unknown subject. For a proposal, new concept, change, completion, merged into main, bypass, stale, closed by a person or the details.reason of the error, for example no write role, no maintain role, own proposal or id in use. For a protection, base <old> -> <new>, with none for no base. For a refused index, unreviewed commit. For a scratch note: new note or replaced note, or the reason of the refusal. |
subject |
The handle, the slug or the agent name of a change, or <slug>:<handle> for a member change. The proposal id for proposed, merged, closed and proposal_show lines. null for a refused proposed line. null for a refused read or a refused token. The commit of a scratch write, or null for a refused scratch write. |
count |
Only for an edit through the server: the number of objects or files in the request. 0 for space_info, and for a request that the server refuses before it counts the items. |
token |
Only for an edit through the server: oidc or static, the kind of the token. |
A line never holds a token, a question, a concept identifier, a title, media, a path or an object name. curu-memory makes the file with mode 0600. If curu-memory cannot write a line, it writes an error to stderr, and the request gets its normal answer. Rotate it with logrotate and its copytruncate option.
Search the knowledge
curu-memory search "VAE for WAN2.2 5B" --limit 5
curu-memory search "turbo" --type "Model Component" --tag wan
curu-memory search "wan2.2 VAE" --exclude-type "ComfyUI Workflow Template"
--limitsets the number of results, from 1 to 50. The default is 10.--typekeeps only concepts of that OKF type. Repeat it for more types.--exclude-typeleaves out the concepts of that OKF type. Repeat it for more types. The search leaves out a type that is in both--exclude-typeand--type. Use it, for example, to leave out the workflow templates from a general question.--tagkeeps only concepts that have the tag. Repeat it, and each concept must have all the tags.--scratchalso returns the scratch notes in your personal space. A search leaves them out by default. A search with--medianever returns a note.--jsonprints the same JSON object as thesearch_knowledgetool.
Each result gives the identifier, the space, the title, the type, the description, the tags and the sources. The status is the status of the front matter. The score comes from reciprocal rank fusion, from about 0.006 to 0.018. A higher score is a better match. The best match of words alone has a score of about 0.016. A concept that is first in words and in meaning has a score of about 0.018.
matched_unit is the unit that matched the meaning best. summary is the title and the description. overview is the text before the first heading. image.1 is an image at the first place of the media list. audio.2 is a clip at the second place, and video.3 is a video at the third place. Other values are the slug of a ## heading. A repeated slug gets a number, for example notes-2. A ## Summary heading is summary-2. A later part of a long section gets <slug>-part-<n>, for example notes-part-2. matched_kind is text for the summary, the overview or a section, image for an image, audio for a clip and video for a video. Both are null when only the words matched the concept, for example in words_only mode.
The mode line says how the search worked. hybrid means words and meaning. words_only means words only, and the notice line says why. With two or more spaces, a space whose vectors this embedder cannot use is searched by words only. An example is a space with no vectors. When another space can use its vectors, the mode stays hybrid, and the notice names the spaces of words. The notice line also shows when nothing matched. A name such as sdxl_base_1.0 or wan2.2_vae.safetensors matches as one word.
The printed result gives the matched line of each concept that matched by meaning, for example matched: image.1 (image).
With --json and in the tool result, scratch is true for a scratch note and false for a concept. The printed result shows a note with the type (Scratch). The search_knowledge and get_concept tools take the input scratch, with the default false. With false, get_concept gives concept_not_found for a scratch note.
Search with media
Give an image, an audio clip or a video in place of a question, for example an output of a workflow that has a fault:
curu-memory search --media output.png --limit 5
curu-memory search --media voice.flac
curu-memory search --media motion.mp4
- The file must be a PNG, JPEG, WebP, WAV, FLAC, MP3, Ogg, MP4, MOV, WebM or MKV file of 10 MB or less. The command reads the kind from the first bytes.
- An image finds the concepts whose images or texts are nearest in meaning. A clip finds the concepts whose clips or texts are nearest, and a video finds videos and texts. Each kind of question finds only its own kind of media.
matched_kindsays which kind matched. - Media has no words, so only the meaning counts. The
modeismedia. Thescoreis from about 0.009 to 0.016. The first result has about 0.016. - Give a question or
--media, not both. Both, or neither, stop the command with exit code 2. - A bad file stops the command with exit code 2. A bad file is a missing file, a file larger than 10 MB, or a file of an unknown format. The tool gives the error
invalid_argument, anddetails.fieldismedia. See Handle errors. - The search needs an embedder that accepts the kind of the file. Without one, the result is empty, and the
noticesays why. --limit,--type,--exclude-type,--tagand--jsonwork as for a question in words.
An agent uses the tool search_knowledge_by_media. It gives the file as base64 text or as a base64 data URI, for example data:image/png;base64,.... The base64 text can have line breaks. It never gives a path. Over HTTP, a request can hold a file of 10 MB as base64.
Search by meaning
Without an embedder, curu-memory searches by words only. To search by meaning too, run an embedder. Then set CURU_MEMORY_EMBEDDER_URL to its base URL. Set CURU_MEMORY_EMBEDDER_TOKEN to its token. curu-memory has no default base URL. When you set a base URL, the default protocol is curu-vision and the default model is embeddinggemma-2. Then curu and curu-memory use the same vectors. See Use the curu-vision model service.
An OpenAI-compatible server also works, with CURU_MEMORY_EMBEDDER_PROTOCOL=openai. It serves POST /v1/embeddings. SGLang, vLLM, Ollama and llama-server serve this API. Its vectors are not the vectors of curu.
The default model is EmbeddingGemma 2 from Google. It changes text, code, images, video and audio into embeddings that you can compare with each other. It is free to use under Apache 2.0.
For example, serve EmbeddingGemma 2 with SGLang on port 30000:
sglang serve --model-path google/embeddinggemma-2 --host 127.0.0.1
Then set the URL before you index, before you search and before you start the server:
export CURU_MEMORY_EMBEDDER_URL=http://127.0.0.1:30000
export CURU_MEMORY_EMBEDDER_PROTOCOL=openai
curu-memory index --concepts ./knowledge
Ollama gives the same model a different name, so set the name too:
ollama pull embeddinggemma-2
export CURU_MEMORY_EMBEDDER_URL=http://127.0.0.1:11434
export CURU_MEMORY_EMBEDDER_PROTOCOL=openai
export CURU_MEMORY_EMBEDDER_MODEL=embeddinggemma-2
CURU_MEMORY_EMBEDDER_URLis the base URL of the embedder. A URL that ends with/v1also works.CURU_MEMORY_EMBEDDER_MODELis the model name that the embedder serves. The default isgoogle/embeddinggemma-2foropenaiandembeddinggemma-2forcuru-vision. Without a URL, this setting stops each command with exit code 78.CURU_MEMORY_EMBEDDER_PROTOCOLis the API of the embedder:curu-visionoropenai. The default iscuru-vision. Setopenaifor thePOST /v1/embeddingsAPI of the servers above. See Use the curu-vision model service. Another value stops each command with exit code 78. Without a URL, this setting stops each command with exit code 78.CURU_MEMORY_EMBEDDER_TOKENis a bearer token for the embedder. It is optional foropenaiand necessary forcuru-vision. With a URL, no protocol and no token, each command stops with exit code 78, and the message tells you to setCURU_MEMORY_EMBEDDER_PROTOCOL=openai.CURU_MEMORY_EMBEDDER_TIMEOUTis the time in seconds before a search uses words only. The default is 5. The index command uses the same limit for each request of 32 texts or 4 media files. Increase it for a slow embedder. The curu-vision service unloads an idle model, and its next load takes about 40 seconds on a CPU. So give the index command a value of 90 or more.CURU_MEMORY_EMBEDDER_MIN_SIMILARITYis the lowest cosine similarity that counts as a match of meaning, from -1 to 1. The default is 0.68 for EmbeddingGemma and 0.35 for other models. A higher value gives fewer matches by meaning. A lower value gives more matches, and an unrelated question can get results. A value that is not a number from -1 to 1 stops each command with exit code 78.CURU_MEMORY_EMBEDDER_MIN_IMAGE_SIMILARITYis the same limit for a match between a question in words and an image. The default is 0.68 for EmbeddingGemma and 0.35 for other models. A higher value gives fewer matches with images. A lower value gives more matches, and an unrelated question can match an image. A value that is not a number from -1 to 1 stops each command with exit code 78.CURU_MEMORY_EMBEDDER_MIN_AUDIO_SIMILARITYis the same limit for a match between a question in words and a clip. The default is 0.68 for EmbeddingGemma and 0.35 for other models. A higher value gives fewer matches with clips. A lower value gives more matches, and an unrelated question can match a clip. A value that is not a number from -1 to 1 stops each command with exit code 78.CURU_MEMORY_EMBEDDER_MIN_VIDEO_SIMILARITYis the same limit for a match between a question in words and a video. The default is 0.71 for EmbeddingGemma and 0.35 for other models. A higher value gives fewer matches with videos. A lower value gives more matches, and a question can match a video with a near motion. Descriptions of the test videos scored from about 0.73 with their own videos, and wrong videos reached about 0.70. A value that is not a number from -1 to 1 stops each command with exit code 78.CURU_MEMORY_EMBEDDER_MIN_IMAGE_TO_IMAGE_SIMILARITYis the limit when you search with an image and the unit is an image. The default is 0.89 for EmbeddingGemma and 0.35 for other models. Images of the same content score above about 0.93. Different images can score up to about 0.85.CURU_MEMORY_EMBEDDER_MIN_IMAGE_TO_TEXT_SIMILARITYis the limit when you search with an image and the unit is a text. The default is 0.70 for EmbeddingGemma and 0.35 for other models. Correct descriptions of the test images scored from about 0.75. Wrong descriptions and unrelated concepts reached about 0.69.CURU_MEMORY_EMBEDDER_MIN_AUDIO_TO_AUDIO_SIMILARITYis the limit when you search with a clip and the unit is a clip. The default is 0.87 for EmbeddingGemma and 0.35 for other models. Clips of the same speech scored above about 0.94. Different speech scored up to about 0.80.CURU_MEMORY_EMBEDDER_MIN_AUDIO_TO_TEXT_SIMILARITYis the limit when you search with a clip and the unit is a text. The default is 0.70 for EmbeddingGemma and 0.35 for other models. Correct descriptions of the test clips scored from about 0.73. Wrong descriptions reached about 0.69, and unrelated concepts about 0.68.CURU_MEMORY_EMBEDDER_MIN_VIDEO_TO_VIDEO_SIMILARITYis the limit when you search with a video and the unit is a video. The default is 0.92 for EmbeddingGemma and 0.35 for other models. Videos of the same content scored above about 0.96. Different videos scored up to about 0.89.CURU_MEMORY_EMBEDDER_MIN_VIDEO_TO_TEXT_SIMILARITYis the limit when you search with a video and the unit is a text. The default is 0.725 for the curu-vision service, 0.73 for EmbeddingGemma withopenaiand 0.35 for other models. With the curu-vision service, correct descriptions of the test videos scored from 0.721, and the best wrong concept scored 0.723. So the description of one test video gets no match.- Each of these six settings must be a number from -1 to 1. A higher value gives fewer matches, and a lower value gives more. A value that is not a number from -1 to 1 stops each command with exit code 78.
Set the task prompts
EmbeddingGemma needs a task prompt around each text. curu-memory adds the prompts that Google gives for the model when the model name has embeddinggemma in it:
| Text | Prompt |
|---|---|
| A question | task: search result | query: {text} |
| A section of a concept | title: {title} | text: {text} |
{text} is the text. {title} is the title of the concept, and only the prompt of a section can use it. A different model gets the text with no prompt. Set CURU_MEMORY_EMBEDDER_QUERY_PROMPT for the prompt of a question, and CURU_MEMORY_EMBEDDER_DOCUMENT_PROMPT for the prompt of a section. Each prompt must contain {text}, or the command stops with exit code 78.
A search uses words only and says why in these cases:
- No embedder is set.
- The index has no embeddings, or it comes from a different model or other prompts.
- The index comes from another protocol, or from another fingerprint of the vector space of the curu-vision service.
- The embedder fails or does not answer in time.
An index from version 0.1.0 has no record of its prompts, so it counts as an index with no prompts. To use a different model or other prompts, run the index command again. The index command keeps an embedding cache in the data directory, so a second run sends only the changed text and media to the embedder.
Use the curu-vision model service
The curu-vision model service serves EmbeddingGemma 2 with its own API. It runs one fixed build of the model on the CPU. curu uses the same build, so curu and curu-memory get the same vectors. curu-memory sends each text with its role, a question or a section, and the service adds the task prompt.
Run the service of curu-vision 0.45.0 or a later version, with the model embeddinggemma-2. The first command downloads the model one time:
uv run --with "curu-vision>=0.45.0" python -m curu_vision fetch embeddinggemma-2
export CURU_VISION_TOKEN=$(head -c 32 /dev/urandom | base64)
uv run --with "curu-vision>=0.45.0" python -m curu_vision serve --config service.toml
The file service.toml names the model and the address. For one computer, use this file:
models = ["embeddinggemma-2"]
request_timeout_s = 600
[bind]
address = "127.0.0.1"
port = 8765
Then set two variables:
export CURU_MEMORY_EMBEDDER_URL=http://127.0.0.1:8765
export CURU_MEMORY_EMBEDDER_TOKEN="$CURU_VISION_TOKEN"
For a service on another computer, give its https:// address, because private text goes to it.
- The token is the token of the service. By default, the service reads it from
CURU_VISION_TOKEN. The service refuses each request with no token. WithoutCURU_MEMORY_EMBEDDER_TOKEN, each command stops with exit code 78. - A process that reads a
.envfile cannot run$(cat ...). Name the file of the token inCURU_MEMORY_EMBEDDER_TOKEN_FILEin place ofCURU_MEMORY_EMBEDDER_TOKEN. curu-memory reads the file when a command starts the embedder. It removes one newline at the end of the token. - The token file has the checks of the key file. Give it mode 0600, with your user as its owner, and keep it out of the data directory. curu-memory refuses a symbolic link or a second hard link. A bad file stops each command that uses the embedder with exit code 78, and no message holds the token.
CURU_MEMORY_EMBEDDER_TOKENandCURU_MEMORY_EMBEDDER_TOKEN_FILEtogether stop each command with exit code 78.- The default model is
embeddinggemma-2, the name that the service uses.CURU_MEMORY_EMBEDDER_MODELchanges it. - On a CPU the service is slow. A section of 6,000 characters takes about 20 seconds. Set
CURU_MEMORY_EMBEDDER_TIMEOUTto some minutes for the index command, for example600. Setrequest_timeout_sinservice.tomlto the same value or more, as in the example above. - curu-memory adds no prompt, so that the text never gets a prompt two times.
CURU_MEMORY_EMBEDDER_QUERY_PROMPTandCURU_MEMORY_EMBEDDER_DOCUMENT_PROMPTstop each command with exit code 78. - The index records the fingerprint of the vector space of the service. An index stays valid with each service that gives the same fingerprint, also on another engine or another computer. When the fingerprint changes, a search uses words only. The
noticeline gives the old and the new fingerprint. Then index each space again. - curu-memory sends the service only the modalities that its vector space claims. When a service does not claim video, the index report gives a warning for each video. The search of text, images and audio still works.
- A service that does not claim text gives no search by meaning, so a search uses words only. The index command stops, and the message names the modality and the fingerprint. A search with an image, an audio clip or a video that the service does not claim gives a notice and no results.
- A service that claims no vector space gives no vectors. The index command stops, a search uses words only, and the message gives the reason of the service. curu-memory needs curu-vision 0.44.0 or later for this claim.
- The service embeds images, audio clips and videos. It decodes each file itself. A clip longer than 30 seconds fails, and the index report gives a warning for it.
- Do not use the protocol
openaiwith this service. The index command and the search refuse the answer of the service, because the text would get two prompts.
Index again after a change of the protocol
The vectors of the old index come from another protocol, so index each space again one time. Until then, a search uses words only, and the notice line says why.
-
Set the variables of Use the curu-vision model service.
-
Index the global space with
--new-embedder:curu-memory index --concepts ./knowledge --new-embedder
-
Read the warnings of the report. Each warning names a space that still has the old embedder.
-
Index each of these spaces in the same way, with its own directory and
--space:curu-memory index --concepts ./team-look --space team/look --new-embedder
-
Stop the server and the browser, and start them again with the variables of step 1.
-
Search one time. The
modeline must sayhybrid:curu-memory search "VAE for WAN"
Do the same steps when you go back to openai. The embedding cache keys each vector by the identity of the embedder. The first index run with a new embedder embeds each text again. An index run of the global space with an earlier embedder uses its old cache entries.
Connect a local agent
A local agent starts curu-memory itself and talks to it on stdio:
curu-memory serve
Do not run this command by hand. Give it to the MCP client, as in the Quickstart. The server reads the index of the data directory. Messages for a person go to stderr. Set CURU_MEMORY_PRINCIPAL in the environment of the MCP client, so that the agent reads your personal and team spaces. To give the agent less than your access, see Limit a local agent to one grant.
Limit a local agent to one grant
A local agent on stdio reads as CURU_MEMORY_PRINCIPAL. To give it less, start it as the agent of one grant:
curu-memory serve --grant 3
The process then reads, reads a concept file and writes only in the space of that grant. A write in another space gets access_refused, and the audit log records it. The process cannot move a concept or give consent to a move, because a move needs two spaces. It can write a scratch note only with a grant on your personal space. A grant that is not live stops the command with exit code 78. This limit is not a security boundary: a process can start with no --grant. With --transport http, serve refuses --grant with exit code 2, because the token of each request decides.
Connect a remote agent
A remote agent connects over streamable HTTP. The server refuses each request without the token:
export CURU_MEMORY_HTTP_TOKEN="$(python -c 'import secrets; print(secrets.token_urlsafe(32))')"
export CURU_MEMORY_OIDC_RESOURCE=https://memory.example.com/mcp
curu-memory serve --transport http --host 0.0.0.0 --port 6474
- The token must have 32 characters or more. Without it, the server does not start and exits with 78.
--hostsets the address. The default is127.0.0.1, which only this computer can reach.- curu-memory serves plain HTTP only. On an address other than
127.0.0.1,::1orlocalhost, put a TLS proxy in front of it. SetCURU_MEMORY_OIDC_RESOURCEto thehttps://address of the proxy, with/mcp. Without anhttps://value, the server does not start and exits with 78. - On such an address, the server accepts only the Host header of
CURU_MEMORY_OIDC_RESOURCE. The Host header is the server name in the request. A request with a valid token and another Host header gets HTTP 421. A request with another Origin header gets HTTP 403. --portsets the port, from 1 to 65535. The default is 6474.- A request without the token, or with a different token, gets HTTP 401 and no knowledge.
Then connect the agent with the same token:
claude mcp add --transport http curu-memory https://memory.example.com/mcp --header "Authorization: Bearer $CURU_MEMORY_HTTP_TOKEN"
To run the server with rauthy and a TLS proxy in one step, see Deploy the stack with TLS.
Connect agents with OIDC tokens
Use OIDC tokens on HTTP, so that each person has their own identity. curu-memory checks each access token with the keys of one OIDC provider. It never issues a token, and it keeps no password.
-
Register each person, and link the person to the issuer and the subject (
sub) of their tokens. For a new person, useadd:curu-memory access person add me --issuer https://auth.example.com/application/o/curu-memory/ --subject 4f0c2a
For a person that exists, use
link. A new link replaces the old link of the person:curu-memory access person link me --issuer https://auth.example.com/application/o/curu-memory/ --subject 4f0c2a
Give
--issuerthe same text asCURU_MEMORY_OIDC_ISSUERand as theissof the tokens, with the same last/. -
Set the settings in the table below. Set
CURU_MEMORY_OIDC_RESOURCEto the address that the MCP clients use, for examplehttps://memory.example.com/mcp. Then start the server:curu-memory serve --transport http --host 0.0.0.0 --port 6474
-
Connect the MCP client with no token. The MCP client finds the provider from the metadata of the server, and asks the person to log in:
claude mcp add --transport http curu-memory https://memory.example.com/mcp
| Setting | Meaning | Default |
|---|---|---|
CURU_MEMORY_OIDC_ISSUER |
The issuer URL of the provider, as in the iss of a token. It turns on the OIDC mode. Plain http is only for an issuer on 127.0.0.1, ::1 or localhost. |
none |
CURU_MEMORY_OIDC_RESOURCE |
The canonical URI of the server: the address that the MCP clients use, with /mcp. On a network address it must start with https://. |
http://<host>:<port>/mcp of serve |
CURU_MEMORY_OIDC_AUDIENCE |
The value that the audience (aud) of a token must hold. |
the resource |
CURU_MEMORY_OIDC_TOKEN_TYPES |
The accepted typ values of the token header, separated by commas. |
at+jwt |
CURU_MEMORY_OIDC_BASIC_CLIENT_ID |
The client identifier for the exchange of an app password. Empty turns the exchange off. See Let an agent send its app password. | none |
A bad value stops each command with exit code 78.
- The server publishes its metadata at
/.well-known/oauth-protected-resource/mcp. It names the provider. - A request with no token, or with a refused token, gets HTTP 401. The
WWW-Authenticateheader names the metadata URL. - curu-memory refuses a token with a bad signature, the algorithm
noneor an HMAC algorithm. - It also refuses a token of another issuer or audience. It refuses a token whose header has a
typthat is not in the list. A token with notyppasses this check. - It also refuses an expired token, and a token that is valid for more than 1 hour. It refuses a token that names no registered person and no registered agent.
- Each refused token writes a line to the audit log, with the reason and no part of the token.
- curu-memory reads the keys of the provider again for an unknown key, at most one time each 60 seconds. After a failed read, it waits 10 seconds.
- With
CURU_MEMORY_OIDC_ISSUER,serveignoresCURU_MEMORY_HTTP_TOKEN, and writes a notice to stderr. The static token is the basic mode only when you use no OIDC provider.browseuses the static token unless you set its own login withCURU_MEMORY_BROWSE_CLIENT_ID. - A token of an agent, for example a token of the client credentials grant, reads only the spaces of its grants. See Give an agent its own access. A token of no person and no agent gets HTTP 401.
Use Authentik
Authentik puts the client identifier of its OAuth client in aud, and writes the token type JWT. Make one provider only for curu-memory, so that no token of another application has that aud:
- In Authentik, make an OAuth2/OpenID provider and an application for curu-memory. An Authentik blueprint can also make them.
- Select a signing key for the provider, for example
authentik Self-signed Certificate. Without a signing key, Authentik signs with HS256, and curu-memory refuses each token. - Add the redirect URI of your MCP client to the provider.
- Find the client identifier and the issuer of the provider. The issuer is
https://<authentik host>/application/o/<application slug>/. - Set
CURU_MEMORY_OIDC_ISSUERto the issuer,CURU_MEMORY_OIDC_AUDIENCEto the client identifier, andCURU_MEMORY_OIDC_TOKEN_TYPEStoat+jwt,JWT. - Find your
sub. The subject mode of the provider sets it. The default is a hash of your user identifier, which you can read in one of your tokens. With the subject mode "Based on the User's username", yoursubis your user name. - Link your person to your
subwithcuru-memory access person link.
With the type JWT, or with no type, curu-memory also requires the claims azp and scope. An ID token of Authentik has no scope, so curu-memory refuses an ID token that an MCP client sends as an access token.
Give an agent its own access
An agent acts for one person, and reads only the spaces of its grants. First, register the agent. Then give it a grant:
curu-memory access agent add scout --person me --issuer https://auth.example.com/application/o/curu-memory/ --subject 9b1e7d
curu-memory access grant scout --space team/look --role read --days 30
- Use
--subjectfor an Authentik service account: itssubis in each of its tokens. Use--clientfor a rauthy client, whose tokens have nosub. A token with asubis the agent of a client only when thesubis the client identifier. Thus a person that logs in through that client is not the agent. - In a space, an agent gets the weaker of two roles: its strongest live grant, and the current role of its person. When the person loses a role, the agent loses it too.
- A grant lasts 90 days by default, and at most 366 days. The command refuses a grant that is stronger than the role of the person.
access grantprints the identifier of the grant. End a grant withcuru-memory access revoke <id>. From its next request, the agent reads that space only through its other live grants for that space, if it has some.curu-memory access agent remove <name>removes an agent and its grants. When you remove a person, its agents go too.curu-memory access showlists each agent and its live grants.- An agent with no live grant gets the error
access_refused. Each audit line of an agent names its person in the keyacts_for. - A token that matches more than one person or agent gets HTTP 401, with the audit reason
more than one principal.
Let an agent send its app password
Many agent tools can send only a fixed header, and an Authentik token expires after some minutes. Set CURU_MEMORY_OIDC_BASIC_CLIENT_ID to the client identifier of the provider, for example curu-memory. Then an agent can send the user name and the app password of its Authentik service account, in the header Authorization: Basic <base64 of user name:app password>.
- curu-memory sends them to the token endpoint of the issuer, with the client credentials grant. Then it checks the token as each other token.
- curu-memory keeps the token until 30 seconds before its
expor itsexpires_in, whichever comes first, and at most 1 hour. It finds the kept token by the SHA-256 of the header, so it keeps no password. - A refused exchange gets HTTP 401, and the audit log gets a line with the reason
basic exchange refused. No line holds the user name or the password. - curu-memory keeps a refused header for 10 seconds, so a repeat of it sends no request to the issuer.
- At most 4 exchanges run at the same time. More Basic requests wait, and bearer tokens do not wait for them.
- The token endpoint must use
httpsoff loopback. - The app password goes to curu-memory with each request, so put TLS in front of curu-memory. Leave the setting empty where no agent needs it.
Use the shipped rauthy
If you have no OIDC provider, use the rauthy of deploy/rauthy/. rauthy is an OIDC provider in one container, with no database server. Run these commands from the root of the repository:
deploy/rauthy/init.sh
docker compose -f deploy/rauthy/compose.yaml up -d
deploy/rauthy/setup.sh
init.shwritesdeploy/rauthy/local/with new random secrets, one time. Git ignores that directory.- rauthy listens on
127.0.0.1:6480, and its issuer ishttp://localhost:6480/auth/v1/. setup.shalso puts the canonical URI in each token of the clientcuru-memory-cli, whichcuru-memory loginuses. A code of that client is valid for 5 minutes.setup.shlets the OAuth clientcuru-memoryask for tokens forhttp://127.0.0.1:6474/mcp. SetCURU_MEMORY_OIDC_RESOURCEbeforeinit.shandsetup.shfor another address.- The OAuth client
curu-memoryuses the authorization code grant with PKCE (S256). Its redirect URIs arehttp://localhost:6476/callbackandhttp://127.0.0.1:6476/callback. An MCP client that uses another redirect URI registers its own OAuth client. - The first start writes the password of
admin@localhostto the log of the container. Read it withdocker compose -f deploy/rauthy/compose.yaml logs rauthy. - Make your user in the admin pages of rauthy. A user needs a given name. Your
subis the user identifier that rauthy shows. - An access token of the OAuth client
curu-memoryis valid for 10 minutes.
See deploy/rauthy/README.md for a server on a network, behind a TLS proxy.
Deploy the stack with TLS
Deploy curu-memory, rauthy, an embedder and the TLS proxy Caddy together on a server with Docker. The stack serves three host names over HTTPS: the MCP server, the browser and rauthy. Caddy gets their certificates from Let's Encrypt. You need a server with ports 80 and 443 free, and a DNS name for each of the three host names. The stack needs Docker Compose 2.20 or later. Run these commands from the root of a clone:
MEMORY_HOST=memory.example.com BROWSE_HOST=browse.example.com AUTH_HOST=auth.example.com ACME_EMAIL=me@example.com CONCEPTS_DIR=/srv/knowledge deploy/stack/init.sh
docker compose -f deploy/stack/compose.yaml --env-file deploy/stack/local/.env up -d --build
deploy/stack/setup.sh
init.shwritesdeploy/stack/local/one time, with new random secrets. It refuses to run again whilelocal/exists.- The first start builds the global space from
CONCEPTS_DIR. Each start builds it again. - Each host name accepts TLS 1.3 only, and sends HSTS. Plain HTTP gets a redirect to HTTPS.
- Only Caddy publishes ports. Inside the stack, curu-memory reaches rauthy at its
https://address through Caddy. setup.shlets the OAuth clientcuru-memoryask for tokens forhttps://<MEMORY_HOST>/mcp.- The stack has its own embedder, so a search uses words and meaning. The first start downloads one fixed version of the model from Hugging Face, about 1.5 GB, into a Docker volume. The index waits until the model loads. A new build of the image keeps the model.
- The embedder needs about 4 GB of memory, and its limit is 6 GB.
EMBEDDER_MEMORYchanges the limit. It also uses at most 2 CPUs.EMBEDDER_CPUSchanges that limit. - curu-memory sends private text to Caddy over TLS 1.3, on a port that the stack does not publish. Caddy sends it to the embedder as plain HTTP on a private network. Only Caddy and the embedder share this network, and it has no route out of the server.
- The stack waits up to 300 seconds for each request to the embedder, because an embedder on a CPU is slow. If the embedder does not answer, a search can wait this time before it uses words only.
CURU_MEMORY_EMBEDDER_TIMEOUTchanges the time. - If Hugging Face asks for a login to download the model, set
HF_TOKENbeforeinit.sh. Use a token of an account that accepted the licence of the model. Without the token, the log of the serviceembedder-fetchnamesHF_TOKEN, and the servicesindex,serveandbrowsedo not start. - To use an embedder that you already run, set
CURU_MEMORY_EMBEDDER_URLto itshttps://address beforeinit.sh. The stack then starts no embedder and downloads nothing.init.shrefuses anhttp://address, because private text goes to the embedder. The embedder must servePOST /v1/embeddings, because the stack sets the protocolopenai. The stack cannot use the curu-vision service. - To search by words only, set
EMBEDDER=nonebeforeinit.sh. The stack then starts no embedder. - The stack browser logs you in with rauthy, through the client
curu-memory-browse.setup.shgives the client the redirect address of the browser. - Link your person to your rauthy user one time, as in step 5 of deploy/stack/README.md. Give the issuer of
CURU_MEMORY_OIDC_ISSUERindeploy/stack/local/curu-memory.env.CURU_MEMORY_BROWSE_ISSUERhas the same value. Without the link, the login gives "no person links this subject". - The stack sets no signing key, and its data volume is read-only for
browse. So the stack holds no proposal, and Merge on its review page gives a refusal. - The stack without an embedder uses less than 1 GB of memory.
To test the stack on one computer, use local mode. Caddy then uses its own certificate authority (CA) for memory.localhost, browse.localhost and auth.localhost. Give the directory of your concept files:
STACK_MODE=local CONCEPTS_DIR=$PWD/knowledge deploy/stack/init.sh
Then start the stack with the docker compose command above. Then run deploy/stack/setup.sh. It copies the root certificate of the CA to deploy/stack/local/caddy-root.crt. Give that file to each client, for example curl --cacert deploy/stack/local/caddy-root.crt https://memory.localhost/mcp. deploy/stack/README.md gives the other settings, the trust of the CA and the staging certificates of Let's Encrypt.
Run the key service in the stack
The stack can run OpenBao as the key service of the recovery slot. Start it only when you use a protected key file.
-
Set
KEY_SERVICE=1beforeinit.sh. In local mode, the key service is atkeys.localhost. On a host, setKEYS_HOSTto a name with DNS, or the stack useskeys.and the domain ofMEMORY_HOST. -
Start the stack and run
setup.sh, as above. -
Find your user id in the admin page of rauthy. Then set up the key service one time:
OWNER_SUBJECT=<your rauthy user id> deploy/stack/keys-setup.sh
-
Keep the unseal key that the command prints in a safe place, for example a password manager. The command saves it nowhere.
-
Restart the key service. A restart seals it:
docker compose -f deploy/stack/compose.yaml --env-file deploy/stack/local/.env restart openbao
-
keys-setup.shmakes the transit keycuru-memory-kekand the rolecuru-memory-owner. Only your rauthy user can decrypt with it, through the clientcuru-memory-keys. -
Set
AUDIENCEforkeys-setup.shto theaudof the token of your login. The default iscuru-memory-keys. -
The command revokes the root token at its end, also after a failed step.
-
The key service writes each request to its audit log,
/openbao/logs/audit.login the volumeopenbao-logs. -
Caddy passes only the requests of the recovery slot to the key service. Each other path answers 404.
-
A sealed key service decrypts nothing, also for a person with a copy of its volume. Unseal it only for
key new --protect,key protectandkey recover:docker compose -f deploy/stack/compose.yaml --env-file deploy/stack/local/.env exec openbao bao operator unseal
-
Only Caddy shares the network of the key service, and that network has no route out of the host.
-
An administrator of the key service with the unseal key can decrypt the recovery slot. Trust the operator of the key service.
Read a concept and follow its links
These five tools are read-only. The tools propose_concept, propose_change, propose_batch and propose_move write proposals. See Propose a concept, Propose a change of a concept, Propose many concepts in one batch and Move a concept to a wider tier.
| Tool | Input | Result |
|---|---|---|
search_knowledge |
question, and optional limit, types, exclude_types and tags |
The matching concepts, the mode and the notice, as in Search the knowledge. |
search_knowledge_by_media |
media as base64 text or a base64 data: URI, and optional limit, types, exclude_types and tags |
The same object as search_knowledge, with the mode media. See Search with media. |
get_concept |
id |
The fields of one concept, its space, its path, its full Markdown body and its media list. Each media item gives the path relative to the concept directory, the sha256 and the mime type of an image, a clip or a video. |
concept_neighbours |
id |
The links from the concept (outgoing) and to the concept (incoming). |
read_concept_file |
id |
The full file of the concept on main: its id, text, its version (the sha256 of text), its space and its path. The tool reads only a concept in a space that takes proposals. |
Each neighbour gives the identifier, the link kind and the title of the other concept. resolved is false for a link to a concept that is not in a space that the caller can read. Such a link has no title. Use these tools in sequence: search, read the best concept, then follow its links for more context.
Propose a concept
An agent can propose a new concept with the tool propose_concept, in global, in a team space or in a personal space. The concept goes on its own git branch. Search does not find it until a person with the maintain role, or an agent with a grant of maintain, merges it. In a personal space, the person of the space has admin, which includes maintain.
Prepare the server for proposals
-
Keep the concept files of each space that takes proposals in a git work tree that has a branch
main. The directory of a team space or a personal space is an encrypted space, as Encrypt the concept files of a private space says. Use this work tree for the server only. -
Make the server key, an SSH key with no passphrase:
ssh-keygen -t ed25519 -N "" -C server@curu-memory.invalid -f ~/.config/curu-memory/server-key
-
Add its public key to the file of allowed signers of Sign the commits of an encrypted space:
echo "server@curu-memory.invalid namespaces=\"git\" $(cat ~/.config/curu-memory/server-key.pub)" >> ~/.config/curu-memory/allowed_signers
-
Set the settings in the environment of
serve:export CURU_MEMORY_SPACE_DIRS=global=/srv/knowledge export CURU_MEMORY_SIGNING_KEY=~/.config/curu-memory/server-key export CURU_MEMORY_ALLOWED_SIGNERS=~/.config/curu-memory/allowed_signers
-
Register the agent, as in Give an agent its own access. Then give it the
writerole inglobal:curu-memory access grant scout --space global --role write.
| Setting | Meaning | Default |
|---|---|---|
CURU_MEMORY_SPACE_DIRS |
The concept directory of each space that takes proposals, as space=path entries separated by commas. Each path is absolute. A private space also needs CURU_MEMORY_KEK_FILE. |
none: the server refuses each proposal |
CURU_MEMORY_SIGNING_KEY |
The server key: the SSH private key that signs each commit of the server. Its public key must be in the file of allowed signers. | none: the server refuses each proposal |
CURU_MEMORY_ALLOWED_SIGNERS |
The file of allowed signers. The server checks each of its own commits with it. | none: the server refuses each proposal |
- The server is the only writer of this work tree. Do your own edits in another clone, and push them to the same remote.
- The server does not push. Push
mainfrom the work tree after each merge. - An SSH agent can hold the key in place of a key with no passphrase.
Call the tool
| Input | Meaning |
|---|---|
space |
The space of the new concept: global, team/<slug> or personal/<handle>. The agent needs the write role there. |
id |
The new concept identifier: 1 to 128 characters from a to z, 0 to 9, ., _ and -. The first character is a letter or a digit, and the identifier has no ... It is also the file name, with .md. |
text |
The full concept file, as in Write a concept file, with the provenance keys below. At most 256 KiB. |
A proposed concept must have these keys in its front matter:
| Key | Meaning |
|---|---|
tier |
The space of the proposal, for example global or team/look. |
sources |
A list of 1 or more mappings, for example - url: https://example.com/guide. |
confidence |
How certain the claim is, from 0 to 1. 1 means certain, 0.5 means as likely as not, and 0.2 means a guess. |
date |
The date of the sources and the proofs, as YYYY-MM-DD. |
evidence |
1 or more proofs that a reader can reproduce, as in Give a proof for each concept. |
The server writes author, the handle of the person behind the agent, and agent, the name of the agent. The server refuses a concept that names another author or another agent. It also refuses a concept with media, because a proposal holds text only.
The result gives the id of the proposal, its space, the concept identifier concept_id, the state open, the branch proposal/<id> and the commit. It also gives author, agent (null for a person) and the UTC time created. reviewer, merged and merge_commit are null until the merge. kind is new. closed_by, closed and reason are null until a close. The branch has one commit, and the server key signs it. Its git author is the person, as <handle> <<handle>@users.curu-memory.invalid>. Its committer is curu-memory <server@curu-memory.invalid>. The commit message holds the line Curu-Proposal: <id>, and for an agent the line Curu-Agent: <name>. It holds no concept text.
A refused proposal makes no branch and no record. The error codes are access_refused, invalid_concept, invalid_argument and proposal_refused, in Handle errors. With OIDC tokens, a person token needs the scope knowledge:write to propose.
Propose in a private space
A proposal in a team space or a personal space keeps the name of its concept secret. The git host and the data directory of the server show no concept identifier, title or path:
- The branch writes one encrypted object,
objects/<object id>, under the current space key. A new concept gets a new object. A change writes the object of the concept again, with the same object id. - The commit message holds the same lines as in
global. No line names the concept. - In the result and in the record,
concept_idisnull. The record holds a keyed hash of the concept identifier in its place. The hash stops two open proposals of one concept. - One concept identifier has one open proposal in all of the spaces. The tool refuses a second proposal of the same identifier with the reason
id in use, also in another space. - The tool refuses a private space whose directory is not an encrypted space, with the reason
not encrypted. - In a private space, the work tree must be on
main, with no uncommitted change and no merge in progress. Elsepropose_concept,propose_changeandread_concept_filerefuse with the reasoncheckout not ready. proposal completerefuses a private space, with the reasonencrypted space.
Propose a change of a concept
An agent with the write role changes one existing concept with two tool calls. The concept can be in global, in a team space or in a personal space. With OIDC tokens, a person token needs the scope knowledge:write to propose a change.
- Call
read_concept_filewith theid. Keeptextandversion. - Change
text. - Call
propose_changewithspace,id,versionand the newtext.
- Send the full file, with each key that you did not change. The server refuses a file that changes
author,agentorcontributors, because it sets them. authorstays the first author of the concept. The tool refuses a change of a concept with noauthor: a person withmaintaincompletes it first. The server adds the person of the change tocontributors, unless the person is the author or is in the list.- The concept needs the provenance keys of Call the tool. Complete old concepts first, as in Complete the provenance of old concepts.
- The change goes on its own branch. Search shows the old text until a person with
maintain, or an agent with a grant ofmaintain, merges it. - If the concept changed after you read it, the tool refuses the change with the reason
stale. Read it again, and propose again. - If the concept changes on
mainafter the proposal, the merge closes the proposal as stale. Then read the concept again, and propose again. - The tool refuses a concept that has an open proposal, for example an open completion. It also refuses a text that is equal to the file on
main.
The result is the proposal, as for propose_concept, with the kind change. The commit message holds Curu-Kind: change and Curu-Base: <commit>, the commit of main that the change starts from.
Propose many concepts in one batch
An agent with the write role in global proposes many new or changed concepts in one batch. A person then reviews the batch one time and merges it with one merge commit. An agent with a grant of maintain can also merge it. Use a batch for a large set of concepts, for example one concept for each official ComfyUI workflow template.
Call propose_batch with space and items. Each item is an object:
| Key | Meaning |
|---|---|
id |
The concept identifier: 1 to 128 characters from a to z, 0 to 9, ., _ and -. The first character is a letter or a digit, and the identifier has no ... |
text |
The full concept file, with the provenance keys and a proof, as for propose_concept. At most 256 KiB. |
version |
Only for a change: the version from read_concept_file. An item with no version is a new concept. |
folder |
Only for a new concept: a folder of the space, for example templates. Give 1 to 4 names, separated by /. Each name has 1 to 64 characters from a to z, 0 to 9, ., _ and -. A name starts with a letter or a digit, and does not end in .md. With no folder, the file goes at the top of the space. |
- A batch holds 1 to 1000 items. Its texts, as JSON strings with ASCII escapes, hold at most 12 MiB. So a batch under the limit fits in the HTTP body limit of 16 MiB. For more, send more batches.
- A batch over a limit, a concept identifier two times or a bad folder gives
invalid_argument.details.fieldisitemsorfolder. - The server checks each item with the rules of
propose_conceptorpropose_change. One fault refuses the whole batch, and nothing changes. The error isinvalid_conceptwith the reasonbatch fault.details.faultsnames each fault as<concept-id>: <fault>. - In a batch, these causes are faults of
invalid_concept: an unknown concept, a scratch note, and a text equal to the concept onmain. They are not reasons ofproposal_refused. - The concept identifier of a new item must be free. No index, no file on
mainin any folder, and no open proposal can hold it. Else the server refuses the batch withproposal_refusedand the reasonid in use, and the message names each identifier. A change keeps the path of the concept, so it gives no folder. - A new path must not change another file of
main, for example a plain file with the name of the folder. The server refuses it with the reasonbad path. - A changed item that changed on
mainafter you read it refuses the batch withproposal_refusedand the reasonstale(ProposalStalein Python). Read it again, and send the batch again. - The result is the proposal, with the
kindbatchand the number of items inconcepts. The commit message holdsCuru-Kind: batchandCuru-Base: <commit>. - While the batch is open, the server refuses a proposal of one of its concept identifiers with the reason
id in use. - The server refuses a batch in an encrypted space with the reason
encrypted space. - From Python, call
knowledge.propose_batch(space, items)with a list ofcuru_memory.BatchItem.
Review and merge a proposal
A person with the maintain role in the space reviews each proposal and merges it. An agent with a grant of maintain can also merge, as in Let an agent merge proposals. Run the commands on the server, with the settings of Prepare the server for proposals and CURU_MEMORY_PRINCIPAL:
export CURU_MEMORY_PRINCIPAL=me
curu-memory proposal list
curu-memory proposal show <id>
curu-memory proposal merge <id>
git -C /srv/knowledge push origin main
proposal listshows the open proposals of each space where you havemaintain, oldest first. Each row gives the id, the space, the concept identifier, the author, the agent and the UTC time. A completion shows(completion)in place of the concept identifier, and a batch shows(batch: N), with the number of its concepts. Add--space globalfor one space, and--jsonfor a JSON list.proposal showprints the record of the proposal, then its concept file. The record gives the id, the space, the concept identifier, the author, the agent, the time, the state, the branch and the commit. A merged proposal also shows the reviewer, the merge time and the merge commit. Read the sources and the confidence before you merge.- For a batch,
proposal showprints one line for each concept:new <concept-id> <path>orchange <concept-id> <path>. Add--concept <concept-id>to print the file of one concept of the batch. - For a proposal of a private space, the server decrypts the object. Only a person with
maintainin the space sees the concept identifier and the file. Afterspace rekey --remove-old, a proposal from before the rekey does not open, andproposal showstops with exit code 1. proposal mergemakes a merge commit onmainthat the server key signs. The commit message holds the linesCuru-Proposal: <id>andReviewed-by: <handle>. The command then deletes the branch and builds the index of the space, so search finds the concept at once. A concept with no valid proof is not in the index after the merge.--jsonnames it inindex_report.skipped.
The merge refuses a proposal and leaves main as it was in these cases:
| Case | Exit code |
|---|---|
No proposal has the id, the proposal is not open, or you have no maintain role. |
1 |
The space is protected, and you are the author of the proposal (own proposal). |
1 |
An agent merges a proposal of the same agent (own proposal), or an agent gives --bypass (agent bypass). |
1 |
The grant of --grant is not live, has no maintain, or is for another space. Or the proposal is a move. |
1 |
You gave --grant and CURU_MEMORY_PRINCIPAL together. |
2 |
main already holds a concept file with the same identifier. |
1 |
A concept of a completion, a change or a batch changed on main after the proposal. Or main now holds a new path of a batch. The merge also closes the proposal and deletes its branch. |
1 |
The proposal is a move with no consent (no consent), or its concept changed in the source after the start (stale). |
1 |
| Another write held the work tree for 10 seconds. | 1 |
The work tree is not on main, or it has an uncommitted change or a merge in progress. |
78 |
A git command failed, for example the merge. main stays as it was. |
78 |
| The branch is not at the commit of the proposal, or a commit has no valid signature. | 78 |
CURU_MEMORY_SIGNING_KEY, CURU_MEMORY_ALLOWED_SIGNERS or CURU_MEMORY_SPACE_DIRS is not correct. |
78 |
If the index build fails after the merge, the merge stays on main. The command prints the index command to run, and exits with code 1.
The index build after a merge reads the identifiers of the other spaces, to find an identifier in two spaces. A private space can fail to open, for example because the shell has no key file. For that space, the command prints warning: <space>: ... on stderr, and the build goes on. With --json, the warning is in index_report.warnings. The next curu-memory index with the key file checks that space again.
A crash of the server between the commit and the record can leave a branch with no record. proposal list then makes the record from the signed commit, and prints repaired: <id>. When another proposal holds a concept identifier of a batch, repair leaves the branch of the batch with no record.
Let an agent merge proposals
Give an agent a grant of maintain in one space. The agent then reviews and merges the proposals of other agents and persons in that space, under its own name. The git history and the audit log name the agent of each merge.
- Register the agent, as in Give an agent its own access.
- Give it the role for some days:
curu-memory access grant reviewer --space global --role maintain --days 30. The command prints the id of the grant. - On the server, with the settings of Prepare the server for proposals, the agent merges with the id of its grant:
curu-memory proposal merge <id> --grant <grant id>. Do not setCURU_MEMORY_PRINCIPALin the same shell.
From Python, open the knowledge with open_knowledge(grant=<grant id>). Then call knowledge.merge_proposal(<id>).
- The merge commit holds
Reviewed-by: <person>andCuru-Agent: <agent>. The audit line gives"principal": "agent:<agent>"and"acts_for": "<person>". - An agent never merges a proposal of the same agent, and it never uses
--bypass. In a protected space, it does not merge a proposal of its own person, or of another agent of that person. - The grant must be in the space of the proposal, and the grant itself must have
maintain. A grant cannot give more than the person of the agent has, so the person needsmaintainin the space. - A grant does not merge a move, because a move changes two spaces. A person merges a move.
- Give each program that merges its own agent name. Two programs with one agent name look the same in the audit.
- The agent name does not stop a program that can read the data directory, because that program can also set
CURU_MEMORY_PRINCIPAL.
Close a proposal
Close a proposal that nobody will merge. Its concept is then free for a new proposal:
curu-memory proposal close <id> --reason "the proof is of another model"
- Run the command on the server, with the settings of Prepare the server for proposals and
CURU_MEMORY_PRINCIPAL. --reasongives the reason, from 1 to 500 characters. The record keeps it. With no--reason, the reason isclosed by a person.- The
idis in the result ofpropose_concept,propose_change,propose_batchorpropose_move. A person withmaintainalso finds it withproposal list. - A person with
triageor a stronger role in the space closes each proposal. An admin of the source of a move also closes the move, for example to refuse a move that waits for consent. - The command deletes the branch, if the proposal has one, and sets the record to
closed, with the person, the time and the reason. It printsclosed: <id>. - The command refuses an unknown proposal, a proposal that is not open, and a person who may not close it, with exit code 1.
- Each close and each refused close writes one audit line with the action
closed.
Review a proposal in the browser
Review each open proposal in a web browser, with a readable change, its proofs and its warnings. Then merge it or close it with one button:
curu-memory browse
Open http://127.0.0.1:6475/review. Run browse with the settings of Prepare the server for proposals, because a merge signs a commit.
- The list shows each open proposal of a space where you have
maintain, with its space, kind, concept, author, agent and time. A batch shows its number of concepts. - The page of a proposal needs
maintain, asproposal showdoes. It shows the record, the commit, the base and the state of the signature. - For each concept, the page compares the new text with its text at the base of the proposal. It shows each front-matter key whose value changed, with the old and the new value. A new layout of the YAML is not a change. It also shows each added or deleted section, and the deleted and added words of each changed line.
- The page shows each proof of
evidence, with its kind, its inputs and its result. - A notice says when
mainchanged after the base. The merge then closes the proposal as stale. A private proposal and a move get no notice. - Merge needs
maintain, and Close needstriageand a reason. Each button does the same asproposal mergeandproposal close, with the same refusals and the same audit lines.
The page warns you of three faults that you must check by hand. A warning does not stop a merge:
| Warning on the page | What it means |
|---|---|
| A statement is deleted or changed | A statement of the old body is not in the new body. A statement is a list item, a table row or a sentence. A heading and the section Proof run hold no statement. Check that the change may delete or change it. |
| A sentence says that the owner accepted, but the verdict names ... | The verdict of the proof names an actor that is not a registered person, for example an agent that acts for the owner. |
| A mark is added beside the setting ... | The change adds a mark such as "(The proof run ... used cfg = 4.0 ...)" beside a setting. Check that the run contradicts the statement. |
The buttons work only for a known person:
- With no login, the browser is the browser of
CURU_MEMORY_PRINCIPAL. The buttons work only whenbrowselistens on loopback, the default. On another address, the pages show no button. - With a login, you log in with your OIDC provider, and the buttons work on each address in
CURU_MEMORY_BROWSE_URL. On another address, the login gets HTTP 403. Use a login to review from a phone. Review from a phone gives the setup of Tailscale, of a public host name, and of the client at rauthy and at Authentik.
| Setting | Meaning | Default |
|---|---|---|
CURU_MEMORY_BROWSE_CLIENT_ID |
The client id of the browser at the provider. It turns on the login. | none: no login |
CURU_MEMORY_BROWSE_ISSUER |
The issuer of the login. | CURU_MEMORY_OIDC_ISSUER |
CURU_MEMORY_BROWSE_URL |
A comma list of the base addresses of the browser, each with https://, or http:// on 127.0.0.1, ::1 or localhost, and no path. The provider sends you back to <base>/login/callback. A login needs it. |
none |
CURU_MEMORY_BROWSE_SESSION_HOURS |
The life of a session, from 1 to 168 hours. | 12 |
- A login is OIDC with the authorization code grant and PKCE, as a public client. The browser keeps no client secret.
- The browser finds your person by the issuer and the subject of your login, as
access person linkgives them. An agent cannot log in to the browser. - With a login, each page needs a session, also on loopback. A session ends after its life, at Log out, and when
browserestarts. - Each button sends the form token of your page. The browser also checks the host and the origin of each request, so another site cannot press a button for you. With no login, a request through a proxy cannot press a button.
- A private proposal opens only in memory, and the page tells the web browser to keep no copy.
- This page shows no media of a proposal yet, because a proposal takes text only.
Move a concept to a wider tier
Move a concept that is ready for more readers. A move goes from your personal space to a team space or to global, or from a team space to global. A person with maintain in the target reviews the move and merges it. After the merge, the concept is only in the target.
-
Start the move on the server, with the settings of Prepare the server for proposals:
export CURU_MEMORY_PRINCIPAL=me curu-memory proposal move tiled-vae --from personal/me --to global
The command prints
proposed: <id>, the target space andconsent: yes. -
A person with
maintainin the target reviews and merges the move, as in Review and merge a proposal:curu-memory proposal show <id> curu-memory proposal merge <id>
-
Search the target for the concept. The search of your personal space no longer finds it.
These rules apply to each move:
- You need the
writerole in the source and in the target. Inglobal, only an instance owner or a person withmaintainhaswrite. - With OIDC tokens, a person token needs the scope
knowledge:writeto start a move or to give consent. - The move needs the consent of an admin of the source. You are the admin of your personal space, so your own move has consent at once.
- An agent calls the tool
propose_movewithsource_space,idandtarget_space. An agent withadminin the source gives consent when it starts the move. To let an agent move a concept with no manual step, give itadminin your personal space. - A move of a person or an agent with
write, and notadmin, in the source waits for consent. The tool result hasconsent: false, and the command printsconsent: no: it waits for proposal consent. The target holds nothing of the concept until the consent. - Give consent with
curu-memory proposal consent <id>, or with the toolconsent_move. It needsadminin the source. Theidis in the result ofpropose_moveorproposal move. The command printsconsented: <id>. - To refuse a move, close it with
curu-memory proposal close <id>. The concept stays in the source, and it does not change. - The moved file gets the target space as its
tier. Itsauthorandagentdo not change. The person of the move goes intocontributorswhen that person is not the author. - The merge makes the signed merge commit in the target. Then it makes one signed commit in the source that deletes the concept. The git history of the source keeps the old encrypted object.
- If the concept changes in the source after the start, the consent or the merge closes the move with the reason
stale. Start the move again. - If the server stops between the two commits, the next
proposal listdeletes the concept from the source and printsrepaired: <id>. Until then, no proposal can change the concept in the source. If a person edits the source concept by hand in that time, the repair keeps it. It then writes aremovedline with the outcomerefused. Each laterproposal listwrites this line again. No proposal can change the concept until you delete the source copy, for example in a checkout of the source space. proposal showof a move prints the moved file, with the target as itstier. A move that waits for consent has no file yet.- In a private space, no commit message and no proposal record names the concept.
- The start writes the audit action
proposed. A later consent writesconsented. The merge writesremovedin the source andmergedin the target. A close writesclosed, and a refused step writes one line with the outcomerefused.
The command prints the message and exits with code 1 in these cases. The tool gives the reason in details.reason.
| Case | Reason |
|---|---|
The target is not a wider tier, for example global to a team, or one team to another. |
not wider |
You have no write role in the source or in the target. |
no write role |
| The source has no concept with the id. | unknown concept |
| The concept is a scratch note, or it has media. | scratch note or media |
| The concept has an open proposal, or another space holds the id. | id in use |
The concept has no author, or it breaks a rule of OKF. |
missing provenance or schema fault |
Complete the provenance of old concepts
Old concepts, for example those of curu, often have no tier, author, confidence or date. validate names each of them with a fault of the kind provenance. The index reads such a concept only when it gives a proof. Such a concept does not obey the provenance rule that propose_concept uses for a new concept. Complete them with one reviewed proposal:
export CURU_MEMORY_PRINCIPAL=me
curu-memory proposal complete --space global --author me --confidence stable=0.9,unverified=0.5,draft=0.3,superseded=0.1,none=0.5
curu-memory proposal show <id>
curu-memory proposal merge <id>
- Run the commands on the server, as a person with
maintain, with the settings of Prepare the server for proposals. --authornames the registered person who answers for the old concepts. Theauthorof each source stays as it is.--confidencegives the confidence of eachstatus, from 0 to 1. 1 means certain, 0.5 means as likely as not, and 0.2 means a guess.noneis the value for a concept with no status. These values are examples: choose your own. The command refuses a status that the map does not cover.- The command adds only the keys that a concept does not have. It does not add
sourcesorevidence, and it does not correct a key that is there. After the merge,validatestill names those faults. A completed concept still needs a proof. tieris the space.dateis the newest ofverified.at,generated.at,superseded_atand thelast_modifiedof each source. With none of these, it is the date of the last commit of the file.- The proposal is one signed commit that changes each incomplete concept of the space, on a branch
proposal/<id>.maindoes not change until the merge.proposal showprints the change of each file. - The command refuses while a completion of the space is open, or while a concept of the space has an open proposal. With nothing to complete, it prints
Nothing to complete.. - The command prints
proposed: <id>,branch: proposal/<id>andconcepts: N. N is the number of concept files that the proposal changes.--jsonprintsid,branch,conceptsandskipped. - The command leaves out a file whose front matter it cannot read, and names it on stderr as
skipped: <path>: the front matter cannot be read. With--json, the listskippedholds the same text for each file. - If a concept of the completion changes on
mainbefore the merge, the merge closes the proposal as stale. It printsclosed: <id> (stale), deletes the branch and exits with code 1. Runproposal completeagain.
Keep scratch notes of an agent
An agent can keep a note of its work, for example a plan or a partial result. A person can also write a note. The note stays in the personal space of the person, or of the person that the agent acts for. A note is not knowledge: it needs no source and no review, and a search leaves it out.
The agent or the person calls the write_scratch_note tool:
| Input | Meaning |
|---|---|
id |
The note identifier: 1 to 128 characters, with the rule of the id of Propose a concept. It is also the file name, with .md. |
title |
The title of the note: 1 to 200 characters, on one line. |
body |
The Markdown text of the note. The whole file is at most 256 KiB. |
The tool has no space input. The space is personal/<handle> of the caller, or of the person that the agent acts for. The server writes the front matter of the note:
type: Scratch
title: Plan for the tiles
description: Plan for the tiles
scratch: true
tier: personal/me
author: me
agent: scout
date: 2026-11-04
- The personal space must be an encrypted space in a git work tree, with the settings of Prepare the server for proposals. Else the tool refuses with the reason
not encrypted,no concept directoryornot signed. - The agent needs
writein the personal space. Give it withcuru-memory access grant scout --space personal/me --role write. With OIDC tokens, a person token needs the scopeknowledge:write. - The note goes on
mainwith no review, as one encrypted object in one signed commit. The commit message iscuru-memory: write a scratch noteand, for an agent,Curu-Agent: <name>. Git holds no note identifier, title or text. - Then the server indexes the personal space again. The result gives
id,space,commit,replacedandindex_error.commitis the hash of the signed commit onmain. The audit line names the same commit.index_errorisnull, or it says why the index run failed. The note stays onmainwhen the index run fails. - A second write with the same identifier replaces the note. Then
replacedistrue. - The tool refuses an identifier that a concept or an open proposal has, with the reason
id in use. It refuses a checkout that is not on a cleanmain, with the reasoncheckout not ready. propose_conceptandpropose_changerefuse a text with the keyscratch, with the reasonscratch note.propose_changealso refuses a scratch note. A note does not go to a team space or toglobal.- The index skips a file with
scratch: truein a team space or inglobal, and names it as a fault. It also skips a file whosescratchkey has a value other thantrue.
To read the notes back, search with scratch set to true, or run curu-memory search --scratch. Only the person of the personal space and the agents of that person can read the notes. concept_neighbours and the browser never show a note. A link to a note looks like a link to a missing concept.
To delete a note, do these steps:
- Push
mainfrom the work tree of the server. - In another clone, pull
main. - Delete
<id>.mdin a checkout of the space. - Run
curu-memory space commit --space personal/me. - Push the commit.
- In the work tree of the server, run
git pull --ff-only. - Index the personal space again with
curu-memory index --space personal/me --concepts <dir>. Until then, a search withscratchstill finds the note.
Browse the knowledge
A person can search the knowledge and follow the links of a concept in a web browser:
curu-memory browse
--hostsets the address. The default is127.0.0.1, which only this computer can reach.--portsets the port, from 1 to 65535. The default is 6475.
Open http://127.0.0.1:6475/. Type a question, and the page lists the same concepts, in the same order, as the search_knowledge tool. Each result shows its title, type, description, tags and score. The score, the mode and the notice mean the same as in Search the knowledge. Select a result to open its page.
- The page of a concept shows its fields, its sources, its body and its links in both directions.
- The page of a concept also shows each image and plays each clip and video of its
medialist that is in the index. The caption is the path relative to the concept directory. The index holds a copy of each file, so the browser does not need the concept directory. Run the index command again to show a changed file. - A link to another concept in the index opens the page of that concept.
- A link to a missing concept is crossed out and has no address.
The pages are dark. When the settings of your web browser or your computer ask for a light scheme, the pages are light.
Without an index, each page says "No index" and gets HTTP 503. Run curu-memory index, then load the page again.
The pages of the knowledge only read. They accept GET and HEAD only, and each other method gets HTTP 405. Only the buttons of Review a proposal in the browser write.
Each media file has the address /media/<sha256>, from the SHA-256 of its bytes. The browser answers a Range request, so a web browser can seek in a clip. Each other address under /media/ gets HTTP 404. The browser never reads a file path from a request. HTML and scripts in a concept show as text and never run.
To open the browser to other computers, put a TLS proxy in front of it. With a login, the browser needs no token, as Review a proposal in the browser says. With no login, set the token and the address of the proxy:
export CURU_MEMORY_HTTP_TOKEN="$(python -c 'import secrets; print(secrets.token_urlsafe(32))')"
export CURU_MEMORY_BROWSE_URL=https://browse.example.com/
curu-memory browse --host 0.0.0.0
The web browser then asks for a user name and a password. Type any user name, and the token as the password. Without a token of 32 characters or more, the command does not start and exits with 78. Without an https:// value in CURU_MEMORY_BROWSE_URL, it also exits with 78.
Handle errors
A tool failure is an error result. Its text is one JSON object with code, message and details:
{"code": "concept_not_found", "message": "No concept has the identifier 'x'. Use an identifier from search_knowledge.", "details": {"id": "x"}}
| Code | Cause | What to do |
|---|---|---|
index_missing |
The data directory has no index. | Run curu-memory index. |
concept_not_found |
No concept has the identifier. | Use an identifier from search_knowledge. |
index_unreadable |
A team space or a personal space cannot be read. The cause is a missing or wrong key file, a bad previous key file, a changed file, or an index of an older version. For a protected key file, the cause can be no SSH key in ssh-agent. The message names the space. | Set CURU_MEMORY_KEK_FILE to the key file of the space. For a protected key file, add your SSH key with ssh-add. During a rotation, also set CURU_MEMORY_KEK_FILE_PREVIOUS. After a rotation, remove it. Or index the space again. |
access_refused |
The principal can read no space, for example a person that the operator removed, or an agent with no live grant. For propose_concept, propose_change, propose_batch, propose_move and write_scratch_note, the caller has no write role in the space, and details.reason is no write role. For consent_move, the caller has no admin role in the source, and details.reason is no admin role. |
Ask the operator to register the person, or to give the agent a grant with the role. |
invalid_argument |
A value does not obey a rule, for example a question of only spaces. details.field names the field. |
Correct the value. |
invalid_concept |
A proposed concept breaks a rule. details.reason is schema fault, missing provenance, media, too large or scratch note. For propose_batch, it is batch fault, and each fault starts with <concept-id>: . details.faults names each fault. |
Correct the concept file, and propose it again. |
proposal_refused |
The server cannot take the proposal. details.reason is id in use, encrypted space, not encrypted, checkout not ready, no concept directory, not signed, work tree busy or git failed. For a change, it is also unknown concept, stale, no change or scratch note. For a batch, it is also stale or bad path. For a move, it is also not wider, unknown concept, no consent, has consent, not a move, not open or stale. |
For id in use, choose another identifier. For a change with id in use, wait for the merge or the close of the open proposal. For unknown concept, use an identifier from search_knowledge. For no change, change the text. For stale, read the concept again and propose again. For work tree busy, try again later. For bad path, choose another folder. For encrypted space, propose in global. For scratch note, give no scratch key, or keep the note with write_scratch_note. For not wider, move the concept to a wider tier. For no consent, ask an admin of the source to call consent_move. For has consent, not a move or not open, read the proposal with proposal show. For a stale move, start the move again. For the other reasons, ask the operator to correct the settings of Prepare the server for proposals. |
The tool schema refuses some values first, for example limit: 51 or an empty question. For these values, the MCP SDK gives its own validation error, not one of these codes.
The curu-memory command uses these exit codes:
| Exit code | Meaning |
|---|---|
| 0 | Success. |
| 1 | index skipped a file, the embedder failed, another index run held the lock, or the embedder model was not the model of another space. search found no index, or no readable space. access refused a change. key rotate could not rotate a space, or an index run held the lock. space commit refused a change, a file, a merge or the lock. login got a denied code, or the code expired. git merge found a conflict, or an object or a setting that is not valid. space checkout or space commit got an object that the server refused. space check found a file that breaks a rule, or git failed. space hook install refused a hook that it did not write, or a hook that is a symbolic link. space rekey found that an index run or a commit holds a lock. proposal got an unknown or merged proposal, no maintain role, or its own proposal in a protected space. It also got an identifier on main or a busy work tree. proposal merge refused an agent that merges a proposal of the same agent, or an agent that gives --bypass. proposal complete got an unknown author, a status that the map does not cover, or an open proposal. proposal merge closed a stale completion, change or batch. proposal show --concept got a concept that the batch does not hold, or a proposal that is not a batch. proposal close got a proposal that is not open, or a person who may not close it. proposal move got a target that is not wider, no write role, an unknown concept, a scratch note, media or an identifier in use. proposal consent got no admin role. proposal merge or proposal consent closed a stale move. proposal merge could not build the index after the merge. index refused a protected space with an unreviewed commit. access protect refused a space. |
| 2 | A usage error, for example --limit 51. space check got a revision that starts with -, or space check or space hook ran outside a git work tree. git install, git textconv or git merge ran outside a git work tree. space rekey got global or a bad space name. proposal complete got a bad --confidence map. proposal move got a bad --from or --to space. proposal merge got --grant and CURU_MEMORY_PRINCIPAL together. |
| 78 | A configuration error, for example HTTP with no token, serve with no server extra, or a private space with no safe key file. key new refused a path. key rotate got a missing or unsafe key file, or the same key twice. serve or browse on a network address has no https:// address of a TLS proxy. A space in git has no valid signature, an uncommitted change, no CURU_MEMORY_ALLOWED_SIGNERS, or no git on the PATH. An edit through the server has no CURU_MEMORY_SERVER_TOKEN and no login, a token for another audience, or an http:// address that is not loopback. It also got a refused token, no role, no record, a read role on a commit, or no answer. login or logout got a bad address, no metadata, a refused client, no answer, or a token cache that is not safe. git install got a bad --server address. space status found the cache of the textconv on. space checkout --merge found no merge in progress, a rebase or a bad signature. It also found a file of neither branch, or an object of the merge driver under an old key. The space commit of its checkout found a bad signature, a file of neither branch, or such an object. space rekey found a space outside git, a merge, a record under the previous key file, or a failed commit. It also stops when it cannot save the record after the commit. proposal found a bad setting of proposals, or a work tree that is not ready. It also found a changed branch, a bad signature or a failed git command. |
Use curu-memory from Python
Use the library to build a space, to read it and to write to it from a Python program, with no server. Import each name from curu_memory only. The names of curu_memory.__all__ are the public API. Each other name can change in any release.
A program pins the current minor version, for example curu-memory>=0.18,<0.19. The parts of the API start with these versions:
- The public API starts with 0.3.0, and
validatewith 0.4.0. IndexUnreadablestarts with 0.5.0, and the index format 2 with 0.6.0.- The writes start with 0.13.0.
- The identity lookup starts with 0.18.0.
from pathlib import Path
import curu_memory
report = curu_memory.build_space(Path("knowledge"))
print(report.concepts_indexed, len(report.skipped))
knowledge = curu_memory.open_knowledge()
for hit in knowledge.search("VAE for WAN2.2 5B", limit=3).results:
print(hit.id, hit.space)
concept = knowledge.get_concept("wan22-5b-vae")
links = knowledge.neighbours(concept.id)
build_spacebuilds one space, as the index command does.space=names the space, and the default isglobal. A skipped file is not an error. The fields of the report are the values of Index your knowledge, exceptindex, for exampleconcepts_indexed.skippedholds a (path, reason) pair for each skipped file.open_knowledgereads as one principal. Giveperson="<handle>"to read the spaces of that person. Givegrant=<id>to read only the space of that grant. With neither, the library readsglobalonly.- An unknown, ended or revoked grant does not stop
open_knowledge. Each read then raisesNoReadableSpace.serve --grantstops at the start for such a grant. - Each read gets the readable spaces again. A removed role or a revoked grant stops the next read.
search,get_conceptandneighboursgive the same results as the toolssearch_knowledge,get_conceptandconcept_neighbours. Each hit gives itsspace.scratch=Trueofsearchandget_conceptalso gives the scratch notes, as the option of the tools.exclude_types=[...]ofsearchleaves out the concepts of these types.list_concepts(types=[...], tags=[...])gives each concept of the readable spaces, in the order of the ids, with no limit.typeskeeps any of the types, andtagskeeps all of the tags. EachConceptSummaryhas theid,space,type,title,description,tagsandscratchof one concept, with no body.scratch=Truealso gives the scratch notes.- Each refused read writes the line in the audit log that the server writes, with the name of the matching tool as the action. A refused list has the action
list_conceptsorlist_proposals, because no tool lists. data_dir=replaces the data directory.env=gives theCURU_MEMORY_*variables as a dictionary, for example the embedder settings of Search by meaning. With noenv, the library reads the environment of the process.- The library does not use
CURU_MEMORY_PRINCIPALto select the principal. A value that is not a valid handle raisesConfigError. - The principal is not a security boundary in one process. The boundary is who can read the data directory.
Each error is in curu_memory:
| Call | Cause | Error |
|---|---|---|
build_space |
The concept directory does not exist, or the space name is not valid. details.field names the argument. |
InvalidArgument |
build_space |
Another index run holds the lock. | IndexLocked |
build_space |
The embedder model is not the model of another space. | IndexRefused |
build_space |
The embedder failed. The old index stays. | EmbedderFailed |
build_space |
Another private space in the data directory cannot be read. The message names the space. | IndexUnreadable |
build_space, open_knowledge |
A CURU_MEMORY_* variable is not valid. |
ConfigError |
build_space |
A private space has no safe key file, or its embedder is not on loopback and does not use TLS. | ConfigError |
validate |
The path does not exist. details.field is path. |
InvalidArgument |
open_knowledge |
No person has the handle, or person and grant are both given. |
InvalidArgument |
| each read | The principal can read no space. | NoReadableSpace |
get_concept, neighbours |
No readable space holds the concept. | ConceptNotFound |
search |
The question is empty or too long, or the limit is not from 1 to 50. | InvalidArgument |
| each read | No readable space has an index. | IndexMissing |
| each read | No readable space with an index can be decrypted. The message names the first space that cannot be decrypted. | IndexUnreadable |
| each write | The principal has no role for the write, a grant writes outside its space, or the object has no principal. | WriteRefused |
propose_concept, propose_change, write_scratch_note |
The concept breaks a rule of OKF or of the provenance. | InvalidConcept |
| each write | The server cannot take the proposal. details.reason gives the reason. |
ProposalRefused, ProposalStale or ProposalConceptUnknown |
read_concept_file |
No readable space holds the concept. | ConceptNotFound |
subject_of |
The text is not person:<handle> or agent:<name>. details.field is principal. |
InvalidArgument |
Each error except IndexLocked and ConfigError is a CuruMemoryError. Its code is the code that a tool gives, for example concept_not_found.
Find the principal of an OIDC subject
Find the person or the agent of a token, from its OIDC issuer and subject. Then you can show one name for one person or agent, for example beside <issuer>#<subject> in curu.
import curu_memory
knowledge = curu_memory.open_knowledge(person="me")
name = knowledge.principal_for_subject("https://auth.example.org", "248289761001")
print(name) # person:me, agent:<name> or None
link = knowledge.subject_of("person:me")
print(link) # ("https://auth.example.org", "248289761001") or None
principal_for_subject(issuer, subject)givesperson:<handle>oragent:<name>. These are the names of the audit log. It gives the principal that the HTTP transport accepts for a token with this subject.- A subject first finds the person or the agent that has it. When nobody has the subject, it finds the agent whose client identifier is that text. A token of that client with no subject of its own is that agent.
principal_for_subjectgivesNonefor a subject that no person and no agent links.- Each principal that can read a space can call
principal_for_subject. subject_of(principal)gives the issuer and the subject of a person or an agent. For an agent with a client identifier, the second value is the client identifier.- Only an instance owner, or a caller that names its own principal, gets a result from
subject_of. Each other caller getsNone, the same value as for an unknown principal or a person with no link. The audit log then gets a refused line. An agent of an instance owner is not an instance owner. - Both methods only read the access store. To link a person to a subject, run
curu-memory access person link.
Write through the library
Open the knowledge as a person, then propose a concept, a change, a batch or a move. The settings of Prepare the server for proposals must be in env= or in the environment. propose_move and write_scratch_note also need a personal space in CURU_MEMORY_SPACE_DIRS, encrypted as in Keep private knowledge encrypted. A person with maintain merges each proposal with curu-memory proposal merge, as in Review and merge a proposal. A handle of a grant of maintain merges with knowledge.merge_proposal(<id>), as in Let an agent merge proposals.
from pathlib import Path
import curu_memory
knowledge = curu_memory.open_knowledge(person="me")
text = Path("tiled-vae.md").read_text()
made = knowledge.propose_concept("global", "tiled-vae", text)
print(knowledge.get_proposal(made.id).state)
# A person with maintain merges the proposal: curu-memory proposal merge <id>
found = knowledge.read_concept_file("tiled-vae")
new_text = found.text.replace("tiles of 512", "tiles of 256")
try:
knowledge.propose_change(found.space, "tiled-vae", new_text, version=found.version)
except curu_memory.ProposalStale:
found = knowledge.read_concept_file("tiled-vae")
knowledge.propose_move("personal/me", "my-finding", "global")
knowledge.write_scratch_note("plan", "Plan for the tiles", "First try a tiled decode.\n")
The Knowledge object has these write methods. Seven of them call the function of their MCP tool. get_proposal, close_proposal and merge_proposal call the functions of the proposal command. Each one has the rules, the refusals and the audit lines of its tool or command.
| Method | Tool or command | Result |
|---|---|---|
read_concept_file(concept_id) |
read_concept_file |
ConceptFile: the space, the path, the text and the version |
propose_concept(space, concept_id, text) |
propose_concept |
ProposalView |
propose_change(space, concept_id, text, version=...) |
propose_change |
ProposalView |
propose_batch(space, items) |
propose_batch |
ProposalView with concepts |
propose_move(source_space, concept_id, target_space) |
propose_move |
ProposalView with consent |
consent_move(proposal_id) |
consent_move |
ProposalView |
write_scratch_note(note_id, title, body) |
write_scratch_note |
ScratchNoteView |
get_proposal(proposal_id) |
proposal show, with no file, and also for the author |
ProposalView |
close_proposal(proposal_id) |
proposal close |
ProposalView |
merge_proposal(proposal_id) |
proposal merge |
MergeResult: the proposal, the commit, the index report and the index error |
- The fields of
ProposalVieware the result fields of Call the tool and Move a concept to a wider tier.consentistruewhen an admin of the source gave consent, andfalsewhile the move waits.conceptsis the number of concepts of a batch, elsenull, as in Propose many concepts in one batch. The fields ofScratchNoteVieware the result of Keep scratch notes of an agent. - A
Knowledgeobject of a person writes with the roles of that person. - A
Knowledgeobject of a grant reads, writes, shows, closes and merges only in the space of that grant. Other grants of its agent do not change this. It cannot start a move or give consent, because a move needs two spaces. - A
Knowledgeobject with no principal raisesWriteRefusedfor each write method exceptread_concept_file, and writes one refused audit line.read_concept_filethen readsglobalonly. list_proposals(space=..., state="open", author=...)gives each proposal thatget_proposalgives, oldest first. The default state isopen. AKnowledgeobject of a grant gets only the proposals of its grant space.get_proposalgives the record to its author, to a person withmaintainin its space, and to an admin of the source of a move. An agent is the author only of the proposals that it made, not of those of the other agents of its person. The state isopen,mergedorclosed. A closed proposal has areason, for examplestale,closed by a personorrekey.ProposalStalemeans that the concept changed after your read, or after the start of the proposal. Read the concept again, and propose again. For a move, start the move again.ProposalConceptUnknownmeans that no readablemainholds the concept. Both are subclasses ofProposalRefused, with the codeproposal_refused.
Test a program that writes
A test needs no server and no database. Make a temporary data directory and a temporary git repository with a signing key:
git init -b main /tmp/kb && git -C /tmp/kb commit --allow-empty -m start
ssh-keygen -q -t ed25519 -N "" -C server@curu-memory.invalid -f /tmp/server-key
echo "server@curu-memory.invalid namespaces=\"git\" $(cat /tmp/server-key.pub)" > /tmp/allowed
export CURU_MEMORY_DATA_DIR=/tmp/data CURU_MEMORY_SPACE_DIRS=global=/tmp/kb
export CURU_MEMORY_SIGNING_KEY=/tmp/server-key CURU_MEMORY_ALLOWED_SIGNERS=/tmp/allowed
curu-memory access person add me
- The store is a set of SQLite files in the data directory, so a temporary directory gives each test its own store.
- For a private space, also make a key file, as in Keep private knowledge encrypted, and encrypt the space.
- To import the OKF v0.2 files of a private space, encrypt them with
curu-memory space encrypt, and commit them in the work tree of the space. Then callbuild_space(work_tree, space="personal/me"). The index is complete whenreport.skippedis empty.
Limits
- A batch takes only
global. A batch cannot delete or move a concept, and a folder applies only to a new concept. An open batch blocks a proposal of each of its concept identifiers until it merges or closes. - On stdio, in the browser with no login and with the static token, one process reads as one person (
CURU_MEMORY_PRINCIPAL). A browser with a login gives each session its own person. In Python, eachKnowledgereads as the principal of itsopen_knowledge. On stdio,serve --grantmakes the process read as the agent of one grant. Only the OIDC mode of HTTP gives each request its own person or agent. - The token cache is a file, not the keyring of the operating system. A person with your user account can read it.
- An Authentik provider for
loginneeds the device login, the scopesknowledge:readandknowledge:write, and the canonical URI in the audience of its tokens. The repository ships no Authentik blueprint for it. - A rotation reads and writes each whole private index, one space at a time. It does not change a backup, a concept file or a space key. It changes a
space.jsononly with--space-dir. - curu-memory cannot rename an encrypted space.
- The key file is the only source of the key. A protected key file opens with your SSH key or a key service. An OS keyring is not supported.
- A protected key file needs a software
ssh-ed25519key. An ECDSA key and a hardwaresk-key cannot open its agent slot. - A server keeps the key-encryption key of its indexes in memory after the first read of a private space. After
ssh-add -D, a search still reads the private indexes. - Each process of your user that can reach ssh-agent while your key is loaded can open the protected key file.
- curu-memory refuses a protected key file of another key-encryption key than the spaces. It does not check a plain key file in this way. Set
CURU_MEMORY_KEK_PROTECTED=1, so that no plain key file opens a space. - A search of a private space sends its question to the embedder. The check of loopback or TLS is for an index run only, so use a loopback or TLS embedder for the server too.
- A reader decrypts the whole index of a private space into memory. A private space with many media files uses memory for each file.
- A private proposal, a private change, a read of a private concept and the merge of a new private concept each decrypt the whole space.
proposal listdecrypts one object for each private proposal. - A scratch note uses an identifier from the same set as the concepts. A note blocks its identifier for a new concept until the person deletes the note.
- The browser cannot show a scratch note. An agent cannot delete a scratch note, and a note does not expire.
- The index of each space has a version. A read refuses an index of an older version with
index_unreadable. Index each space again after an upgrade. - A move takes one concept, and it goes only to a wider tier. A move that waits for consent is only in
access.sqlite. Delete that file, and the move is lost. - A proposal holds no media.
proposal completecompletes the concepts ofglobalonly.access protectprotectsglobalonly. An agent cannot rename a concept. It can delete a concept only from the source of a merged move. To rename or delete a concept, a person edits it in another clone. Then the person pushes it to the same remote, as in Prepare the server for proposals. - In a protected space, the index refuses a direct commit, also a rename or a delete. Unprotect the space, index it, and protect it again.
- An embedder of the protocol
openaigives no identity. When its weights change and its URL and model name stay the same, curu-memory cannot see the change. Deleteembedding-cache.sqlitein the data directory, then index each space again. - With the curu-vision service, a clip longer than 30 seconds has no vector, and the index gives a warning for it. A search with a clip longer than 30 seconds gives no results, and its notice gives the reason. Cut a long clip into short clips of one topic.
- The curu-vision service embeds a clip or a video from version 0.28.0. With an older service, the index gives a warning for each clip and each video, and a search with one gives a notice.
- curu-memory does not control the git host. A push to
mainis still possible, but the index of a protected space refuses it. - Do not sign your own commits with the server key. The check cannot tell them from a reviewed merge.
- The merge closes a stale change, and does not merge it: the server does no rebase and no three-way merge of the text. An agent with
writecan make any number of proposals. - With no login, the browser accepts one static token. Without
CURU_MEMORY_OIDC_ISSUER, the HTTP transport also accepts only one static token. Neither serves TLS itself, so a TLS proxy must stand in front of each on a network. - The embedder of the stack runs on the CPU, so an index run of many concepts takes some minutes. The embedder image is about 2.1 GB, and the model adds about 1.5 GB.
- With no login, the browser has no log-out button. Close the web browser to forget the token.
- The browser shows the links of a concept as lists, not as a picture of the graph.
- Search compares each embedding with the question one by one. This is fast for some thousands of concepts. It becomes slow at about 100,000 concepts.
- A match of meaning needs a cosine similarity of 0.68 or more with EmbeddingGemma 2. The measured margin is small: unrelated questions reached 0.67, and known answers started at 0.70. A real question with few shared words can miss its answer by meaning. With another model, the limit is 0.35. Some models give lower values for good matches, so measure the limit and set
CURU_MEMORY_EMBEDDER_MIN_SIMILARITY. - A match between a question in words and an image also needs 0.68 or more with EmbeddingGemma 2. Simple test images scored from 0.74 with their descriptions, and wrong images reached 0.66. Real outputs of ComfyUI can score lower. If an image that you describe well does not match, measure and set
CURU_MEMORY_EMBEDDER_MIN_IMAGE_SIMILARITY. - A search with an image uses 0.89 for image to image and 0.70 for image to text with EmbeddingGemma 2. The margin for image to text is small: a wrong description of a test image reached 0.695, and an unrelated curu concept reached 0.684.
- A search with a clip uses 0.87 for clip to clip and 0.70 for clip to text. The margin for clip to text is also small: a wrong description reached 0.692. A correct description scored as low as 0.712 in an earlier measurement. These limits come from changed copies of speech clips. Music, sound effects and other recordings can score lower.
- A search with a video uses 0.92 for video to video. For video to text, it uses 0.725 with the curu-vision service and 0.73 with
openai. With the curu-vision service, no limit separates the results. A correct description scored 0.721 and a wrong concept 0.723, so one test video misses its description. Withopenai, a wrong description reached 0.728 in an earlier measurement, and a correct description scored as low as 0.737. These limits come from changed copies of short animations. Real outputs of ComfyUI can score lower. - A question cannot hold words and media together. The browser cannot search with media. The list of search results does not show media. Each kind of media question finds only its own kind of media and texts.
- A match between a question in words and a video needs 0.71 or more with EmbeddingGemma 2. The test videos are short animations of shapes. A question about motion can match a video with a near motion.
- A match between a question in words and a clip needs 0.68 or more with EmbeddingGemma 2. The limit comes from speech clips. Speech test clips scored from 0.73 with their own questions. Wrong clips and unrelated questions reached 0.64. Music and sound effects can score lower.
- The index holds a copy of each media file. One hundred files of 2 MB make the index about 200 MB larger.
- There is no file watcher. Run the index command after each change.
validatedoes not read the index, so it does not find an identifier that is also in another space. For one file, it does not find a duplicate identifier.- The Python API cannot search with media. Use
curu-memory search --mediaor the toolsearch_knowledge_by_mediafor media. - No MCP tool merges. An agent merges only through
proposal merge --grantorKnowledge.merge_proposal.
Technical notes
- A merge by an agent follows ADR-041. The contract is specs/049-agent-merge-grant/contracts/merge.md.
- The review pages write by ADR-042, and the login follows ADR-043. The contract is specs/050-browser-review/contracts/review-pages.md.
- Batch proposals follow ADR-039. The contract is specs/047-batch-proposals/contracts/batch.md.
- The first start of the stack downloads the model of its embedder, because
docker compose upis a command that a person types. An operator can also give an embedder that runs already, and the stack then downloads nothing. See ADR-023. - The index is one SQLite file for each space in the data directory, for example
~/.local/share/curu-memory/global.sqlite. The file ofteam/lookisteam--look.sqlite.enc.CURU_MEMORY_DATA_DIRchanges the directory.XDG_DATA_HOMEalso changes the default. See ADR-001. The space names and the readable spaces come from ADR-016. - The index lock uses
fcntl.flock, so curu-memory runs on Linux and macOS, not on Windows. - The merge driver compares lines with
difflibof Python, not with the diff of git. Thus a conflict can hold other lines between its markers thangit merge-filegives. See ADR-025 and specs/029-git-merge-driver/contracts/cli.md. The contract of the flow to resolve a conflict is specs/030-resolve-merge/contracts/cli.md. - The index skips a concept with no valid proof, as ADR-038 says. The rules of a proof follow ADR-037.
- The parts of a long section follow ADR-036. The budget of 30,000 characters is over the longest section of the evaluation corpus, so the frozen vectors do not change.
- The protected key file follows ADR-035.
ssh-keygen -Y signsigns a fixed challenge in the namespacecuru-memory-kek. curu-memory verifies the signature, and HKDF-SHA256 makes the wrapping key from it. AES-256-GCM encrypts the key. The contract is specs/042-ssh-protected-key-file/contracts/cli.md. - The login uses the device login of RFC 8628, and follows ADR-024. The contract is specs/027-device-login/contracts/cli.md.
- The OIDC mode follows ADR-015 and ADR-017. The contract is specs/012-oidc-tokens-with-the-shipped-rauthy/contracts/oidc.md.
- Agents, grants and the Basic exchange follow ADR-018. The contract is specs/013-agent-grants/contracts/agents.md. The exchange sends
grant_type=client_credentials,client_id,username,passwordandscope=openid profile. The cache keeps at most 1,000 tokens, and it removes the oldest first. - curu-memory accepts keys of the algorithms RS256, RS384, RS512, PS256, ES256 and EdDSA. curu-memory refuses each token that a key of another algorithm signs, for example ES384.
- curu-memory reads the keys from
<issuer>/.well-known/openid-configurationand itsjwks_uri. The document must name the same issuer, andjwks_urimust usehttpsoff loopback. The clock skew of the token check is 60 seconds. - The browser makes its pages on the server, with no JavaScript. A content security policy blocks each script. See ADR-004.
- The limit of the match of meaning comes from a measurement of EmbeddingGemma 2. See ADR-005. The limit for images has its own measurement. See ADR-008. The limits for audio and for video also have their own measurements. See ADR-011 and ADR-013. A search with media has its own limits and its own measurement, and one tool takes all media. See ADR-010, ADR-012 and ADR-014.
- The default protocol
curu-visionand its limit of 0.725 for a video question and a text unit follow ADR-034. - curu-memory sends each image to the embedder in an item
{"image": "data:..."}, each clip in an item{"audio": "data:..."}and each video in an item{"video": "data:..."}. The value is adata:URI: a text that holds the file bytes in base64, with their MIME type. See ADR-007. The index keeps the bytes of each media file one time for each SHA-256. See ADR-009. - The protocol
curu-visionsendsPOST /v1/embeddingwith an input{"kind": "query", "text": ...}for a question and{"kind": "document", "title": ..., "text": ...}for a section. The service adds the prompts. The index records the protocol, the fingerprint of the vector space and theprompt_versionof the service. The fingerprint is thefingerprint_idof thespaceclaim, for exampleembeddinggemma2-768-r2. Before each request, curu-memory makes sure that themodalitiesof the claim have the modality of each input. The embedding cache keys a vector by the fingerprint and by a second part. For a section, the second part is the JSON list["document", <title>, <text>]. For a media file, it is<kind>:<sha256>. Foropenai, it keys a vector by the URL, the model and the prompts. See ADR-030, which changes who adds the prompts of ADR-003, ADR-045 and ADR-046. - With the protocol
curu-vision, an image, an audio clip and a video are{"kind": "image", "data": ...},{"kind": "audio", "data": ...}and{"kind": "video", "data": ...}, with the bytes of the file in base64. The service decodes each file, and each file result names itsfile_decode. A file result with afile_decodethat the served identity does not name is an error. See ADR-033. - The keys and the encryption of private knowledge follow ADR-002. Each index run of a private space makes a new data key. The key in the key file wraps it with AES key wrap, and AES-256-GCM encrypts the index. The format is in specs/019-encrypted-private-indexes/contracts/encrypted-index.md. The audit line of a refused read names a hidden private space too, so that check decrypts it. See ADR-021.
- The word match uses SQLite FTS5 (the full-text search of SQLite) with the
unicode61tokenizer (the rule that splits a text into words). The tokenizer keeps.,_and-in a word. A word of three or more characters also matches as a prefix. - Search fuses the two rankings with reciprocal rank fusion, with k = 60. The lower of the two values counts one tenth. So ten rivals that are a little worse in both rankings do not push out the best answer of one ranking. See ADR-006. The identifier breaks a tie, so the order is stable.
- The concept rules are the same as the rules of the curu index, so each curu concept file indexes here. The index command and
validateuse one implementation of them. The schema and the fixtures are insrc/curu_memory/okf_v0_2/. See specs/017-the-okf-v0-2-schema/contracts/okf.md. The copy of the curu concepts intests/fixtures/eval_corpus/is a frozen evaluation corpus, not a reference of the format. See ADR-020. - The tool contracts are in specs/001-okf-index-mcp-search/contracts/.
- Proposals follow ADR-026. The contracts are specs/032-propose-and-merge/contracts/mcp-tool.md and specs/032-propose-and-merge/contracts/cli.md.
- The writes of the library follow ADR-032. The contract is specs/039-library-writes/contracts/library.md.
- Moves follow ADR-031. The contract is specs/037-review-a-move-to-a-wider-tier/contracts/tools.md.
- The access store has version 5. Each command refuses a store of an older version. Delete
access.sqlite, then register the persons, the agents, the grants and the roles again. The project keeps no migration before 1.0. - Roles and protection follow ADR-028. The contract is specs/035-protected-branches-and-required-review/contracts/cli.md.
- Proposals in private spaces follow ADR-029. The record holds the HMAC-SHA256 of the concept identifier. Its key comes from the space key with HKDF-SHA256. The contract is specs/036-proposals-in-encrypted-spaces/contracts/cli.md.
- Scratch notes follow ADR-016: the notes of an agent go into the personal space of its person. The index table
conceptshas the columnscratch. The contract is specs/038-agent-scratch-notes-in-the-personal-tier/contracts/tools.md. - curu-memory uses the official MCP Python SDK. It never loads model weights.
- curu uses curu-memory as a library, and the version range of a release follows a version policy. See ADR-019.
tests/contract/public_api.txtholds the names ofcuru_memory.__all__. The contract is specs/015-the-public-library-api/contracts/public-api.md. - The core install has
pydantic,httpx2,markdown-it-py,pyyamlandcryptography. Theserverextra addsmcp,starletteanduvicorn. curu_memory.TOOL_SCHEMA_VERSIONis the version of the MCP tool schemas and the error codes. The value is 1 for the tools of 0.3.0, and 2 since the error codeindex_unreadable. It is 3 since the toolpropose_concept, and 4 since its result has the fieldskind,closed_by,closedandreason. It is 5 since the toolsread_concept_fileandpropose_change, and 6 since the toolwrite_scratch_noteand the inputscratch. It is 7 since the toolspropose_moveandconsent_moveand the result fieldsconsent,consented_byandconsented. It is 8 since the result fieldclosed_spacesand the attributesspaceandcauseofindex_unreadable. It is 9 since the toolpropose_batchand the result fieldconcepts. It is 10 since the inputexclude_typesof the toolssearch_knowledgeandsearch_knowledge_by_media. It goes up by 1 in each pull request that changes a tool, a field or an error code. A change of a description or a title does not change it. It is not the package version.- A Python program that imports
curu_memorycan compareTOOL_SCHEMA_VERSIONwith the version that it expects. A different value means that a tool, a field or an error code is different. The MCP server does not send the value.tests/contract/tool_schemas.jsonholds the schemas of the current version.
Develop
git clone https://github.com/darth-veitcher/curu-memory
cd curu-memory
uv sync
uv run pytest
uv sync installs the server extra, because the development group names it. The default tests need no network, no GPU and no model. They use a fake embedder and the frozen evaluation corpus in tests/fixtures/eval_corpus/, a copy of 183 curu concept files. The corpus is for the search measurements only. The shipped fixtures are the reference of the format. The tests with a real embedder have the integration marker. Start the curu-vision service on your computer first, as Use the curu-vision model service tells. Set request_timeout_s = 3600 in service.toml, because a request of many long sections takes a long time. Then run:
CURU_MEMORY_EMBEDDER_URL=http://127.0.0.1:8765 CURU_MEMORY_EMBEDDER_TOKEN="$CURU_VISION_TOKEN" CURU_MEMORY_EMBEDDER_TIMEOUT=3600 uv run pytest -m integration
On a CPU, the first index of the corpus takes more than 30 minutes, the time of tools/parity.py vectors. AGENTS.md tells how to start from the frozen vectors of the parity report. To measure an OpenAI-compatible server, also set CURU_MEMORY_EMBEDDER_PROTOCOL=openai. Its limits are the limits of openai.
The rauthy test of the integration tier also needs Docker and a free port 6480.
The source distribution on PyPI holds the tests too. Some tests read files of the repository that it leaves out, for example the workflows and the ADRs. These tests have the repository marker. In the source distribution, each of them skips and names the missing files. To leave them out, run uv run pytest -m "not integration and not repository", because this option replaces the default -m.
To measure the search on the evaluation corpus, run the parity report. It compares the search of curu-memory with the search of curu. It needs no network and no model, because it reads the frozen vectors of the curu-vision service in tests/fixtures/eval_vectors/:
uv run tools/parity.py report
The report gives recall@1, recall@5 and recall@10 of curu-memory. Recall@k is the part of the judged answers in the first k results, from 0 to 1. The report gives the mean of the 25 judged questions. A higher value is better: 1 means that each judged answer is in the first k results.
curu sends its results for the same questions in a file. Put it at tests/fixtures/eval_vectors/curu_rankings.json. The file contains the first 10 concepts that curu finds for each question. Without this file, the report gives only the line of curu-memory. When the file exists, the report also gives these items:
- The recall of curu.
- Each question where curu-memory has a lower recall@5 than curu.
- Each judged answer with a different 2-hop reach: the concepts within 2 links of it, in both directions.
The report exits with 1 when a lower question is not in tests/fixtures/eval_vectors/accepted.toml. Each question in that file names the decision record that accepts it. The report also exits with 1, and gives the cause, in these conditions:
- A frozen vector is missing.
curu_rankings.jsonis for a different corpus.curu_rankings.jsonhas a question that is not judged.
Without curu_rankings.json, it exits with 0.
When the corpus, the served identity of the service or the units of a concept change, make the frozen vectors again. Start the curu-vision service on your computer, with request_timeout_s = 3600 in service.toml. Then run:
CURU_MEMORY_EMBEDDER_URL=http://127.0.0.1:8765 CURU_MEMORY_EMBEDDER_TOKEN="$CURU_VISION_TOKEN" uv run tools/parity.py vectors
The run takes about 30 minutes on a CPU. --batch-size 4 sends 4 sections in each request in place of 32. The run is then slower, but the service uses less memory.
Before a pull request, run the gates:
uv run ruff check --fix && uv run ruff format
uv run ty check
beacon doctor --strict
The CI runs the same gates on each pull request and on each push to main. A release starts when the owner pushes a tag vX.Y.Z on main. The release workflow checks the tag, then publishes the package to PyPI.
AGENTS.md gives the rules for contributors and agents.
Glossary
- Agent: a program that uses a language model and calls tools, for example Claude Code. A registered agent acts for one person, and reads only the spaces of its grants.
- Concept: one OKF file about one topic, for example a model, a node or a finding.
- Clip: an audio file: an item of the
medialist of a concept, or the file that you search with. - Base64: a text form of bytes that uses only letters, digits,
+,/and=. - Browser: the web pages that
curu-memory browseserves. The pages of the knowledge only read. The review pages merge and close proposals. - Form token: a random value in each form of a review page. The browser refuses a button press without it.
- Video: a video file: an item of the
medialist of a concept, or the file that you search with. The formats are MP4, MOV, WebM and MKV. - CI: a workflow that runs checks on each pull request and each push. Examples are the GitHub workflow of this repository, and the workflow of the repository of a space.
- Content security policy: an HTTP header that tells the web browser which scripts, styles, images, audio and video it can load.
- Cosine similarity: a value from -1 to 1 that tells how near two embeddings are. A higher value is a nearer meaning.
- Data URI: a text that holds the bytes of a file in base64, with their MIME type, for example
data:image/png;base64,.... - Data directory: the directory of the index, the embedding cache, the access store
access.sqliteand the audit logaudit.jsonl. The default is~/.local/share/curu-memory, or$XDG_DATA_HOME/curu-memory.CURU_MEMORY_DATA_DIRchanges it. - Data key: the random key that encrypts one private index. Each index run of a private space makes a new one.
- Development embedder: the server in
tools/embedder_server/that serves EmbeddingGemma 2 with torch, for the protocolopenai. Its vectors are not the vectors of curu. - Conformance fixtures: the valid and invalid concept files that the package ships, with the expected faults in
expected.toml. - Frozen vectors: the stored embeddings of the evaluation corpus and the judged questions in
tests/fixtures/eval_vectors/. - Judged question: a question of
search_eval.tomlormeaning_eval.tomlwith its correct concepts. - Lower question: a judged question where curu-memory has a lower recall@5 than curu.
- Recall@k: the part of the judged answers of a question in the first k results, from 0 to 1.
- 2-hop reach: the concepts within 2 links of a concept, in both directions.
- Evaluation corpus: the frozen copy of 183 curu concept files in
tests/fixtures/eval_corpus/, for the search measurements. - Extra: a named set of optional packages of a Python package, for example
serverincuru-memory[server]. - Embedder: a server that changes a text, an image, a clip or a video into an embedding.
- Embedding: a list of numbers that holds the meaning of a text, an image, a clip or a video. Items with a near meaning have near embeddings.
- Fault: one problem of a concept file. A fault of the kind
okfmakes the index command skip the file.validategives each fault with itskind,path,lineandmessage. - GraphRAG: retrieval that uses a search and the links between concepts to give an agent its context.
- Index: the searchable copy of the concept files that the index command makes.
- JSON Schema: a standard JSON document that gives the fields and the types of a JSON or YAML value.
- Key rotation: a run of
curu-memory key rotate. It encrypts each private index again under a new key file and a new data key. - Previous key file: the old key file during a key rotation.
CURU_MEMORY_KEK_FILE_PREVIOUSnames it. Each read also opens an index under its key, and no index run writes with it. - Keyed hash: a hash that only a holder of a key can make. The same identifier and key always give the same value.
- Key file: the file that holds the key-encryption key. This key encrypts the data key of each private index.
curu-memory key newmakes the file, andCURU_MEMORY_KEK_FILEnames it. - Key service: a service that encrypts and decrypts with a key that it keeps, for example the transit engine of OpenBao. It opens the recovery slot after an OIDC login.
- Protected key file: a key file that holds the key-encryption key in two slots, and never as plain text. Your SSH key or the key service opens it.
- Agent slot: the slot of a protected key file that opens with a signature of your SSH key through ssh-agent.
- Recovery slot: the slot of a protected key file that the key service opens after an OIDC login of the owner.
- Transit key: a key that the key service keeps and never gives out. It encrypts and decrypts the data that a client sends.
- Sealed: the state of a key service that cannot read its own keys until a person gives the unseal key. A restart seals it. To unseal is to give that key.
- Link kind: the type of a link between two concepts, for example
USES_COMPONENT. - MCP: the Model Context Protocol, which lets an agent find and call tools.
- Minor version: the second number of
X.Y.Z. Below 1.0, a new minor version can remove or change a name or a tool field. - OKF: Open Knowledge Format, the format of the concept files: YAML front matter and a Markdown body.
- MIME type: the name of a file format, for example
image/png. - PyPI: the Python Package Index, the public server of Python packages.
- Reciprocal rank fusion: a method that joins two rankings. Each ranking gives 1 / (60 + rank) to each concept. The best of the two values counts in full, and the other counts one tenth.
- Task prompt: a fixed text around a question or a section before the embedder makes its embedding. curu-memory adds it, or the curu-vision service adds it.
- File decode: the method that the curu-vision service uses to read an audio or video file into samples and frames. Its name, for example
file-decode-1, is in the served identity. - Served identity: the record of the model that the curu-vision service serves. Its digest changes with each change of the model name, the weights, the engine, the prompts or the file decode.
- Stdio: the standard input and output of a process. A local MCP client talks to the server through them.
- Streamable HTTP: the MCP transport over HTTP, for remote agents.
- HSTS: HTTP Strict Transport Security, a response header. The web browser then uses only HTTPS for that host name, for one year in the stack.
- TLS proxy: a server, for example Caddy, that accepts HTTPS from clients and sends plain HTTP to curu-memory on a private network.
- Wiki-link: a link of the form
[[name]]. OKF does not accept it outside code. - Web browser: the program that shows web pages, for example Firefox.
- SHA-256: a hash of 64 hexadecimal characters that the bytes of a file give. Different bytes give a different SHA-256.
- Unit: one piece of a concept that has its own embedding. It is the summary, the overview, a
##section, a part of a long section, an image, a clip or a video. - Part: a unit made from a section of more than 30,000 characters. Each later part starts with the heading line of its section.
- Version range: the lowest version and the first version to exclude, for example
>=0.10,<0.11. - Vector space: the claim of the curu-vision service that its vectors compare with the vectors of a reference. It names a fingerprint, for example
embeddinggemma2-768-r2, and the modalities that pass the check, for example text and image. Two services with the same fingerprint can use one index. A search uses each modality that the service of the search claims. - Space: a part of the knowledge with its own index:
global,team/<slug>orpersonal/<handle>. Each request reads only the spaces that its caller can read. - Team slug: the short name of a team in a space name, for example
lookinteam/look. - Instance owner: a person with
adminonglobaland on each team space. The first registered person is an instance owner. - Principal: the person or the agent of a request, or
anonymouswith no principal. It comes fromCURU_MEMORY_PRINCIPAL,serve --grant, the OIDC token on HTTP oropen_knowledge. - Private space: a team space or a personal space. Its index is encrypted on disk, and its concept files are an encrypted space.
- Encrypted space: a directory with
space.json,.gitattributesandobjects/. Each object holds one concept file or media file, under the space key. - Space key: the AES-256 key of one encrypted space.
- Generation: the number of the current space key of a space. It starts at 1, and each rekey adds 1.
- Rekey: a run of
curu-memory space rekey. It adds a generation with a new space key, and encrypts each object again under it. - Space record: the file of one encrypted space in
spaces/of the data directory, for examplespaces/team--look.json. It holds the space keys that it keeps, each wrapped by the key of the key file. - Wrap: to encrypt a key with another key.
- Token cache: the file of the tokens of
curu-memory login, one entry for each server, with mode 600. - Device login: a login of OAuth for a program with no web browser. The program shows a code, and the person enters it in a web browser on any device.
- Textconv: a program that git runs to change a file to text before a diff.
- Merge driver: a program that git runs to merge the versions of a file, which
merge=curuin.gitattributesselects. - Diff driver: a name in
.gitattributes, for examplediff=curu, that selects the textconv of a file. - Edit through the server: the curu-memory server decrypts and encrypts the objects of a space after a role check. The space key never leaves the server.
- Checkout: the private directory of the plaintext files of one encrypted space, with
.curu-checkout.json. - Allowed signers: the file, in the format of git, of the public keys that can sign a commit. The commit is of a private space or of the server.
- Server key: the SSH private key that
CURU_MEMORY_SIGNING_KEYnames. It signs each commit of the server. - Proposal: a new concept, a change, a completion of old concepts or a move, on its own signed git branch
proposal/<id>. It waits for a person withmaintain, or an agent with a grant ofmaintain, to merge it. A move with no consent has no branch yet. - Move: a proposal that puts a concept from a personal or a team space into a wider space. The merge deletes it from the source.
- Consent: the agreement of an admin of the source space to a move.
- Wider tier: a space with more readers.
personal/<handle>is narrower thanteam/<slug>, andteam/<slug>is narrower thanglobal. - Scratch note: a note of an agent or of a person, in the personal space of that person, with
scratch: truein its front matter. It is not knowledge, so a search leaves it out unless the caller asks for it. - Stale: a change or a proposal whose concept changed on
mainafter the read or after its base.propose_changerefuses a stale change. The consent or the merge closes a stale proposal. - Contributors: the handles of the persons who changed a concept after its author.
- Version: the SHA-256 of the full text of a concept file.
- Completion: a proposal of
curu-memory proposal complete. One signed commit adds the missing provenance keys to the old concepts of a space. - Proof: an entry of the key
evidence: a run, a test or a source. A test, a source and each file of a run give a full commit identifier. A reader can reproduce the claim from it. - Provenance: the front-matter keys that say where a concept comes from:
tier,sources,confidence,date,evidence,authorandagent. - Work tree: the directory of a git repository with its files.
- Merge commit: a git commit that joins a branch into another branch.
- Signed commit: a git commit with a signature that git verifies.
- Pre-push hook: a script in
.git/hooks/that git runs before each push. A result other than 0 stops the push. - Ref: a name of a commit, for example a branch or a tag.
- Mirror clone: a clone of each ref, with no work tree.
- git filter-repo: a tool that rewrites the git history.
- Conflict markers: the lines that git writes in a file after a merge conflict, for example
<<<<<<< ours. Each starts with 7 or more<,=or>characters. The attributeconflict-marker-sizein.gitattributesmakes them longer. - Operator: the person who runs
curu-memory accessandcuru-memory indexon the computer of the server. - Access store:
access.sqlite, with the persons, the teams, the members, the agents, the grants, the assigned roles and the protections. - Audit log:
audit.jsonl, with one line for each change of access, each refused read and each refused token. It also has a line for each proposal, each merge, each close and each refused show of a proposal. It also has a line for each consent and each deletion of a moved concept. It also has a line for each role change, each protect and unprotect, and each refused index. It also has a linebrowse.loginfor each login of the browser. A login that the issuer, the ID token check or the person link refuses also gets one. - OIDC provider: a service that logs persons in and issues tokens, for example Authentik or rauthy. OIDC is OpenID Connect.
- Issuer: the URL of an OIDC provider, as in the
issclaim of its tokens. - Subject: the identifier of a person or a service account at an issuer, as in the
subclaim of a token. - Audience: the
audclaim of a token: the service or the OAuth client that the token is for. - Access token: a signed JWT (JSON Web Token) that a client sends in the
Authorizationheader. A claim is one field of a token. - ID token: a token that tells a client who logged in. The login of
browsechecks it. The MCP server does not accept it. - Public client: an OAuth client that keeps no client secret, for example a web page or a phone app.
- OAuth client: a program that the provider knows by its client identifier. An MCP client uses an OAuth client.
- Signing key: the key that signs the tokens of a provider. curu-memory checks each signature with the public part.
- HMAC: signatures with a shared secret, for example HS256. A service cannot check them without the secret, so curu-memory refuses them.
- Canonical URI: the one address of the server that tokens name, for example
https://memory.example.com/mcp. - OAuth grant: the method that a client uses to get a token, for example the client credentials grant.
- Grant: one role of one agent in one space, for 1 to 366 days. A grant is live from its start until it expires or the operator revokes it.
- Service account: an Authentik user for a program, not for a person.
- App password: a password that Authentik makes for one user, for a program.
- Device endpoint: the URL of the issuer that gives the codes of the device login. The discovery document of the issuer names it.
- Token endpoint: the URL of the issuer that gives tokens. The discovery document of the issuer names it.
- Basic header:
Authorization: Basicfollowed by the base64 ofuser name:password. - Authorization code grant: the person logs in through the web browser, and the client gets a token for that person.
- PKCE: a check that only the client that started a login can get its token. The browser keeps a secret value, and the provider checks it before it gives a token.
- Client credentials grant: a program gets a token with its own secret, with no person.
- Blueprint: a YAML file that Authentik reads to make its objects, for example a provider and an application.
- Redirect URI: the address where the provider sends the person back after the login.
- Role:
read,triage,write,maintainoradminof one person or one agent in one space, from the weakest to the strongest. - Protected space: a space where only a reviewed merge of the server key reaches the index.
- Protection base: the commit of
mainthataccess protectrecords. The check starts after it. - Assigned role:
triageormaintain, which the operator gives withaccess role set. - Handle: the short name of a person in a space name, for example
meinpersonal/me.
Metadata
Release files for curu-memory 0.18.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| curu_memory-0.18.0.tar.gz | 7.4 MB | With provenance | Details for curu_memory-0.18.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| curu_memory-0.18.0-py3-none-any.whl | Python 3 | none | any | Details for curu_memory-0.18.0-py3-none-any.whl |
Total release size: 7.7 MB
Release files / curu_memory-0.18.0.tar.gz
| Download URL | curu_memory-0.18.0.tar.gz |
|---|---|
| Size | 7.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9dc325fd9cdae7021b64ff18dd0eb8bcb506c0eaa20f4be4ac6c2cb4be95cbc0
|
|
BLAKE2b-256 checksum How to use checksums |
7a14396c04a0e33a6178c705bf0a684a6eefa16c37e7dc2240ad4272db143cd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logRelease files / curu_memory-0.18.0-py3-none-any.whl
| Download URL | curu_memory-0.18.0-py3-none-any.whl |
|---|---|
| Size | 327.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c38afbebd0f4bf5cef752984b80f9aa7305ed3978558519ba980235eb861db4
|
|
BLAKE2b-256 checksum How to use checksums |
b0b2b7263723a0ab1116017e460a2baf37235555fb33869077eb25a99bd94f62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logSecurity for curu-memory 0.18.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for curu_memory-0.18.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.