preste docs

preste CLI Reference

preste is the sovereign agent CLI. Run preste alone to enter the interactive REPL, or use subcommands for non-interactive agent execution, skills management, and attestation operations.

Installation

npm install -g preste
# or
pnpm add -g preste

Configuration

preste setup

preste setup

Interactive wizard. Prompts for LLM provider credentials and writes them to ~/.preste/config.yaml. Safe to re-run ; patches existing config.

Config file: ~/.preste/config.yaml

# LiteLLM (sovereign default)
provider: litellm
litellm_url: http://localhost:4000
litellm_api_key: sk-...  # optional
model: qwen3-8b

# Optional: Brain integration (stage-3 long-term memory)
brain:
  api_key: bk-...
  url: https://brain.api.vauban.tech/mcp

# Optional: defaults
defaults:
  strategy: minimal
  streaming: false
  max_steps: 10

Interactive chat

preste [type]

preste [type] [options]

Start an interactive multi-turn REPL. type is an optional agent persona (default: ASSISTANT). Runs a full tool-wired AgentLoop on each turn.

--strategy <name> Agent strategy: minimal | ooda | react | plan | one-shot. Default: minimal. --model <name> Override the configured model for this session. --resume [file] Resume a saved session. Omit file path to auto-resume the last saved session (~/.preste/.last-session). --rtk Pipe run_bash outputs through RTK for token savings. Requires rtk CLI installed. --stream Stream tokens to stdout as they arrive (TTY mode). Spinner is disabled while streaming. --plan <task> Seed REPL with /plan <task> as the first turn (plan-then-execute with HITL approval). --max-steps <n> Max OODA steps per turn. Default: 10. --no-skills Disable skill index injection in system prompt. --no-trajectory Disable trajectory recording to ~/.preste/trajectories/. --no-attest Skip Ed25519 session attestation certificate on exit.

Slash commands

Inside the REPL, type a slash command at the prompt:

Command Description
/help List all slash commands with descriptions.
/exit Quit the session. Auto-saves to ~/.preste/sessions/<runId>.json.
/save [file] Export full transcript. Omit path for timestamped file.
/compact Trigger context compaction now (summarize older turns, keep last 6 verbatim).
/history Show message history summary (turn count, estimated tokens).
/clear Reset message history. Retains persona and skill index.
/strategy [name] Show active strategy or switch: minimal | ooda | react | plan | one-shot.
/model [name] Show active model or switch. Omit name for interactive pick.
/rtk Toggle RTK piping for run_bash outputs on/off.
/stream Toggle streaming mode on/off for subsequent turns.
/settings Show current session config (model, strategy, provider, Brain status).
/settings brain on|off Enable or disable Brain integration for this session.
/plan <task> Run plan-then-execute: generates a step-by-step plan with HITL approval before execution.
/expand Show the last reasoning block (<think>...</think>) from the previous turn.

Strategies

  • minimal ; lightweight OODA loop, single tool pass per turn. Best for quick tasks.
  • ooda ; full Observe-Orient-Decide-Act loop. Default for complex tasks.
  • react ; Thought → Action → Observe pattern. Multi-message history passed as LLMMessage[] array.
  • plan ; generates a plan with HITL approval, then executes step by step. Multi-message history passed as LLMMessage[] array.
  • one-shot ; single LLM call, no tools, no history. Maximum speed.

Agent commands

preste agent run

preste agent run [type] --task <description> [options]

Run a non-interactive agent task. Default: standalone OODA loop with structured function-calling tools. Provider priority: LITELLM_URLGROQ_API_KEYOPENAI_API_KEY.

--task <desc> Task description (required). --max-steps <n> Max loop steps (default: 20 for ooda, 10 for react). --pattern <name> Loop: ooda (default) | react | plan. --one-shot Single LLM call, no tools, no loop. --stream Stream final answer token-by-token. --recall Query local episodic memory and inject top-3 matches into context. --remember Store task + answer in local episodic memory after a successful run. --no-attest Skip Ed25519 certificate generation in ~/.preste/attestations/. --rtk Pipe run_bash outputs through RTK. --json JSON output.

preste agent models

preste agent models [--json]

List models available on the configured LiteLLM instance. Reads provider from ~/.preste/config.yaml or LITELLM_URL env var.

Skills

preste skills list

preste skills list [--remote] [--tier <tier>] [--json]

List locally installed skills (default) or the server registry (--remote). Local scan: ~/.preste/skills/ and ./.preste/skills/. Remote: fetches from CC server registry (no auth required).

--remote List skills available on the server registry. --tier <tier> Filter: official | verified | unverified (local only).

preste skills run

preste skills run <name> --task <description> [options]

Execute a locally installed SKILL.md skill. Calls the LLM directly (standalone, no CC server needed). Use --server to route through CC server.

preste skills install

preste skills install <name> [--force] [--out-dir <dir>]

Pull a SKILL.md from the CC server registry and install it into ~/.preste/skills/<name>/. Server URL: CC_SERVICE_URL (default: https://command.api.vauban.tech). No auth required.

Attestation

preste attest verify

preste attest verify <cert.json> [--check-anchor] [--json]

Verify a Run Certificate offline using Ed25519 + Poseidon + JCS canonicalization. Reference implementation of draft-vauban-skill-attestation-00 §5. No Vauban infrastructure required.

--check-anchor Also fetch L3 Starknet anchor state from the CC server (requires CC_SERVICE_URL). --expected-kid <kid> Pin verification to a specific key id.

preste attest list

preste attest list [--json]

List attestation certificates stored in ~/.preste/attestations/. Each session that runs with attestation enabled (default) writes a <runId>.json certificate on exit.

preste attest anchor

preste attest anchor <runId-or-path> [--network <name>] [--confirm]

Anchor a Run Certificate hash on Starknet. Default: dry-run mode (computes Poseidon felt252, no transaction). Pass --network sepolia|mainnet|katana to submit on-chain.

--network <name> sepolia | mainnet | katana. Omit for dry-run. --confirm Required for mainnet submission. --key <envVar> Env var name holding the private key. Default: STARKNET_PRIVATE_KEY.

MCP server

preste serve

preste serve [--mcp] [--http] [--port <n>] [--host <addr>]

Run preste as an MCP server. Default: stdio transport for Claude Desktop or Claude Code. Use --http for Streamable HTTP transport (default port 3110, loopback only unless --api-key is set).

Claude Code snippet. Add to ~/.claude.json or your project settings.json:

// .claude/settings.json
{
  "mcpServers": {
    "preste": {
      "command": "preste",
      "args": ["serve", "--mcp"]
    }
  }
}

Memory

preste memory recall

preste memory recall <query> [--top-k <n>] [--tags <list>] [--json]

Search local episodic memory (~/.preste/memory/episodic.jsonl). Scoring: token overlap + recency decay + importance weight.

preste memory store

preste memory store --content <text> [--type <t>] [--tags <list>] [--importance <n>]

Append an entry to local episodic memory. Types: fact | decision | error | success | preference | correction. Importance: 0.0–1.0.

preste settings

preste settings

Show current configuration: provider, model, strategy defaults, Brain integration status, and attestation key info. Equivalent to the /settings slash command inside the REPL.