Skip to content

Rewrite the agent quickstart as a checkpointed runbook - #180

Draft
anderdc wants to merge 1 commit into
testfrom
docs/agent-runbook-rewrite
Draft

Rewrite the agent quickstart as a checkpointed runbook#180
anderdc wants to merge 1 commit into
testfrom
docs/agent-runbook-rewrite

Conversation

@anderdc

@anderdc anderdc commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Why

Mango one-prompted arbitrage bots off the /agents copy-paste markdown several times and they failed. The old text was a protocol overview with no checkpoints; an agent couldn't tell whether a step worked, and the three things that actually sink a bot were never stated.

What

AgentMarkdown.ts rewritten from scratch (→ public/llms.txt regenerated by the build). Structure is now install → verify → quote → execute → track → bot loop → errors, each step with the command and the expected output.

Grounded in the testnet/mainnet swap-testing logs, the CLI source (swap.py, post_tx.py, quote.py), and live mainnet reads on 2026-08-27.

Key content that was missing before:

  • Cost stack up front — 0.02 SOL reservation fee per bid (win or lose), 1% inside the quote; a 0.1 SOL swap pays 20% in fees.
  • --send is OFF without a TTY — a scripted alw swap now reserves, prints, exits, and the TTL burns. Agents must pass --send --yes.
  • rate / counterRate are both "spoke per hub" — a same-miner round trip is 0.99² × rate / counterRate ≈ −4% (what Mango saw). The only arb is miner-vs-external-market; formula included.
  • A table of every terminal stdout line swap now can print → meaning → action, quoted from the CLI.
  • A working Python bot loop (uses swap quote --json exit code, --miner, --send --yes, and the Deposit sentpost-tx retry).
  • §4.4 Coming: routed reservations via Allways Access — credits + planned alw_sk_ API keys, marked not-yet-public. This is why the PR is a draft: land it once we're ready to point people at the validator product.

Corrections to the old text: /swaps filters (status, fromChain, …) that das doesn't implement; the untested pipx install git+… path (replaced with clone + venv, verified in a clean env).

Found along the way (not fixed here)

  • alw status --json echoes the Solana RPC URL including the API key.
  • swap now --send with a TAO source and a missing coldkey file still tracebacks (KeyFileError) after reserving.

Checks

tsc -b, npm run lint, npm run build pass; generated llms.txt diffed against the source — identical apart from the registry-derived asset/hub/pair substitutions.

https://claude.ai/code/session_01Qh3CYdsFgdJVHiyn4RZzyD

Teammates one-prompting bots off the /agents markdown kept failing. The
old text was a protocol overview; this one is a runbook: every step names
the command and the stdout that proves it worked, every failure line the
CLI prints maps to an action, and the cost stack and rate semantics that
sink arbitrage bots (0.02 SOL per bid, rate vs counterRate both in the
hub unit, --send off without a TTY) are stated up front.

Also fixes claims the old text made that were not true: /swaps filters
das does not implement, and an untested pipx install path (replaced with
the clone + venv path, verified in a clean env).

Adds a "coming" section on routed reservations via the Ventura Labs
validator (Allways Access credits + planned API keys) — draft until that
product is public.

Claude-Session: https://claude.ai/code/session_01Qh3CYdsFgdJVHiyn4RZzyD
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