Skip to content

docs: CLI-first install flow + accuracy sweep (memory, tooling, API, error codes)#106

Merged
indykish merged 4 commits into
mainfrom
chore/docs-cli-first-accuracy
Jun 22, 2026
Merged

docs: CLI-first install flow + accuracy sweep (memory, tooling, API, error codes)#106
indykish merged 4 commits into
mainfrom
chore/docs-cli-first-accuracy

Conversation

@indykish

@indykish indykish commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Cross-referenced every guide against the agentsfleet Command-Line Interface (CLI), the OpenAPI spec, the Zig runtime, and the M94 fleet-bundle template catalogue (Pull Request #438), then corrected the drift the review surfaced. Two themes: pivot the install story off the markdown-skill onboarding to a CLI-first template-catalogue flow, and fix factual drift.

Install flow: skills → CLI-first templates

  • quickstart: full rewrite — drop the host-agent/skill onboarding and the fabricated ~/.config/agentsfleet/samples/ path; lead with curl … | bash, then agentsfleet install --template github-pr-reviewer + manual webhook registration (native install prints the URL; it does not auto-register via gh).
  • index / cli/install / fleets/install / templates / running / webhooks: same pivot — removed host-agent, npx skills add, /agentsfleet-install-platform-ops.

Correctness fixes (docs vs source)

  • exit codes → real 1/2/3/4/5 map (auth/network/server/validation/config), was 0/1/2.
  • error codes → dropped fabricated UZ-MEM-001, UZ-TOOL-004, UZ-AGT-001/002 and the retired UZ-WH-003; use real UZ-AGT-008/011, UZ-MEM-002, UZ-EXEC-003.
  • authoring → replaced invented validator strings with real wire codes; network.allow is optional; dropped the unenforced <=200-char rule; 23 → 32 tools.
  • memory → removed the non-existent workspace category and tags field; memory_recall(query) is a search, not a key lookup; separate Postgres schema+role (not a separate DB); entries read back as JSON.
  • tools → 32 built-in tools; shell + the full file toolset documented (deny-by-default), correcting "no free shell".
  • webhooks → success body {status:"accepted",event_id}; a paused/killed fleet returns 200 {"ignored":"fleet_paused"}, not 410.
  • api → softened the unverifiable JSON Web Token (JWT) "~15 min" lifetime; real error example; noted the 409 current_state field.

Verification

mintlify validate ✅ · mintlify broken-links ✅ · gitleaks ✅

Follow-ups (separate repos / PRs)

  • agentsfleet/docs/architecture memory + platform-ops sync — companion PR.
  • agentsfleet ui/agentsfleet.dev/dist/install.sh still installs the skill; ui/packages/website still markets it — handoffs written for both.
  • Worth an eng confirm: memory_recall's tool description still advertises vector search though the deployed backend is recency-only; and shell/file tools are declarable (if "23" was an intended supported subset, the registry doesn't gate it).

🤖 Generated with Claude Code

Greptile Summary

This PR rewrites the install story from a host-agent/markdown-skill flow to a CLI-first template catalogue flow, and sweeps 15 docs files for factual drift against the CLI, OpenAPI spec, and Zig runtime. The corrections are wide-ranging and generally well-sourced.

  • Install pivot: Removes the fabricated ~/.config/agentsfleet/samples/ path, npx skills add, and /agentsfleet-install-platform-ops slash command; replaces them with agentsfleet install --template <id> and manual webhook registration.
  • Error-code accuracy sweep: Drops fabricated codes and replaces them with real wire codes; exit codes expanded from 2-entry to 5-entry map.
  • Memory/tools/webhooks corrections: Removes non-existent workspace category and tags field, corrects memory_recall semantics, updates tool count to 32, fixes webhook success body.

Confidence Score: 4/5

Safe to merge with two targeted fixes — one fabricated error code and one stale decision-tree row.

Two issues remain unresolved: UZ-BUNDLE-003 in quickstart.mdx was introduced by this PR and contradicts its stated goal of removing fabricated codes. The troubleshooting decision tree still maps every non-zero install exit to the wrong section. The rest of the accuracy sweep is well-executed.

quickstart.mdx (fabricated UZ-BUNDLE-003) and fleets/troubleshooting.mdx (stale decision-tree row).

Important Files Changed

