Glossary
Every term the relate docs define, in alphabetical order, with its short and full definition, other names in use, related terms and the page that covers it.
The terms the relate docs use with one meaning, 65 in all, each at a stable anchor: https://relatedb.ai/docs/reference/glossary/#<id>. Each entry gives the short definition first, then the full one. A page links the first use of a term here, and its markdown twin ends with the short definition of every term it links. The same terms as JSON: https://relatedb.ai/docs/glossary.json.
A
- agent harness
The program that runs a model and executes the commands it chooses, such as Claude Code, Codex or Cursor; relate detects one from its environment variables.
An agent harness is the tool around the model: it gives the model a shell or tools, runs what the model asks for, and feeds the output back. The docs say agent harness, or agent, for that tool, and keep "model" for the model itself.
relate detects a harness from the environment the CLI runs in. Any of these variables set to a non-empty value counts, whatever the value:
AI_AGENT,AGENT,CLAUDECODE,CLAUDE_CODE,COPILOT_AGENT,COPILOT_CLI,COPILOT_AGENT_SESSION_ID,CODEX_SANDBOX,CODEX_THREAD_ID,CURSOR_AGENT,GEMINI_CLI,OPENCODE,AUGMENT_AGENT,GOOSE_PROVIDERandREPL_ID. So doEDITORcontainingdevin,TERM_PROGRAMcontainingkiro, andPATHcontaining.pi/agent, matched in any case.Detection turns on agent mode only when stdout is not a terminal.
relate skill installuses its own list of agents to decide where to write the skill.- agent mode
CLI defaults for a detected agent harness on a non-terminal stdout, or forced on: at most 100 rows printed per statement, the cut reported, TOON in a pipe.
Agent mode changes two defaults of a query run and nothing else. The row cap defaults to 100 rows per statement, with the cut reported on stderr and in-band. With stdout piped and no output flag, the output mode is TOON instead of
jsonl. An explicit--modeor--max-rowsoverrides either default, and writes, exit codes and the envelope's fields stay the same.The CLI decides once per run, from the first rule that applies:
--agent-modeor--no-agent-mode, thenRELATE_AGENT_MODE=1or0, then detection, which turns it on when an agent harness is detected and stdout is not a terminal. The two explicit forms print a one-line announcement on stderr; detection is silent.One consequence follows from the
toondefault: with stdout piped and no output flag, a failed statement prints no error object, only the stderr message and the exit code. A run that needs the error object on stdout passes--mode envelope.
B
- Bolt
Neo4j's binary client protocol;
relate serve --bolt <port>speaks it, so Neo4j's drivers and Neo4j Browser can run statements against a relate store.Bolt is the protocol Neo4j's official drivers use.
relate serve --bolt <port>hosts it on one store, together with Bolt over WebSocket for browser tools, so existing driver code and Neo4j Browser connect to relate as they would to a server. Bolt carries statements; the language stays relate's dialect, so a Neo4j-only clause fails as it does on any other surface. The server speaks Bolt 4.4 and 5.4.Like every served surface, it binds to
127.0.0.1unless--hostsays otherwise, has no TLS, and checks one basic-auth credential shared with the other surfaces. WebSocket connections are accepted from loopback origins and the hosted Neo4j Browser and Console by default (loopback only under--auth none);--ws-allow-originreplaces that list with the origins it names (repeatable,*for any).relate serve --bolt 7687 --database ./team.rl --read-onlyRemoving
--read-onlylets clients write.- bookmark
The marker a commit returns,
relate:<n>, naming its place in the store's commit sequence; returned by the clients and over Bolt.Each commit that writes gets the next number in its store's commit sequence, and the bookmark names it:
relate:1, thenrelate:2, increasing per store. The Python client returns it fromcommit(), or for an autocommit write from the result (cursor.consume().bookmark); it isNonewhen the transaction wrote nothing. The Node.js client'scommit()returns it the same way, and over Bolt aCOMMITor an autocommit statement's summary carries it.conn.autocommit = False conn.cursor().execute("CREATE (:Person {name: 'Ada'})") print(conn.commit()) # relate:<n>, or None when nothing was writtenThe HTTP Query API has no bookmark manager and returns
bookmarksas an empty list.
C
- checkpoint
The step that writes a fresh snapshot of committed state and recycles old WAL segments: every 300 seconds by default, on clean exit, and on
.checkpoint.A checkpoint writes the committed graph to the store's snapshot files, rewrites the schema text copy under
.cypherlite/schema/, and deletes the WAL segments the new snapshot covers. It bounds two things: how much WAL an open has to replay, and how much space the WAL takes on disk.Three triggers run one. A timer fires every 300 seconds by default;
--checkpoint-interval-secsorRELATE_CHECKPOINT_INTERVAL_SECSsets the period, and0turns off the timer only. A clean exit checkpoints. The shell's.checkpointdot command checkpoints at once and prints nothing on success. A--read-onlyopen never checkpoints.Under the
snapshotdurability mode, a completed checkpoint is the only thing that makes writes durable, so the checkpoint period is the loss window.- client
A language package that runs the relate engine inside a program's process: the Python, Node.js, Rust, Java, Go and Swift clients.
A client is the engine as a library for one language, not a network driver: the program that imports it opens a store and runs statements in its own process, with nothing to connect to. The Python client calls the engine through a native extension module. The Node.js, Java, Go and Swift clients load one shared C library instead of each building its own, and share its contract of one call at a time per connection. Rust programs use the engine's crate directly.
The package names are
relate-dbfor Python and@relate/relatefor Node.js. A client holds the graph in its own process's memory, like any surface, so a second process reaches the same store throughrelate serverather than a second writable open.import relate conn = relate.connect("team.rl", read_only=True) print(conn.execute("MATCH (p:Person) RETURN count(p) AS n").fetchall())The connection is read-only; without
read_only=Truethe same call opens the store for writing, and creates it when the path is missing.The docs say client for these packages, and keep driver for Neo4j's drivers, which connect to a server.
- clone
relate clone: the command that copies a store into a new one, optionally in another codec, reading the source without writing it.relate clone SOURCE DESTcopies a store and exits. Each side is a directory store, or a single-file store when its path ends in.rl, so clone also converts between layouts. It reads the source as of its open, does not follow later commits, and never writes the source.:memory:is refused on both sides.--to-snapshot-format parquet|json|markdownwrites the destination in another codec; without it the destination keeps the source's codec. A clone of a.rlfile is a compact copy, which is how a single-file store gives back space it no longer uses.relate clone ./team.rl ./team-backup.rl--load SOURCEwith a--databasepath does the same copy before a run, and with:memory:loads the copy into memory.- codec
The on-disk encoding of a store's snapshot: Parquet (the default), JSON or markdown, fixed when the store is created.
The codec decides the files a checkpoint writes; it does not change the engine, the WAL, or how a statement runs.
parquet, the default, writes columnar files.jsonwrites the graph as a text file,graph.json, that a diff can read.markdownwrites a vault of notes, one file per node in a folder per label, with the WAL under.cypherlite/wal/.--snapshot-format parquet|json|markdownpicks the codec, and only for an empty directory: an existing store keeps the codec it was created with. To change it,relate clone --to-snapshot-format <codec> <source> <dest>writes a new store in the other codec.--snapshot-format parquet-wideis the one value that applies to an existing store too: it keeps theparquetcodec and writes one typed column per common property key, converting aparquetstore at its next checkpoint.relate clone --to-snapshot-format json ./team.rl ./team-jsonrelate infoprints a store's codec without opening it.- constraint
A rule the store enforces on every write, such as a unique property, a required property, a property type or a node key; a violating write fails.
A constraint makes the store refuse data that breaks a rule. relate creates the constraint kinds
SHOW CONSTRAINTSreports asNODE_PROPERTY_UNIQUENESS(REQUIRE p.id IS UNIQUE),NODE_PROPERTY_EXISTENCE(IS NOT NULL),NODE_PROPERTY_TYPE(IS :: INTEGER),NODE_KEYandRELATIONSHIP_KEY. A write that breaks one fails as a whole withConstraintValidationFailedand exit code 6.CREATE CONSTRAINT person_id IF NOT EXISTS FOR (p:Person) REQUIRE p.id IS UNIQUEA uniqueness or key constraint also creates a range index that the planner can use. A graph type derives constraints of its own, and
relate pushuses a label's uniqueness or key constraint as the key it merges on in Neo4j.- Cypher
The declarative graph query language relate runs, written as ASCII-art patterns such as
(a)-[:KNOWS]->(b); relate follows Neo4j's Cypher 25 by default.Cypher describes what to find or change as patterns of nodes and relationships:
(p:Person)-[:WORKS_ON]->(proj:Project)matches people and the projects they work on, and clauses such asMATCH,WHERE,CREATE,MERGEandRETURNsay what to do with the matches. It came from Neo4j, and its open specification is openCypher.relate speaks one dialect on every surface: Cypher 25 by default, with openCypher as the floor and a
CYPHER 5prefix for a statement that asks for the older version. Features that only make sense on a multi-user server, such as users, roles and several databases, are left out and fail with a typed error.MATCH (p:Person)-[:WORKS_ON]->(proj:Project) RETURN p.name AS person, proj.name AS projectThe name is written Cypher, with a capital C, in prose.
- Cypher 25
The Neo4j Cypher version aligned with GQL; the default language of every relate namespace, with
CYPHER 5as the per-statement alternative.Cypher 25 is the Neo4j Cypher version aligned with GQL, and it is relate's target. Where an openCypher proposal, Cypher 5 and Cypher 25 disagree, relate does what Cypher 25 does. Statements run as Cypher 25 unless they start with
CYPHER 5; aCYPHER 25prefix states the default explicitly.The default is recorded per namespace, and
SHOW DATABASESreports it asdefaultLanguage.ALTER DATABASE <name> SET DEFAULT LANGUAGE CYPHER 5changes only whatSHOW DATABASESreports; an unprefixed statement still runs as Cypher 25.CYPHER 25 MATCH (p:Person) LET years = 2026 - p.since FILTER years >= 3 RETURN p.name AS nameSyntax that Neo4j has accepted but not settled is not part of the default: it is a preview feature.
D
- directory store
A store kept as a folder of snapshot files, a WAL folder and lock files; the layout for any
--databasepath that is not:memory:and does not end in.rl.A directory store spreads the store over a folder: the snapshot files the last checkpoint wrote, a
manifest.json, the WAL underwal/(under.cypherlite/wal/with themarkdowncodec), lock files, and the schema text copy under.cypherlite/schema/.relate infoprints the layout asnative directory.It is the only durable layout that a second process can read while a writer has it open. A
--read-onlyopen beside the writer sees the store as of its own open, and--read-only=livefollows the writer's commits as they land. It is also the layout for a diffable snapshot: with thejsoncodec, the snapshot is a text file.--wal-dirmoves the WAL out of the folder, and--snapshot-formatpicks the codec when the folder is empty. On disk it takes the snapshot plus the WAL written since the last checkpoint.- durability mode
When a commit counts as safe on disk:
full(the default) syncs the WAL first,everysecondabout once a second, andsnapshotonly at checkpoints.The durability mode is a setting of the process that opens a store, not of the store:
--durability-modeorRELATE_DURABILITY_MODE, and an open that sets nothing getsfull. It decides when the WAL is synced, that is, forced out of the operating system's cache onto the disk, relative to the moment a commit returns.Mode A crash can lose fullNo acknowledged write everysecondAbout the last second of acknowledged writes snapshotEvery write since the last completed checkpoint A killed process loses the window too, not only a power cut. An in-memory store keeps nothing after exit in any mode.
E
- element id
The string
elementId()returns for a node or relationship, such as4:relate-neo4j:n0; it stays the same when the store is closed and opened again.elementId(n)gives each node and relationship an id string:4:relate-neo4j:n0for a node,5:relate-neo4j:r0for a relationship. The middle segment names the namespace the entity belongs to (relate-neo4jfor the defaultneo4jnamespace), anddb.nameFromElementId()reads it back. It is the way to name one entity across statements, and it survives closing and reopening the store.CREATE (a:Person)-[r:KNOWS]->(b:Person) RETURN elementId(a) AS a, elementId(r) AS r, elementId(b) AS bid(), the older integer id, still runs and is deprecated:EXPLAINreports it with the remedyUse `elementId` instead.- envelope
One compact JSON object per result set, printed by
--mode envelope, that keeps the column list even when there are no rows.The envelope is the CLI's machine-readable result: one JSON object per result set, on one line. It holds
columnsandcolumnTypes, therowsas objects keyed by column, the planner'snotifications,truncated, the statement's phasetimingsin milliseconds, andplanCache, which says whether a cached plan served the statement. Under a row cap it also holdsrowCap, with the rows kept and the total. AnEXPLAINorPROFILEadds theplan. Becausecolumnsis always present, an empty result still says what it would have held. Thetimingsnumbers change from run to run.A failed statement prints an error object instead, with the stderr message and the exit code unchanged. Agent mode never changes the envelope's shape.
relate --mode envelope "UNWIND [1, 2] AS x RETURN x"{"columnTypes":["INTEGER"],"columns":["x"],"notifications":[],"planCache":"miss","rows":[{"x":1},{"x":2}],"timings":{"elapsed_ms":0.454958,"execute_ms":0.265791,"lex_parse_ms":0.026625,"lower_ms":0.035207999999999996,"parse_ms":0.122333,"plan_ms":0.055292,"result_generation_ms":0.0005,"rewrite_ms":0.008624999999999999},"truncated":false}- error object
The JSON object a failed query run prints on stdout in the
json,jsonl,envelopeandspeedscopemodes: the class, the kind, the message, the exit code.When a statement fails in a JSON output mode, the CLI prints the message on stderr as always, and on stdout one object under the key
error.codeis the class (validation_error,conflictand the rest),exit_codeequals the process exit code,kindis the engine's error variant,retryableistruefor a write-write conflict and for a--concurrent-logical-workspace-limitrefusal while other statements hold the workspace pool, andmessagerepeats the stderr text. A syntax error also carries thesourcetext and thecolumn.{"error":{"code":"validation_error","column":10,"exit_code":6,"kind":"syntax","message":"syntax error: parse error: expected RightParen, got \"RETURN\" (RETURN) MATCH (n RETURN n ^","retryable":false,"source":"MATCH (n RETURN n"}}Exit codes 0 and 2 never come with one: 0 is success, and a usage error stops the run before any statement. The
tableandtoonmodes print none, so under agent mode's pipedtoondefault a failure shows only on stderr and in the exit code.- exit code
The number a
relaterun returns to the shell; each nonzero value names a class of failure, such as 2 for usage, 5 for conflict, 6 for a rejected statement.Every
relaterun ends with an exit code from one closed table, so a script or an agent can branch on the class of failure without parsing a message:Code Class Meaning 0 successSuccess, including an empty result 1 fatal_errorA runtime failure: store open or I/O error, capacity limit, execution failure 2 usage_errorAn unknown flag, a bad or missing value, an extra positional argument 5 conflictA write-write conflict, or the store is locked by another opener 6 validation_errorThe statement is rejected: syntax, semantic or type error, or a write on a read-only store 7 timeoutA statement ran longer than --timeoutIn the JSON output modes, a failed query run also prints an error object whose
exit_codeequals the process's.relate agent-contextprints the same table for the installed version.- extension
A package that adds an action to the CLI, run as
relate run <name>and installed withrelate extension install.An extension is a separate program that
relate run <name>starts: it reads its own source, such as files or an API, and sends rows back, while the host CLI alone owns the store, the limits, and the exit codes. Packages live under$XDG_CONFIG_HOME/relate/extensions/<name>/, and the flags an action takes come from its own manifest.relate extension installinstalls a package from the signed first-party channel by default, from a GitHub release pinned to a commit with--github, from an https URL with--url, or from a local folder with--from; every download is checked before it lands, and nothing is fetched silently.relate extension listprints what is installed, offline, andrelate extension initscaffolds a new package. An uninstalled name fails closed, with nothing fetched.The docs keep the word extension for these packages, and skill for the agent's instructions.
F
- full-text index
An index over one or more string properties that finds entities containing given words, ranked by a BM25 relevance score.
A full-text index splits the strings of the properties it covers into lowercase alphanumeric words and finds the entities that contain any word of a query, ignoring case;
AND,ORandNOTin capitals combine words. There is no stemming:graphsdoes not matchgraph. The score is BM25, as in Neo4j: a word few entities hold counts for more, and a match in a short text counts for more than one in a long text.CREATE FULLTEXT INDEX doc_text IF NOT EXISTS FOR (d:Doc) ON EACH [d.title, d.body]The SEARCH clause queries it with a string and a required
LIMIT, and acceptsSKIPandWITH ANALYZER; the analyzer applies to the query string only, andenglishstems its words and drops English stop words.SHOW INDEXESlists it with the typeFULLTEXT. A full-text and a vector search can be fused into one ranking withCOMBINE, a preview feature.
G
- GQL
The ISO standard graph query language; Neo4j's Cypher 25 aligns Cypher with it, and relate follows that alignment.
GQL is the graph query language standardized by ISO. Cypher and GQL share their pattern syntax, and Neo4j's Cypher 25 brings Cypher closer to the standard with new syntax rather than a new language.
In relate, the GQL-aligned forms run by default, without an opt-in: label expressions with
&,|,!andIS, path selectors such asSHORTEST 1, quantified path patterns,LET,FILTER,NEXT,INSERT, explicitGROUP BY, string concatenation with||, type predicates such asx IS :: INTEGER, and graph types. Some GQL function spellings, such asstddev_samp, wait behind a preview opt-in.MATCH (n IS Person|Project) RETURN labels(n) AS labels, n.name AS name- graph type
A schema for a whole graph, declared in Cypher, that lists node and relationship types with their properties; writes that break it fail.
A graph type describes what the graph may hold: for each node type its label and properties, with types and
NOT NULL, and for each relationship type its endpoints.ALTER CURRENT GRAPH TYPE SET { … }replaces the graph type of theneo4jnamespace,SHOW CURRENT GRAPH TYPEprints it, andCREATE GRAPH TYPEdefines one. The store derives constraints from it, so a write that breaks it fails withConstraintValidationFailed.ALTER CURRENT GRAPH TYPE SET { (p:Person => {name :: STRING NOT NULL}) }After that statement,
CREATE (:Person {age: 3})fails, because aPersonneeds aname. Optional properties, default values and implied labels are preview features. The graph type is written to the schema folder at each checkpoint, and an ontology can be applied as one.
H
- HTTP Query API
The JSON-over-HTTP statement endpoint
relate serve --http <port>hosts, in the shape of Neo4j's Query API v2:POST /db/<name>/query/v2.The HTTP Query API takes a statement and its parameters as JSON and answers with the result as JSON. relate speaks the request and response shape of Neo4j's Query API v2, so existing Query API clients work against it:
POST /db/<name>/query/v2runs a statement, managed transactions group several, andGET /returns a discovery document.relate serve --http <port>hosts it on one store, on127.0.0.1by default, without TLS, behind the same basic-auth credential as the other served surfaces. Browser origins are allowed from loopback and the hosted Neo4j Browser and Console by default, and--originadds others. An idle managed transaction expires after 60 seconds, and at most 128 are open at once, by default.relate serve --http 7474 --database ./team.rl --read-onlyrelate pullandrelate pushuse the same API as a client, to read from and write to Neo4j or Aura.
I
- in-memory store
A store that lives only in the process that opened it, named
:memory:; the default--database, gone when the process exits.An in-memory store writes nothing to disk: no snapshot, no WAL, no lock file. It is what
relateopens when no--databaseis given, and what the WebAssembly build behind the cells on this site runs. Each process that opens:memory:gets its own empty graph, and the graph is gone when that process exits, whatever the durability mode.--loadfills an in-memory store from a.rlfile, a directory store, or an https URL. The load is a read-only open that releases its source afterward, so the source can be deleted or opened for writing while the copy stays in memory. A--read-onlyopen of:memory:rejects writes and creates nothing.relate infoandrelate clonerefuse:memory:, since there is nothing on disk to describe or copy.relate --mode envelope "RETURN 1 AS ok"- index
A structure the planner uses to find nodes or relationships by a property without scanning a label: range, text, point, vector or full-text.
An index maps property values to the nodes or relationships that hold them, so a lookup such as
MATCH (p:Person {name: 'Ada'})starts from the matching node instead of reading everyPerson. A plainCREATE INDEXmakes a range index, which serves equality and range comparisons;CREATE TEXT INDEX,CREATE POINT INDEX,CREATE VECTOR INDEXandCREATE FULLTEXT INDEXmake the other kinds. A new store has none.CREATE INDEX person_name IF NOT EXISTS FOR (p:Person) ON (p.name)SHOW INDEXESlists every index with its type and state, andDROP INDEX <name>removes one. A uniqueness or key constraint creates a range index of its own, listed with the constraint as its owner. When a plan reads more than it needs to, the planner's notification names the index that would help, andEXPLAINshows whether a plan uses one.Indexes count toward the logical graph size, and the schema folder holds a
CREATEstatement for each.
L
- label
A name that classifies a node, such as
Person; a node has zero or more, and patterns, indexes and constraints refer to them.A label groups nodes:
MATCH (p:Person)reads only nodes labeledPerson, and an index or constraint covers one label's property. A node can carry several labels, or none;SET n:Adminadds one,REMOVE n:Personremoves one, andlabels(n)lists them.MATCH (n:Person) SET n:Engineer RETURN labels(n) AS labelsLabel expressions combine labels in a pattern, and dynamic labels,
MATCH (n:$($label)), take a label from a parameter. A label the store has never seen is not an error in a read, butEXPLAINreports it with a notification.- label expression
A test on a node's labels or a relationship's type built with
&,|,!and%, such as(n:Person|Project)or(n IS Person).A label expression generalizes
(n:Person).|matches either label,&both,!excludes a label, and%matches any label at all; parentheses group.IScan replace the colon, as GQL writes it. The same operators apply to relationship types:-[:KNOWS|WORKS_ON]->matches either type.MATCH (p:Person&!Project WHERE p.role = 'engineer') RETURN p.name AS nameOne clause may not mix the colon-chained form
:A:Bwith the new symbols, orISwith a colon conjunction; the parser rejects the mix with anInvalidLabelExpressionorMixedIsAndColonConjunctionerror. Themixed-label-syntaxpreview feature allows it.- live read-only
A read-only open of a directory store,
--read-only=live, that tails the WAL and follows the writer's commits as they land.A plain
--read-onlyopen freezes its view at open: later commits by the writer stay invisible until the reader reopens. The live form,--read-only=live, instead tails the writer's WAL, so each statement reads the store as of the writer's latest commit it has seen. The value attaches to the flag (--read-only=live) and is given once per run.It works only for a directory store. It is refused for a
.rlfile, for:memory:, and together with--load. Like any read-only open, it never writes or checkpoints.relate serve --mcp stdio --database ./team --read-only=liveThe server reads
./teambeside its writer; removing--read-only=livelets it write, and it then needs the writer to have exited.- logical graph size
relate's own byte count of the live nodes, relationships, properties and index entries; what
--logical-graph-size-limitcaps.The logical graph size is an estimate relate keeps of the graph it holds in memory: the live nodes, relationships, properties and index entries, counted in bytes by the engine's own accounting. It is not the size of the files on disk, which depends on the codec, and not the process's resident memory, which also holds the engine, buffers, and the results of running statements.
--logical-graph-size-limitcaps it, in bytes or with a unit:mborgbfor powers of 1000,miborgibfor powers of 1024. The default is unlimited, and0means unlimited too. A write that would take the graph past the cap fails withcapacity exceeded: used=… limit=…and exit code 1.relate --logical-graph-size-limit 1000 "UNWIND range(1, 1000) AS i CREATE (:N {i: i})"capacity exceeded: used=258 limit=1000The command writes to an in-memory store, so nothing on disk changes.
M
- MCP
The Model Context Protocol, which agent hosts use to call tools;
relate serve --mcpexposes a store asread_cypher,get_schemaandwrite_cypher.MCP is a protocol between an agent host, such as Claude Code, Cursor or Codex, and the servers that give it tools.
relate serve --mcp stdioserves a store on stdin and stdout, started by the host as a child process and stopped when the host closes stdin;--mcp <port>serves the streamable HTTP transport on a port instead.The server lists
read_cypherandget_schema, andwrite_cypheronly when the store is writable. Opened with--read-only, it takes no writer lease and can run beside a process that writes a directory store. Over stdio there is no authentication, because the host spawned the process; on a port, one basic-auth credential from--authorRELATE_AUTHguards it, or a generated token printed at startup.claude mcp add relate -- relate serve --mcp stdio --database ./graph.rl --read-onlyRemoving
--read-onlyallows writes.
N
- namespace
One of the three fixed graphs in every store:
neo4jfor user data,systemfor administration, andsystem_ontologies, listed but not queryable.A store holds exactly three namespaces, and the set is fixed: no statement creates or drops one.
neo4jholds the user graph and is where a statement runs unless it says otherwise.systemanswers administration statements such asSHOW DATABASES.system_ontologiesis listed bySHOW DATABASESbut not queryable.A statement picks a namespace with
USE neo4jorUSE system; any other graph name fails before the statement runs. On the CLI,--namespacesets the namespace for the session. Each namespace records its default Cypher version, whichSHOW DATABASESreports asdefaultLanguage.The docs say namespace, not database, for these graphs, because relate keeps one user graph per store: several graphs means several stores.
SHOW DATABASES YIELD name, defaultLanguage RETURN name, defaultLanguage- node
An entity in the graph: it carries zero or more labels and a map of properties, and relationships connect it to other nodes.
A node is written in a pattern in parentheses:
(p:Person {name: 'Ada'})is a node bound top, with the labelPersonand the propertyname. A node can hold any number of labels, including none, and any number of properties. It exists on its own; a relationship always has a node at each end.elementId(n)returns a node's element id. A plainDELETEremoves a node with no relationships; on a node that has some it fails withDeleteConnectedNode, andDETACH DELETEremoves the node together with its relationships.CREATE (ada:Person {name: 'Ada', role: 'engineer'}) RETURN elementId(ada) AS id, labels(ada) AS labelsThe word node always means a graph node in these docs; the JavaScript runtime is Node.js.
- notification
Advice the planner attaches to a plan, such as a missing index, with a GQLSTATUS code, a severity and a remedy; derived only under
EXPLAINorPROFILE.A notification is the planner's comment on a statement: a missing index, an estimate far from the actual rows, a label or property the store does not have, a deprecated function. Each has a GQLSTATUS code, such as
03C91, a severity, a title, a description and a remedy that says what to change. A plain run derives none;EXPLAINandPROFILEdo.In the envelope,
notificationslists them with the keyscode,gql_status,severity,category,title,descriptionandremedy, plusoperator_idwhen one concerns a single operator of the plan. In--mode table, they print as lines in the form<severity> <GQLSTATUS> <code>: <description> Remedy: <remedy>, and plan warnings print in the plan'sWarningscolumn.The errors reference lists every notification with its code and severity, each at a stable anchor.
O
- ontology
An Ontology Graph Spec document stored with a store, managed by the
db.ontology.*procedures behind theontologypreview, and appliable as the graph type.An ontology is a JSON or YAML document in the Ontology Graph Spec format that describes the graph's node and relationship types, their properties, and their constraints. A store holds at most one, for the
neo4jnamespace, stored as written. Thedb.ontology.*procedures manage it:setvalidates and stores a document,getreturns it ornull,dropremoves it, andapplyturns it into the store's graph type, after which writes that break it fail.The procedures need the
ontologypreview feature; withoutRELATE_PREVIEW=ontologyevery call fails with the preview message. Thesystem_ontologiesnamespace is listed bySHOW DATABASESbut not queryable.RELATE_PREVIEW=ontology relate --database ./team.rl --read-only "CALL db.ontology.get()"At each checkpoint the document is written to the schema folder as
ontology.jsonorontology.yaml.- openCypher
The open specification of Cypher and its Technology Compatibility Kit (TCK) of scenarios; relate treats it as the floor of its dialect.
openCypher is the vendor-neutral definition of Cypher. Its Technology Compatibility Kit (TCK) is a suite of scenarios that pins down what each clause, expression and error means, and relate treats those scenarios as the contract for its parser, planner, executor, and error classes.
Coverage is measured outside the engine's own test suite: a spec harness runs Neo4j's Cypher suites, the TCK among them, against each pull request that is ready for review, and reports the result without blocking a merge. No current pass count is published. A pass figure from the retired in-repository TCK run, which ended on 2026-11-05, is history rather than a current claim.
Where Cypher 25 deliberately changed behavior that an older TCK scenario expects, relate follows Cypher 25.
P
- parameter
A named value a statement refers to as
$nameand the caller binds separately, such as with--param name=valueon the CLI.A parameter keeps a value out of the statement text: the statement says
$name, and the value travels beside it. The same statement then runs with any value, and a value never changes what the statement means, so text from a user or a model cannot turn into Cypher.On the CLI,
--param N=Vbinds one parameter and repeats for more.Vis read as JSON, so--param n=3is an integer and--param ids=[1,2]a list, and a bare word is a string.--fetch-params N=SRCreads JSON from a file or fetches it from an http or https URL and binds it asN. The clients take a map of parameters with each statement, and Bolt and the HTTP Query API carry them in the request.relate --database ./team.rl --read-only --param name=Ada "MATCH (p:Person {name: \$name}) RETURN p.role AS role"The backslash keeps the shell from expanding
$name.- path
An alternating sequence of nodes and relationships that a pattern matched, bound with
p = …and read withnodes(p),relationships(p)andlength(p).Binding a pattern to a variable,
MATCH p = (a)-[:KNOWS]->(b), makespa path: it starts and ends with a node, with a relationship between each pair.length(p)counts its relationships,nodes(p)andrelationships(p)return its parts as lists. A path is a value: a statement can return it or collect it into a list.MATCH p = (:Person {name: 'Ada'})-[:KNOWS]->(:Person) RETURN length(p) AS hops, [n IN nodes(p) | n.name] AS namesPath selectors such as
SHORTEST 1andALL SHORTEST, and modes such asTRAILandACYCLIC, choose which paths a variable-length pattern returns. The graph view on these pages draws a path result as a graph.- plan
The tree of operators the planner chooses to run a statement;
EXPLAINshows it without running,PROFILEruns and adds rows and time per operator.Before a statement runs, the planner turns it into a tree of operators: a scan or an index seek to find the starting nodes, expands along relationships, filters, aggregations, and
ProduceResultsat the root.EXPLAIN <statement>returns the plan without running anything, so writes, procedures andLOAD CSVare only planned.PROFILE <statement>runs it and adds what each operator did: rows, time, database hits, and memory.relate --database ./team.rl --read-only --mode table "EXPLAIN MATCH (p:Person {name: 'Ada'}) RETURN p.role AS role"In
--mode tablethe plan prints as a table with one row per operator; in the envelope it is theplanobject.PROFILE'sEst/Actualcolumn compares the planner's estimate with the rows produced. The planner rewritesMATCHpatterns; other clauses run in the order written.- point index
An index over a property holding
pointvalues that narrows bounding-box and radius predicates to nearby nodes through an R-tree.A point index keeps the points of one property in an R-tree. With it in place, a
WHEREpredicate shaped likepoint.withinBBox(p.loc, lowerLeft, upperRight)orpoint.distance(p.loc, center) < boundnarrows the candidate nodes through the tree before the exact coordinate check runs.SHOW INDEXESlists it with the typePOINT.CREATE POINT INDEX place_loc FOR (p:Place) ON (p.loc)In a
PROFILEof a radius query over 2,000 places, three of which matched, the scan read three nodes rather than 2,000. The tree is rebuilt from the index's stored metadata when the store opens.- preview feature
A Cypher feature from a not-yet-settled proposal that relate ships switched off; it runs only when
RELATE_PREVIEWnames it when the store opens.A preview feature is syntax, a function name or a procedure family from a Cypher Improvement Proposal (CIP) whose shape can still change. relate implements several and keeps each off by default, so a statement that runs today keeps its meaning when the proposal settles.
RELATE_PREVIEWtakes a comma-separated list of names and is read once, when the store opens, from the environment of the process that opens it. An unknown name stops the open with exit code 1 and lists every known name, so a typo never passes silently. While a feature is off, most fail with a message that names the opt-in; a name gate fails as an unknown function instead.semantic error: SemanticError: preview feature 'local-callables' is not enabled: set RELATE_PREVIEW=local-callablesThe WebAssembly build has no process environment, so the cells on this site run without previews.
- property
A named value stored on a node or relationship, such as
name: 'Ada'; values are scalars, temporal and spatial values, vectors, or lists of them.Properties are a node's or relationship's key-value pairs:
{name: 'Ada', since: 2024}. A value is a string, a number, a boolean, a temporal value such as adate, apoint, a vector, or a list of one of these. A map is not a property value: storing one fails withtype error: InvalidPropertyType.SET n.role = 'maintainer'sets one,SET n += {…}merges several, and setting a property tonullremoves it, so a property is either present with a value or absent.keys(n)lists the keys andproperties(n)returns them as a map.CREATE (n:Person {name: 'Ada', age: 36}) SET n.age = null RETURN keys(n) AS keysThe statement returns
["name"]. Indexes and constraints are declared on one label's or type's property.- pull
relate pull: the command that copies a subgraph from Neo4j or Aura into a store, over the HTTP Query API, from Cypher that returns graph elements.relate pullruns one or more Cypher statements against a Neo4j or Aura database and writes the nodes, relationships and paths they return into--database, a directory store or a.rlfile, never:memory:. Every statement must return graph elements. All of them run in one process, with one checkpoint at the end.The connection comes from
NEO4J_URI,NEO4J_USERNAME,NEO4J_PASSWORDandNEO4J_DATABASE, read from an env file with--fromor from the process environment.--parambinds a parameter of the source statement. Basic auth to a non-loopbackhttp://address is refused unless--allow-plaintextis given.relate pull --from .env --query 'MATCH (n)-[r]->(m) RETURN n, r, m LIMIT 100' --database ./graphIt writes to the local store, and reads the remote one only through the statements given.
- push
relate push: the command that copies a scoped subgraph of a store into Neo4j or Aura over the HTTP Query API; the mirror ofrelate pull.relate pushreads a store and writes a part of it into a Neo4j or Aura database. The part is what--querystatements return, the nodes with the labels in--labels, the relationships of the types in--types, or, with none of the three, the whole store.--tonames an env file or a Query API URI.The remote write is batched (
--batch-size, default 5000) and merges on keys: by default the key each label's uniqueness or key constraint gives, overridden by--merge-keyand--rel-key.--nodes-updateand--rels-updatechoose betweenadd,replaceandskipfor rows that exist.--dry-runprints the plan without touching the remote.relate push --to .env --database ./graph.rl --labels Person --dry-run
Q
- quantified path pattern
A pattern repeated a bounded or unbounded number of times, written
((a)-[:R]->(b)){1,3}or-[:R]->{1,3}; GQL's form of a variable-length path.A quantified path pattern repeats part of a pattern.
((a)-[:KNOWS]->(b)){1,3}matches one to threeKNOWShops and keeps the variables inside the group, each bound to a list of what it matched along the way.-[:KNOWS]->{1,3}quantifies a single relationship, and+and*stand for one or more and zero or more. Path selectors such asSHORTEST 1and modes such asTRAILcombine with it.MATCH (:Person {name: 'Ada'}) ((a)-[:KNOWS|WORKS_ON]->(b)){1,2} (reached) RETURN DISTINCT reached.name AS reachedAn explicit upper bound over 500 hops is refused at admission with
TraversalDepthExceeded, because a deeper walk can overflow the native stack;--max-traversal-depthraises the limit up to 2000.- query
A statement that reads, where the contrast with writing matters; also
relate query, the command that runs a statement session.In these docs, query has two meanings, both narrow. As a noun about Cypher, it is a statement that reads, used where the difference from a write matters: a query on a
--read-onlystore runs, a write fails. As a command,relate queryruns a statement session: one statement, a script on stdin, or the interactive shell on a terminal.relatewith a statement and no command is the same session.The MCP server keeps the same split:
read_cypherruns reading statements, andwrite_cypher, listed only when the store is writable, runs writes.relate query --database ./team.rl --read-only "MATCH (p:Person) RETURN p.name AS name"
R
- read-only
An open mode (
--read-only) that never writes, checkpoints or migrates the store; writes fail, and a directory store can be read beside its writer.The
--read-onlyflag opens an existing store without changing it: no write, no checkpoint, no migration, and nothing created when the path is missing. A statement that writes fails with exit code 6.relate serve --read-onlylists only the reading MCP tools, and it takes no writer lease, so it can run beside a writer.Who else may hold the store depends on the layout. A directory store can be read by several read-only processes while one writer works on it. A
.rlfile opens read-only only while no writer holds it.:memory:read-only rejects writes and creates nothing.The flag takes an optional freshness:
--read-only=snapshot, the default, sees the store as of the open, and--read-only=livefollows the writer's commits (live read-only). Every copyable host config block in these docs opens the store read-only, and removing the flag allows writes.relate --database ./team.rl --read-only "MATCH (p:Person) RETURN p.name AS name LIMIT 5"- relationship
A directed, typed connection between two nodes, with properties of its own; every relationship has exactly one type and a start and an end node.
A relationship is written between two nodes with brackets and an arrow:
(a)-[w:WORKS_ON {since: 2024}]->(b). It has exactly one relationship type, a direction from its start node to its end node, and its own properties. ACREATEwithout a direction or with more than one type fails:syntax error: RequiresDirectedRelationship: CREATE relationships must have a directionA pattern can still match in either direction,
(a)-[:KNOWS]-(b), and follow several types,-[:KNOWS|WORKS_ON]->. A node with relationships cannot be removed with a plainDELETE;DETACH DELETEremoves its relationships with it.elementId(r)returns a relationship's element id.- relationship type
The single name every relationship carries, such as
KNOWSorWORKS_ON; patterns match on it, and a relationship cannot change it.Every relationship has exactly one type, given when it is created:
CREATE (a)-[:WORKS_ON]->(b). A pattern matches on it,-[:WORKS_ON]->, or on several with|, andtype(r)returns it. A relationship's type cannot be changed in place:SET r:Bon a relationship fails withSET labels() requires a node, so a new type means a new relationship.MATCH (:Person)-[r]->(:Project) RETURN type(r) AS type, count(*) AS nA dynamic type,
CREATE ()-[:$($type)]->(), takes the type from a parameter.- .rl
The file extension of a single-file store; a
--databasepath that ends in.rlselects that layout..rlnames the single-file layout: one file holding a store's snapshot, its WAL, and its metadata. The extension is what selects it.--database ./graph.rlopens or creates a single-file store, and any other path is a directory store.relate infoprints the layout aslayout: .rl bundle.Files written by releases up to 0.16 with the older extension
.clopen as single-file stores too. The docs say "a.rlfile" for the layout and "store" for the database it holds.relate info --database ./graph.rl --jsonrelate inforeads the file's metadata without opening the store.- row cap
The limit on rows printed per statement, 100 by default under a detected agent harness;
--max-rowssets it, and a cut is reported in-band.The row cap bounds how many rows the CLI prints for one statement, so a broad read cannot flood an agent's context.
--max-rows Nsets it and0means unlimited;RELATE_MAX_ROWSsets it for an environment. Without either, it is 100 under a detected agent harness with stdout not a terminal, and unlimited otherwise. The statement itself runs to completion: the cap limits printing, not reading.A cut is never silent. stderr gets a warning line, and the machine modes carry it in-band: in the envelope,
"truncated":trueand arowCapobject with the rows kept and the total. In this example, only the envelope'stimingsnumbers change from run to run.relate --mode envelope --max-rows 2 "UNWIND range(1, 5) AS x RETURN x"warning: result truncated to 2 rows (the statement returned 5); pass --max-rows 0 for all rows {"columnTypes":["INTEGER"],"columns":["x"],"notifications":[],"planCache":"miss","rowCap":{"kept":2,"total":5},"rows":[{"x":1},{"x":2}],"timings":{"elapsed_ms":0.40037500000000004,"execute_ms":0.23075,"lex_parse_ms":0.023875,"lower_ms":0.0445,"parse_ms":0.111542,"plan_ms":0.04975,"result_generation_ms":0.0022919999999999998,"rewrite_ms":0.010083},"truncated":true}
S
- safe mode
An opt-in policy (
--safe) that refuses a new named node without a label, an unboundedMATCHread and a remote--load, before anything runs.Safe mode refuses statement shapes that agents commonly get wrong, before anything runs. A
CREATEorMERGEof a new node without a label, and aMATCHread withoutLIMITor a reducing aggregate such ascount(*), fail withSafeModeViolationand exit code 6;collect()does not count as reducing. A remote--loadsource fails with exit code 2, before any network request.It is off unless asked for:
--safeorRELATE_SAFE_MODE=1turns it on,--no-safeorRELATE_SAFE_MODE=0off, andrelate serve --safeapplies it to every statement the server runs. It is a policy, not a limit of the database, and its messages say so. It complements read-only: read-only stops writes, safe mode stops shapes that are legal but rarely meant.The message for
MATCH (n) RETURN nunder--safe, on stderr:syntax error: SafeModeViolation: This statement is not allowed in safe mode: an unbounded read (`MATCH … RETURN` or `MATCH … WITH` without `LIMIT`). Safe mode refuses shapes an agent commonly gets wrong — add `LIMIT <n>`, or return an aggregate such as `count(*)`, so the read has a bounded result. This is a policy, not a database limit; reopen without --safe to allow it.- schema folder
The text copy of a store's schema under
.cypherlite/schema/: indexes and constraints, the graph type and the ontology, rewritten at each checkpoint.Every checkpoint of a durable store writes its schema as text under
.cypherlite/schema/.schema.cypherholds oneCREATE INDEXorCREATE CONSTRAINTstatement per entry of the catalog, asSHOW INDEXESandSHOW CONSTRAINTSrender it.graph-type.cypherholds the graph type when the store has one, andontology.jsonorontology.yamlthe ontology document when one is set. A reviewer or an agent reads the schema from one file, and a schema change shows in a diff.The folder is a mirror, never a source. Editing it does not change the store; the schema changes through Cypher statements, and the next checkpoint rewrites the folder. On open, the files are compared byte for byte with the schema the last checkpoint wrote, and a changed, missing or extra file fails the open with an error naming it. The repair the message gives is to delete
.cypherlite/schema/and reopen..cypherlite/schema/schema.cypher CREATE RANGE INDEX `person_name` FOR (n:`Person`) ON (n.`name`);- search clause
The Cypher 25
SEARCHclause, which restricts aMATCHto the top results of a vector or full-text index and binds their score.SEARCHfollows aMATCHthat binds one variable, and narrows it to the entities an index ranks highest:SEARCH d IN (VECTOR INDEX doc_embedding FOR $query LIMIT 5) SCORE AS score. A vector index takes a query vector, and a full-text index a query string.LIMITis required, and the score is reachable only throughSCORE AS.A vector search may filter inside the clause, with
WHEREon the properties the index lists inWITH [...], before ranking. A full-text search takesSKIPandWITH ANALYZERinstead. TheMATCHbefore it must be one node or one relationship hop with one variable, unless thecomplex-search-patternspreview feature is on, andCOMBINE, which fuses several searches, needs thehybrid-searchpreview feature.MATCH (d:Doc) SEARCH d IN (FULLTEXT INDEX doc_text FOR 'graph' LIMIT 3) SCORE AS score RETURN d.title AS title, scoreThe older
db.index.vector.queryNodesanddb.index.fulltext.queryNodesprocedures still run, and are deprecated in favor ofSEARCH.- single-file store
A store kept in one
.rlfile that holds the snapshot and the WAL together; the layout for a--databasepath ending in.rl.A single-file store packs the tree a directory store would write, WAL included, into one .rl file. It is the layout to copy, attach or hand to someone: one file, and
relate clonewrites a compact copy of it.relate infoprints the layout as.rl bundle.One process owns the file at a time. A
--read-onlyopen is refused while a writer holds it, and--read-only=liveand--wal-dirare refused for it altogether. The file grows to the most space the store has needed and reuses that space; it does not shrink on its own.The same three codecs apply as for a directory store:
parquet, the default,jsonandmarkdown.relate --database ./team.rl "CREATE (:Person {name: 'Ada'})"The command writes, so it opens the file without
--read-only.- skill
The
SKILL.mdcheat sheet and reference files a coding agent reads before it uses relate;relate skill installwrites them.A skill is a folder an agent harness loads on demand: a
SKILL.mdfile whose short description tells the agent when to read it, and reference files it reads as the task needs them. The relate skill covers the CLI and its flags, output modes, exit codes, Cypher, the clients and the rules for driving relate safely.The skill ships inside the
relatebinary as the skill bundle, sorelate skill installwrites it with no network, into the skills folder of every agent it detects, or one agent with--agent.relate skill checkcompares an installed copy with the binary's bundle and exits 1 on any drift. The site also serves the files, with their SHA-256 sums in/docs/docs-artifacts.json.The word skill is reserved for this. An installable package that adds a
relate runaction is an extension.- skill bundle
The set of files that make up the relate skill:
SKILL.mdand 15 reference files, embedded in the binary and served by the site.The skill bundle is the skill as files. The binary carries a copy, which
relate skill installwrites into each agent's skills folder underrelate/, with a marker file thatrelate skill removechecks before it deletes anything. The site serves the same bundle at/skills/relate/, copied from the engine's repository at a recorded commit.relate skill listprints each target agent's install state and path, andrelate skill checkexits 1 when an installed copy differs from the binary's bundle, and 0 when every copy matches.--forcelets install or remove act on a folder without the marker; it is not valid withlistorcheck.relate skill check- snapshot
The committed graph state a checkpoint writes to disk, loaded on open before the WAL replays; not the
snapshotdurability mode or--read-onlyfreshness.A snapshot is the graph as of one point in the commit order, written by a checkpoint through the store's codec, as Parquet files by default, a JSON file, or a folder of markdown notes. Opening a durable store loads the snapshot into memory, then replays the WAL records written after it, so the snapshot and the WAL together hold every acknowledged commit.
The word has two other uses in relate, each spelled as code.
--durability-mode snapshotis the durability mode that makes only completed checkpoints durable. The default freshness of a read-only open,--read-only=snapshot, freezes the view at open.relate inforeports a snapshot's format version and its node and relationship counts, labeled with the checkpoint's log sequence number, without opening the store.- statement
One unit of Cypher that relate parses, plans and runs, such as a
MATCH … RETURNread or aCREATEwrite; a script holds several, separated by;.A statement is what a surface runs: the positional argument or
-con the CLI, each;-separated part of a script on stdin, a call toexecutein a client, aRUNover Bolt. Outside an explicit transaction, each statement commits on its own, so a write that succeeds is committed before the next statement starts.In a
;-separated list, the statements run in order and the first failure stops the list. The CLI reports how far it got:statement 2 of 2 failed; 1 completed and committed; 0 not runThe docs say statement for anything that is run, reading or writing, and query only where a read is meant in contrast to a write, or for the
relate querycommand.- store
A relate database: a directory, a single
.rlfile, or:memory:, opened with--database.A store is what
--databasenames, and every surface opens one: the CLI, the clients,relate serveand the WebAssembly build. The path picks the layout.:memory:, the default, is an in-memory store; a path ending in.rlis a single-file store; any other path is a directory store. A store is never a URL: a remote store is a--loadsource, copied in first.Whatever the layout, the whole graph is held in the memory of the process that opened the store, and each commit goes to the store's WAL before it applies. The layouts differ only in what a checkpoint writes to disk and in who else may open the store at the same time. A missing path is created on the first writable open; a
--read-onlyopen of a missing path fails and creates nothing.A store has one writer process at a time. A second writable open of the same store fails with
storage locked: <path>and exit code 5. Inside the store sit three namespaces, and user data lives inneo4j.relate --database ./team.rl --read-only --mode envelope "MATCH (n) RETURN count(n) AS n"- surface
Any front door to the relate engine: the CLI, a language client, the C ABI, the WebAssembly build, or a server that
relate servehosts.relate is one engine with several ways in, and the docs call each one a surface. The CLI links the engine into one binary. The clients run it inside a program's own process. The C ABI exposes it as a C interface. The WebAssembly build runs it in a browser page.
relate serveopens one store and hosts three network surfaces over it: Bolt, the HTTP Query API and MCP.Every surface calls the same Rust API, so a statement, a result type, an error or a notification means the same thing through each. They differ in what is around the engine: the CLI adds output modes, exit codes and agent mode;
relate serveadds authentication, origins, and a connection cap.The docs say surface for these front doors, and client for a language package.
T
- telemetry
The anonymous usage metrics the
relateCLI sends: on by default, off withDO_NOT_TRACK=1,RELATE_TELEMETRY=0orrelate telemetry off.The release CLI sends four kinds of event, about startup, query runs, commands and help, each carrying command shapes and a random install ID. Query text, store paths and parameter values are never collected: the code that builds an event has no field to hold them. The first statement run with metrics on prints one notice line on stderr, once per install.
Three switches turn it off:
DO_NOT_TRACK=1,RELATE_TELEMETRY=0, orrelate telemetry off, which persists the setting.relate telemetry statusprints the effective state and the layer that decided it.The client libraries, the C library, the WebAssembly build and the statements a served store runs send nothing.
relate servesends one command event when the server exits.relate telemetry status- TOON
Token-Oriented Object Notation: an output mode that prints the columns once, then one comma-separated line per row; the piped default in agent mode.
TOON spends fewer characters than JSON on a uniform set of rows, because the column names appear once, in a header line, instead of in every row.
--toonor--mode toonselects it, and agent mode makes it the default when stdout is piped and no output flag is given.The header is
rows[N]{col1,col2,…}:, followed by one line per row, indented by two spaces. Atimings:entry, the statement's phase timings as inline JSON, and aplanCache:entry close each statement's block; the timing numbers change from run to run. Integers, floats, booleans andnullprint bare; a string prints bare unless it would read back as something else, and then it is quoted as JSON. Nested values such as lists, maps, nodes, and paths print as compact JSON.relate --toon "UNWIND [1, 2] AS x RETURN x, x * 10 AS y"rows[2]{x,y}: 1,10 2,20 timings: {"elapsed_ms":0.457667,"execute_ms":0.26066700000000004,"lex_parse_ms":0.035250000000000004,"lower_ms":0.037167,"parse_ms":0.13137500000000002,"plan_ms":0.051458000000000004,"result_generation_ms":0.000417,"rewrite_ms":0.008583} planCache: missTOON prints no error object, so a failed statement shows only on stderr and in the exit code.
- transaction
A unit of work that commits as a whole or not at all; each statement is its own transaction unless an explicit
begin…commitgroups several.By default every statement is its own transaction: it reads the graph as of the last commit before it started, and its writes commit when it succeeds. An explicit transaction groups several statements:
beginandcommitorrollbackon a client,.begin,.commitand.rollbackin the CLI shell or a piped script,BEGINandCOMMITover Bolt, and managed transactions on the HTTP Query API.An explicit transaction keeps its writes in a private overlay, sees them itself, and appends them to the WAL once, at commit. Transactions do not nest. After a statement fails inside one, every later statement and the commit fail until it rolls back. A dropped connection or a
.quitwith a transaction open rolls it back.Commits are optimistic: two transactions that change the same node or relationship do not block each other, and the later commit fails with a retryable write-write conflict.
relate serveexpires an idle HTTP transaction after 60 seconds and caps open ones at 128 by default.
V
- vector index
An index over a property holding embeddings that answers nearest-neighbor searches exactly, by cosine or Euclidean similarity.
A vector index answers "which entities are nearest to this vector": every search scores each indexed vector against the query and keeps the top
LIMIT, so the result is exact, with ties ordered by element id. It covers one property of one label or relationship type, andWITH [...]lists extra properties that a search may filter on.OPTIONS {indexConfig: {…}}setsvector.dimensions, from 1 to 4096, andvector.similarity_function,'cosine'(the default) or'euclidean', and accepts thevector.hnsw.*keys, whichSHOW INDEXESreports but the search does not use. A stored vector of another length thanvector.dimensionsis kept without an error and never returned by a search.CREATE VECTOR INDEX doc_embedding IF NOT EXISTS FOR (d:Doc) ON (d.embedding) OPTIONS {indexConfig: {`vector.dimensions`: 3, `vector.similarity_function`: 'cosine'}}The SEARCH clause queries it, and
SHOW INDEXESlists it with the typeVECTOR.
W
- WAL
Append-only log each commit goes to before it applies; under the default
fulldurability mode it is synced first, so a crash loses no acknowledged write.The write-ahead log (WAL) is a series of segment files,
00000001.logand on, in a folder of the store:wal/by default,.cypherlite/wal/with themarkdowncodec, or wherever--wal-dirpoints for a directory store. A single-file store keeps its WAL inside the.rlfile. Each commit appends one record holding its physical changes, never Cypher text, so replay never re-runs a statement.Opening a store loads the snapshot, then replays the records written after it. A checkpoint folds the log into a new snapshot and deletes the segments it covers.
When a commit counts as safe depends on the durability mode. Under
full, the default, the record is synced to disk before the commit returns. Undereverysecondthe sync runs about once a second, and undersnapshotnever on commit.- write-write conflict
The retryable error a commit gets when another transaction committed a change to the same node or relationship after it began; exit code 5 on the CLI.
Transactions in relate commit optimistically: each writes into its own view and checks for overlap only at commit. When two overlapping transactions change the same node or relationship, the first to commit wins, and the later commit fails with
write-write conflictinstead of overwriting the first. Nothing from the failed transaction is applied, so running it again from the start is safe.On the CLI the failure is exit code 5, and the error object has
"retryable":true. The engine marks one other refusal retryable: a--concurrent-logical-workspace-limitrefusal while other statements hold the shared workspace pool. Exit code 5 also covers a store locked by another process, which is not retryable until that process exits, so a retry loop checksretryable, not only the code: a held store has thekindlockedandretryablefalse.A reader never conflicts. Readers take no locks and see the graph as of the last commit before they started.