See it in action on the hev-shop demo store.

Overview

Agents

These docs are queryable from the command line. The same engine behind the ⌘K search on this site ships as a CLI, so your coding agent can search, read, and cite the Layer docs directly — no scraping, no MCP server, no API key. The layer CLI also lets agents operate environments, indexes, pipelines, UDFs, and Function runs.

The skill bodies below are plain SKILL.md files. Use your agent harness’ native skill directory when it has one, or paste the same Markdown into AGENTS.md or the harness equivalent.

1. Install the CLIs

go install github.com/hev/ask/cmd/ask@latest

The ask binary is self-contained; any agent harness that can run a shell command can use it.

From a Layer checkout, build the layer CLI when the agent should operate Layer environments instead of only searching docs:

go build -o layer ./apps/layer-cli

2. Add the docs skill

Set AGENT_SKILL_HOME to your harness’s skill directory, such as ~/.codex/skills for Codex or ~/.claude/skills for Claude Code.

AGENT_SKILL_HOME="${AGENT_SKILL_HOME:-${CODEX_HOME:-$HOME/.codex}/skills}"
mkdir -p "$AGENT_SKILL_HOME/hevlayer-docs"
cat > "$AGENT_SKILL_HOME/hevlayer-docs/SKILL.md" <<'EOF'
---
name: hevlayer-docs
description: >-
  Query the hev layer docs. Use when the user asks about Layer — the
  Turbopuffer gateway, stable reads, the stable watermark,
  the document cache, warm jobs, scans (filter, full-text, and radius),
  snapshots, pipelines, UDFs, the Index/InfraRules/Pipeline/Function
  CRDs, compute pools, install via Terraform or Helm, failure modes,
  or the dashboard.
---

# hev layer docs

Answer Layer questions from the docs, not from memory. Every verb is a
keyless read:

    ask --endpoint https://hevlayer.com/api/ask search "<question>"
    ask --endpoint https://hevlayer.com/api/ask section get "<id>"
    ask --endpoint https://hevlayer.com/api/ask overview
    ask --endpoint https://hevlayer.com/api/ask glossary get "<term>"

Start with `search`; fetch sections for detail; use `overview` when you
need the full map. Section ids look like
`api/query#stable-reads`. Cite sections in your answer as
https://hevlayer.com plus the returned `url` field.

If `ask` is missing, install it:
`go install github.com/hev/ask/cmd/ask@latest`
EOF

3. Add the layer CLI skill

Use this skill when an agent should inspect or operate Layer through the layer CLI. The skill keeps read-only inspection, docs lookup, and mutating operations separate.

AGENT_SKILL_HOME="${AGENT_SKILL_HOME:-${CODEX_HOME:-$HOME/.codex}/skills}"
mkdir -p "$AGENT_SKILL_HOME/hevlayer-layer-cli"
cat > "$AGENT_SKILL_HOME/hevlayer-layer-cli/SKILL.md" <<'EOF'
---
name: hevlayer-layer-cli
description: >-
  Use the hevlayer layer CLI. Use when the user asks an agent to inspect
  Layer environments, query docs through layer ask, list or get indexes,
  pipelines, or UDFs, open the operations TUI, delete indexes, or run
  Function manifests with the layer CLI.
---

# hevlayer layer CLI

Use `layer` to operate hevlayer from the terminal. In a Layer
checkout, prefer a repo-local binary:

    go build -o layer ./apps/layer-cli
    ./layer --help

Use `./layer ...` for a repo-local binary and `layer ...` for one on `PATH`.
Prefer `-o json` for agent parsing and do not print API keys.

For docs questions, start with `layer ask` against the committed digest:

    layer ask grep "<query>"
    layer ask cat "<section-id>"
    layer ask tree
    layer ask glossary get "<term>"

For read-only operational inspection, prefer:

    layer -o json env ls
    layer -o json env show [NAME]
    layer -o json index list
    layer -o json index get NAME
    layer -o json pipeline list
    layer -o json pipeline get ID
    layer -o json udf list
    layer -o json udf get UDF_ID

Only `layer run` needs Kubernetes access by default. It applies a Function CR,
registers the UDF spec with the gateway, triggers discovery, and optionally
watches until the queue drains.

Confirm the target environment, gateway URL, kube context, and Kubernetes
namespace before mutating state. Mutating commands include `layer env add`,
`layer env use`, `layer env rm`, `layer index delete`, `layer run`, and
`layer run --rm`.

Resolve configuration in this order: explicit flags, `LAYER_*` or
`HEVLAYER_*` environment variables, `--env` or `LAYER_ENV`, the active
`~/.hevlayer/config.toml` environment, then the built-in base URL.
EOF

4. Ask

ask --endpoint https://hevlayer.com/api/ask search "cache is down"
{
  "results": [
    {
      "title": "Concepts",
      "heading": "Document cache",
      "url": "/docs/concepts#document-cache",
      "group": "Overview",
      "snippet": "The document cache does two jobs: pull-through document reads..."
    }
  ]
}

From here your agent typically runs section get on the winning id and answers with the citation.

The verbs

VerbReturns
overviewOrientation context plus the full section map with stable ids
search "<query>"Ranked sections with snippets and deep links
section get "<id>"One section: summary, exact identifiers, source URL
glossary get "<term>"A product term resolved through its aliases (watermark → stable watermark)

Why answers stay grounded

Search runs over a committed, reviewable digest of these docs — the same corpus, heading by heading, that renders on this site. Every anchor in it is verified against the rendered pages in CI, so a cited deep link like /docs/api/query#stable-reads always resolves. When the docs change, the digest is rebuilt and recommitted with them.

The docs are also available as plain text for direct ingestion: /llms.txt (index) and /llms-full.txt (full corpus). The CLI is the better path for agents that can run commands — it ranks, resolves aliases, and costs a fraction of the tokens.

esc