Blog / How-to guides

One node, one token: store a reading, a document, a message, a word and a memory

1 November 2026 · Semurg · 2 min read · Markdown

Last checked on r11.142.20261030.e037138 (30 Oct 2026): every command below ran on a fresh node of that release. The current release is r11.143.20261102.b5a9758 (2 Nov 2026), and the commands have not been re-checked on it yet (how)

universaldatabasememoryhow-to

Most applications end up with a separate place for each shape of data: one for readings, one for documents, one for messages, one for search, one for what an agent remembers. A Semurg node holds them all behind the same token and the same door. This post writes one of each and reads each back, in one script.

One API token and one node: a time-series reading, a document, a stream message, a searchable text and a memory fact are each written through the node and read back.One API tokenOne Semurg nodeA readingA documentA stream messageA searchable textA memory factOne API token and one node: a time-series reading, a document, a stream message, a searchable text and a memory fact are each written through the node and read back.One API tokenOne Semurg nodeA readingA documentA stream messageA searchable textA memory fact

Write one of each, read each back

The script on this page ran on the release published on 30 October 2026.[1]

The script below writes a reading under a series name, a document under an id, a message to a topic, a text to the word index and a fact to memory, and reads each back. The ids, names and scope are chosen so that the script stands on its own. The calls are the ones the other guides explain in full: time series, documents, streaming, search and memory.

bash
export SEMURG_API_TOKEN=<your token>
H="Authorization: Bearer $SEMURG_API_TOKEN"
q() { curl -sS http://localhost:4000/v1/query -H "$H" -H "Content-Type: application/json" -d "$1"; echo; }
echo "reading:"
q '{"op":"ts_ingest","rows":[["universal.demo.temp",1760259600000,2150]]}'
q '{"op":"ts_latest","series":["universal.demo.temp"]}'
echo "document:"
q '{"op":"object_put","objects":[{"id":900000000801,"value_b64":"eyJub3RlIjoiaGVsbG8ifQ=="}]}'
q '{"op":"object_get","ids":[900000000801]}'
echo "message:"
q '{"op":"stream_produce","topic":"universal-demo","values":["one message"]}'
q '{"op":"stream_read","topic":"universal-demo","cursor":0,"max":10}'
echo "word:"
q '{"op":"index_documents","docs":[{"id":900000000802,"body":"turbine inspection report"}]}'
q '{"op":"term_postings","word":"turbine"}'
echo "memory:"
curl -sS http://localhost:4000/v1/memory/remember -H "$H" -H "Content-Type: application/json" -d '{"scope":"universal-demo","source":"universal guide","facts":{"entities":[{"name":"Turbine 7","type":"Asset"},{"name":"Hall B","type":"Place"}],"relations":[{"source":"Turbine 7","target":"Hall B","type":"LOCATED_IN"}]}}'; echo
curl -sS http://localhost:4000/v1/memory/recall -H "$H" -H "Content-Type: application/json" -d '{"scope":"universal-demo","subject":"Turbine 7"}'; echo

Expected: every shape is written and read back through the same token: the reading 2150, the document present, one message, the word found in document 900000000802, and the memory fact answered

Each call answers in the same way across shapes: it says what it did, a read says whether the thing was present, absent or could not be judged, and nothing is guessed.

How it behaves

  • One API token and one address reach every shape; a per-user token still keeps one user's data apart from another's.
  • A time series, an object, a stream, a word index and a memory scope are different doors on the same node, each documented in its own guide.
  • Tables and column tables are on the same node too: create and read a table and sum a loaded column.
  • Graphs and vectors are on it as well: walk a graph and search vectors.

Next

This post was written with AI assistance. Every result in it is checked against a published release or record before the post goes out.

How these commands were checked

Our test farm ran each of the 1 command block marked runnable, exactly as written, with the answer checked against the expectation printed under it, against a fresh node of the published release r11.142.20261030.e037138. A post is published only when every one of them passed there.

Evidence

  1. Release r11.142.20261030.e037138, published on one.semurg.io (release:r11.142.20261030.e037138; the record as JSON)

Related