Docs
View as markdown

relate agent-context

The relate agent-context command that prints a compact text briefing of the installed binary, its commands, query-run flags and exit codes, quoted in full.

cliagents

relate agent-context prints a compact plain-text briefing of the binary that runs it: its version, one line per command it contains, the names of its query-run flags, and its exit code table. With a command word, it prints that command's usage line, flags, examples, and the exit code table instead. The briefing is built from the same command table as --help, so it describes the installed binary and no other: the version it prints is the version that answers. It reads no store, needs no network, and takes no flags beyond --help.

Synopsis

relate agent-context [COMMAND]
ArgumentMeaning
COMMANDOptional. One command word: query, clone, info, pull, push, skill, upgrade, telemetry, run, serve, agent-context or extension. update names upgrade, its alias
RunPrints
relate agent-contextThe version line, the command index, the query-run flag names, the exit code table
relate agent-context <command><command> — <summary>, the usage line, a Flags: list when the command has its own flags, an Examples: list, the exit code table
relate agent-context --helpThe command's help page, exit code 0

The output is plain text in every run, with 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. Read more in the glossary on or off. RELATE_HELP_EXAMPLES=0, which drops the examples from every --help page, leaves the briefing's Examples: list in place.

The briefing

These examples run in a new, empty directory. The whole briefing, 26 lines:

relate agent-context
relate v0.1.2 — agent context

Commands (detail: relate agent-context <COMMAND>):
  query          Run a statement session (oneshot, stdin, or shell)
  clone          Copy a database into a new store and exit
  info           Print store metadata for a database without opening it
  pull           Copy a Neo4j/Aura subgraph into a database
  push           Copy a database subgraph into Neo4j/Aura
  skill          Install, inspect, or remove the embedded agent skill bundle
  upgrade        Update the relate binary (alias: update)
  telemetry      Manage anonymous usage metrics (on, off, status)
  run            Run an installed extension action into a store the host owns
  serve          Host the HTTP Query API and MCP surfaces on a database
  agent-context  Print the compact agent briefing (commands, flags, exit codes)
  extension      Scaffold, install, check, list, or remove command extensions

Query-run flags (relate [OPTIONS] [QUERY]):
  --help --version --database --json --csv --markdown --jsonl --toon --noheader --mode --format --pretty --param --fetch-params --snapshot-format --markdown-body-properties --wal-dir --checkpoint-interval-secs --durability-mode --logical-graph-size-limit --expression-memory-limit --concurrent-logical-workspace-limit --max-traversal-depth --safe --no-safe --agent-mode --no-agent-mode --max-rows --width --timeout --load --read-only --load-csv-dir --namespace --command

Exit codes:
  0  success: success, including an empty result
  1  fatal_error: runtime failure: store open or I/O error, capacity limit, query execution failure, internal error
  2  usage_error: unknown flag, bad or missing value, extra positional
  5  conflict: write-write conflict, or the store is locked by another opener
  6  validation_error: the statement is rejected: syntax, semantic or type error
  7  timeout: a statement exceeded --timeout
SectionHolds
Version linerelate v<version> — agent context: the version of the binary that printed it
CommandsEach command compiled into this binary, with the one-line summary relate --help prints. A build without a command leaves its line out
Query-run flagsThe names of the flags that the path-first form and relate query accept; no arguments or defaults
Exit codesEach exit code, its code name as the error object carries it, and what it means

The flag list names flags only. relate agent-context query repeats them with the usage line, the relate query page describes the session they apply to, and the flags page gives each one's argument, default, and environment variable.

The briefing needs no network and names the release that answers; the agent quickstart and Drive relate from an agent use it, and the skill bundle lists it among its commands.

One command

A command word narrows the briefing to that command:

relate agent-context info
info — Print store metadata for a database without opening it
Usage: relate info --database PATH [--json]
Flags:
  --database
  --json
Examples:
  # Describe a database without opening it, as JSON
  relate info --database ./mydata --json
Exit codes:
  0  success: success, including an empty result
  1  fatal_error: runtime failure: store open or I/O error, capacity limit, query execution failure, internal error
  2  usage_error: unknown flag, bad or missing value, extra positional
  5  conflict: write-write conflict, or the store is locked by another opener
  6  validation_error: the statement is rejected: syntax, semantic or type error
  7  timeout: a statement exceeded --timeout

Errors and exit codes

Exit codeWhen
0The briefing printed
2An unknown command word, or more than one word

An unknown word, or anything that is not a command word, exits 2:

relate agent-context --json
echo "exit=$?"
Error: agent-context: unknown command '--json' (expected one of: query, clone, info, pull, push, skill, upgrade, telemetry, run, serve, agent-context, extension)
Usage: relate agent-context [COMMAND]
Run 'relate agent-context --help' for more information.
exit=2

A second word exits 2 with Error: unexpected argument to agent-context: <word> and the same two lines.

Examples

A command with no flags of its own, such as telemetry, prints no Flags: list:

relate agent-context telemetry
telemetry — Manage anonymous usage metrics (on, off, status)
Usage: relate telemetry on|off|status
Examples:
  # See whether anonymous usage metrics are on
  relate telemetry status
Exit codes:
  0  success: success, including an empty result
  1  fatal_error: runtime failure: store open or I/O error, capacity limit, query execution failure, internal error
  2  usage_error: unknown flag, bad or missing value, extra positional
  5  conflict: write-write conflict, or the store is locked by another opener
  6  validation_error: the statement is rejected: syntax, semantic or type error
  7  timeout: a statement exceeded --timeout

See also