Filename Overview
quickstart.mdx Full rewrite to CLI-first template flow; introduces unverified UZ-BUNDLE-003 at line 62.
fleets/troubleshooting.mdx Exit codes corrected to 1-5 map but decision tree still routes all non-zero install exits to §1.
memory.mdx Removed workspace category and tags field; corrected memory_recall semantics; entry format updated to JSON.
fleets/tools.mdx Updated to 32 tools; shell and file toolset documented; fabricated UZ-TOOL-004 removed.
fleets/webhooks.mdx Success body corrected; 410 replaced with 200 fleet_paused; UZ-WH-003 removed.
fleets/authoring.mdx Real wire codes substituted; network.allow made optional; unenforced char limit dropped.
fleets/credentials.mdx Exit codes expanded to 1-5 map; vault schema note added.
fleets/install.mdx Fabricated samples/ path removed; exit codes corrected; template catalogue path added.
fleets/running.mdx Fabricated samples/ path removed; exit codes updated.
api-reference/introduction.mdx JWT lifetime softened; error example replaced with real UZ-AGT-009; 409 current_state noted.
cli/agentsfleet.mdx Fabricated samples/ path removed from examples; JWT lifetime softened.
cli/install.mdx Pivoted from npx skills add to direct CLI template install.
fleets/overview.mdx Terminology fix (skills → tools); install card updated.
fleets/templates.mdx Fabricated platform-ops sample directory removed; local bundle guidance added.
index.mdx Landing page updated to CLI-first two-file description.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant U as User
    participant CLI as agentsfleet CLI
    participant API as agentsfleet API
    participant GH as GitHub
    U->>CLI: "curl | bash"
    U->>CLI: agentsfleet login
    CLI->>API: browser device flow
    API-->>CLI: JWT / workspace selected
    U->>CLI: agentsfleet templates
    CLI->>API: GET /v1/fleets/bundles
    API-->>CLI: catalogue listing
    U->>CLI: agentsfleet credential add github
    CLI->>API: POST credentials
    API-->>CLI: stored
    U->>CLI: agentsfleet install --template github-pr-reviewer
    CLI->>API: POST fleets
    API-->>CLI: fleet_id + webhook URL
    U->>GH: Add webhook manually
    GH->>API: "POST /v1/webhooks/{fleet_id}/github"
    API-->>GH: 202 accepted
    API->>API: fleet run opens
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant U as User
    participant CLI as agentsfleet CLI
    participant API as agentsfleet API
    participant GH as GitHub
    U->>CLI: "curl | bash"
    U->>CLI: agentsfleet login
    CLI->>API: browser device flow
    API-->>CLI: JWT / workspace selected
    U->>CLI: agentsfleet templates
    CLI->>API: GET /v1/fleets/bundles
    API-->>CLI: catalogue listing
    U->>CLI: agentsfleet credential add github
    CLI->>API: POST credentials
    API-->>CLI: stored
    U->>CLI: agentsfleet install --template github-pr-reviewer
    CLI->>API: POST fleets
    API-->>CLI: fleet_id + webhook URL
    U->>GH: Add webhook manually
    GH->>API: "POST /v1/webhooks/{fleet_id}/github"
    API-->>GH: 202 accepted
    API->>API: fleet run opens
Loading

Comments Outside Diff (1)

  1. quickstart.mdx, line 799 (link)

    P1 Unverified error code UZ-BUNDLE-003

    A core goal of this PR is removing fabricated error codes. However, UZ-BUNDLE-003 introduced here doesn't appear in any other changed file, and the UZ-BUNDLE-* domain isn't mentioned in the error-code registry docs or the PR's list of real codes (UZ-AGT-*, UZ-EXEC-*, UZ-MEM-*, UZ-WH-*, UZ-TOOL-*, UZ-VAULT-*). A credential-missing error at install time would more plausibly map to UZ-AGT-* or UZ-VAULT-*. If this is a real code, it should also appear in the error-codes reference page; if not, it should be removed or replaced.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: quickstart.mdx
    Line: 799
    
    Comment:
    **Unverified error code `UZ-BUNDLE-003`**
    
    A core goal of this PR is removing fabricated error codes. However, `UZ-BUNDLE-003` introduced here doesn't appear in any other changed file, and the `UZ-BUNDLE-*` domain isn't mentioned in the error-code registry docs or the PR's list of real codes (`UZ-AGT-*`, `UZ-EXEC-*`, `UZ-MEM-*`, `UZ-WH-*`, `UZ-TOOL-*`, `UZ-VAULT-*`). A credential-missing error at install time would more plausibly map to `UZ-AGT-*` or `UZ-VAULT-*`. If this is a real code, it should also appear in the error-codes reference page; if not, it should be removed or replaced.
    
    How can I resolve this? If you propose a fix, please make it concise.

Reviews (4): Last reviewed commit: "docs: link UZ-BUNDLE-003 to its error-co..." | Re-trigger Greptile

…rst templates

