Liria

Docs · Quickstart

Clone to a
verified replay.

Five minutes to a MATCH. This page mirrors the repository’s QUICKSTART.md — every command and expected line is taken from there. The IR, replay, trust, and daemon paths below are exercised end-to-end by the repo’s gate.

Time ~5 min Needs Rust toolchain + a terminal Result one byte-identical replay
01

Build the binaries

Add the WASM target once, then build the CLI and the daemon. First run downloads dependencies.

# enter the repo
git clone https://github.com/mogos/liria
cd liria

# one-time setup
rustup target add wasm32-wasip1
cargo build -p liria-cli -p liriad

Both binaries land in target/debug. If you prefer them on PATH: cargo install --path crates/liria-cli --locked (and the same for liriad).

02

Validate and hash the example IR

The fastest proof the toolchain is healthy: validate the bundled IR and fingerprint it with BLAKE3. Run from the repo root so the example paths resolve.

liria-cli ir validate examples/ir/minimal-intent.json
liria-cli ir validate examples/ir/minimal-plan.json
liria-cli ir hash     examples/ir/minimal-intent.json

Expected output:

✓ Intent is valid (schema: liria.ir.v0.1)
✓ Plan is valid (schema: liria.ir.v0.1)
✓ BLAKE3 hash: <hex>
03

Record a turn, then verify it replays

Point a data dir somewhere writable, record a turn, replay it, and prove the replay hashes byte-identical to the original.

export LIRIAD_DATA_DIR=/tmp/liria-demo-data
mkdir -p "$LIRIAD_DATA_DIR"

TURN_ID=$(liria-cli replay record --agent-id onboarding-demo | awk '/Turn ID:/ {print $3}')

liria-cli replay show   --turn-id "$TURN_ID"
liria-cli replay replay --turn-id "$TURN_ID"
liria-cli replay verify --original "$TURN_ID" --replay "${TURN_ID}-replay"
liria-cli replay diff   --original "$TURN_ID" --replay "${TURN_ID}-replay"

Expected output:

Replaying turn: <id>
Replay completed deterministically
Replay verified (hash: <hex>)
Replay diff for <id> vs <id>: MATCH
04

Score and revoke trust

Trust is a 0.00–1.00 score derived from receipts and policy outcomes. A revocation forces it to 0.00 immediately and persists, and the daemon honors it without a restart.

liria-cli trust score  demo-agent
liria-cli trust revoke --entity-type agent --id demo-agent
liria-cli trust score  demo-agent

Expected output:

Trust score for demo-agent: 0.50
Revoked agent 'demo-agent'
Revocation persisted at /tmp/liria-demo-data/revocations.json
Trust score for demo-agent: 0.00
Entity is currently revoked (score forced to 0.00)
05

Run the daemon and check IPC

liriad is the socket server; liria-cli daemon is the read-only client. Ping and Health are always token-exempt for liveness; protected commands require the token.

# terminal A
export LIRIAD_IPC_TOKEN=liria-demo-token
liriad --socket /tmp/liria.sock

# terminal B
liria-cli daemon ping   --socket /tmp/liria.sock
liria-cli daemon health --socket /tmp/liria.sock
liria-cli daemon status --socket /tmp/liria.sock --token liria-demo-token

Stuck on a layer? liria-cli doctor --socket /tmp/liria.sock gives a structured check of daemon reachability, replay directory state, and token consistency.

Known issues · v0.1.0

Where the edges are.

Two rough edges are documented so you don’t debug the wrong layer. Both are tracked; neither touches the IR, replay, trust, or daemon surface you just used.

scaffold

liria-cli new emits an agent.liria the current parser rejects (it contains a version field and an Int type the parser does not accept). Overwrite the scaffold with one of examples/agents/0[1-5]-*.liria for a parseable starter.

build

liria-cli build invokes cargo with an invalid --emit=sourcemap flag, so the build step fails after IR parsing succeeds. Use cargo build -p liria-cli -p liriad to confirm toolchain health for now. It still exits non-zero on failure.

Next

You have a MATCH. Now see what produced it and how it is governed.