Store memory
store_memoryAnchor a fingerprint of a memory or artifact on-chain as the NVS record
ai:gh:<github_id>:mem:<content_hash>. Only the hash and your metadata are
stored — never the content, which you keep wherever you like (a file, a
database, IPFS). What you get is a tamper-evident, timestamped proof that
content with this hash existed, which anyone can verify later; list_records
finds your earlier ones again. Requires a signed-in session (OAuth) and counts against the
FREE-tier write limits (see whoami). Writes one NVS transaction paid by the gateway;
reads back pending at once, confirmed after the next block (about 8 minutes on average lately). Not
idempotent — each distinct hash is a new record. Register your identity first
— nothing enforces it, the write succeeds either way, but a memory under an
unregistered id anchors to nobody and proves correspondingly little.
Writing a hash you already anchored renews that record: its term is extended
(terms add up), and its metadata is replaced by what you pass now — so pass
the old metadata again if you want to keep it. That is the only renewal there
is; a record left alone lapses after its term (see expires_in).
Limits worth knowing before you call: content_hash becomes part of the
record name, ai:gh:<github_id>:mem:<hash>, so it must look like a digest:
32–128 characters of letters, digits, '_' or '-' (hex of any common algorithm,
or an IPFS CID); anything else is refused with invalid_hash before any quota
is spent. Beyond that shape it is never verified: nothing checks that it is
the hash of anything, so a wrong digest anchors happily and proves nothing. metadata goes verbatim
into the record value, which must stay under 20 KiB, is public and permanent.
Returns the record name and the transaction id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metadata | No | Optional JSON object stored with the record (note, source, tags, …). Omit if unused. | |
| content_hash | Yes | Hash of the artifact/memory, e.g. a SHA-256 hex digest. It becomes the record's ':mem:<hash>' suffix; the content itself stays off-chain (e.g. IPFS) — only this fingerprint is anchored. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| txid | Yes | ||
| quota | Yes |