Cross-referenced every guide against the agentsfleet CLI, the OpenAPI spec, the
Zig runtime, and the M94 fleet-bundle template catalogue (Pull Request #438),
then corrected the drift the review surfaced.

Install flow (skills -> CLI-first templates):
- quickstart: full rewrite. Drop the markdown-skill host onboarding and the
  fabricated ~/.config/agentsfleet/samples/ path; lead with the CLI install
  one-liner, then `agentsfleet install --template github-pr-reviewer` and
  manual webhook registration (native install prints the URL, it does not
  auto-register via gh).
- index / install / cli/install / templates / running: same skills->template
  pivot; remove host-agent, `npx skills add`, `/agentsfleet-install-platform-ops`.

Correctness fixes (docs vs source):
- exit codes: real 1/2/3/4/5 map (auth/network/server/validation/config), was 0/1/2.
- error codes: drop fabricated UZ-MEM-001, UZ-TOOL-004, UZ-AGT-001/002 and the
  retired UZ-WH-003; use the real UZ-AGT-008/011, UZ-MEM-002, UZ-EXEC-003.
- authoring: replace invented validator strings (RuntimeKeysOutsideBlock,
  name_mismatch, ERR_AGENTSFLEET_INVALID_CONFIG, the "install rejected" block)
  with real wire codes; network.allow is optional; drop the unenforced <=200-char rule.
- memory: remove the non-existent `workspace` category and `tags` field;
  memory_recall is a `query` search, not a key lookup; storage is a separate
  Postgres schema+role (not a separate database); entries read back as JSON.
- tools: 32 built-in tools (was "23"); `shell` + the full file toolset are real
  and declarable (deny-by-default), correcting the "no free shell" claim.
- webhooks: success body is {status:"accepted",event_id}; a paused/killed fleet
  returns 200 {"ignored":"fleet_paused"}, not 410.
- api: soften the unverifiable JSON Web Token (JWT) "~15 min" lifetime; use a
  real error example (UZ-AGT-009); note the 409 current_state field.

Verified: `mintlify validate` and `mintlify broken-links` both pass.

Related follow-ups handed off (separate repos, not in this diff):
ui/agentsfleet.dev/dist/install.sh still installs the skill and must drop it to
match these docs; the website (ui/packages/website) still markets the skills flow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mintlify

mintlify Bot commented Jun 22, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
agentsfleet 🟢 Ready View Preview Jun 22, 2026, 3:44 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Comment thread fleets/tools.mdx Outdated
Comment thread quickstart.mdx Outdated
…nked search)

The architecture reference (docs/architecture/direction.md, runner_fleet.md
§Selection policy) is explicit that fleet memory is selected, not searched:
memory_recall returns the raw entries whose key matches a substring filter and
the model decides relevance — no scoring, no ranking, no vector search. The
recency/category pinning applies to hydration (selection), not to recall. The
prior wording ("recency-ranked search") overstated it; this matches the
canonical model so memory.mdx and the architecture docs agree.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…<fleet_id> placeholder in webhook gh api

- fleets/tools.mdx: memory_list no longer advertises a tags filter (tags was
  removed from the memory model in this PR; memory.mdx already says category/recency).
- quickstart.mdx: the gh api webhook-registration URL used a literal example
  fleet UUID; replaced with the <fleet_id> placeholder so a copy-paste does not
  silently register the hook to the wrong fleet.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…w-up)

UZ-BUNDLE-003 (424 Fleet Bundle credentials missing) is a real registered
code — error_registry.zig:127 / error_entries.zig:123 — and is already
documented in api-reference/error-codes.mdx (Fleet Bundle section). greptile
flagged it as possibly fabricated because error-codes.mdx is unchanged in this
PR and so wasn't in its diff view. Link the inline mention to the reference
page so the code is verifiable from the quickstart.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@indykish

Copy link
Copy Markdown
Contributor Author

Re: the inline greptile flag on UZ-BUNDLE-003 (quickstart.mdx) — false positive, but addressed.

UZ-BUNDLE-003 is a real, registered code, not fabricated:

  • ERR_FLEET_BUNDLE_CREDENTIALS_MISSING = "UZ-BUNDLE-003"src/agentsfleetd/errors/error_registry.zig:127
  • e("UZ-BUNDLE-003", .failed_dependency, "Fleet Bundle credentials missing", …)error_entries.zig:123 (HTTP 424)
  • Already documented in api-reference/error-codes.mdx (the Fleet Bundle section, UZ-BUNDLE-001..006).

greptile flagged it because error-codes.mdx is unchanged in this PR and so wasn't in its diff view. Fixed in ae38802 by linking the inline mention to /api-reference/error-codes#fleet-bundle so it's verifiable from the quickstart. No code removed — it's correct as written.

@indykish indykish merged commit 29b544c into main Jun 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant