Skip to content

Create Stellar CLI for Agents docs section ahead of developer preview - #2869

Open
oceans404 wants to merge 6 commits into
mainfrom
agent-cli-docs
Open

oceans404 wants to merge 6 commits into
mainfrom
agent-cli-docs

Conversation

@oceans404

@oceans404 oceans404 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Adds a "Stellar CLI for Agents" section at docs/tools/cli/agent-cli/ covering how to use the Stellar CLI and CLI Skills as an agent wallet. It includes a quickstart, the skills overview, seven cookbook guides (send tokens, balances and metadata, delegated spending, message signing, build and submit, x402 payments, USDT0 on mainnet), and four reference pages (architecture, authority model, output and errors, troubleshooting).

The section sits in the Tools sidebar under Stellar CLI, directly below the Stellar CLI Manual, and in the Tools navbar dropdown directly below Stellar CLI. Subsections are collapsed by default.

Copilot AI lite review requested due to automatic review settings September 22, 2026 22:51
@github-actions github-actions Bot added the preview Preview builds for PRs by SDF employees. label Sep 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@oceans404
oceans404 requested a review from fnando September 22, 2026 22:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved issues affect executable quickstarts, transaction workflows, factual guidance, and sidebar ordering.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 10 Medium severity · 2 Low severity

Open (13)
What changed in this PR

Adds a developer-preview Stellar CLI for Agents documentation section covering agent-wallet workflows and integrating it into Tools navigation.

Changes:

  • Adds quickstart, skills, seven cookbook guides, and four reference pages.
  • Adds sidebar/navbar integration and 14 routes.
  • Updates Stellar CLI manual sidebar metadata.
File Reviewed change
routes.txt Adds agent CLI documentation routes.
docs/​tools/​cli/​stellar-cli.mdx Adds sidebar ordering metadata.
docs/​tools/​cli/​agent-cli/​skills.mdx Documents CLI skills.
docs/​tools/​cli/​agent-cli/​reference/​troubleshooting.mdx Adds troubleshooting guidance.
docs/​tools/​cli/​agent-cli/​reference/​output-and-errors.mdx Documents outputs and errors.
docs/​tools/​cli/​agent-cli/​reference/​authority-model.mdx Documents authority and security controls.
docs/​tools/​cli/​agent-cli/​reference/​architecture.mdx Documents CLI architecture.
docs/​tools/​cli/​agent-cli/​reference/​_category_.json Configures reference navigation.
docs/​tools/​cli/​agent-cli/​README.mdx Adds the section overview.
docs/​tools/​cli/​agent-cli/​quickstart.mdx Adds installation and transfer workflows.
docs/​tools/​cli/​agent-cli/​guides/​usdt0-on-mainnet.mdx Documents USDT0 mainnet usage.
docs/​tools/​cli/​agent-cli/​guides/​sign-messages.mdx Documents message signing.
docs/​tools/​cli/​agent-cli/​guides/​send-tokens.mdx Documents token transfers.
docs/​tools/​cli/​agent-cli/​guides/​pay-for-apis-x402.mdx Documents x402 payments.
docs/​tools/​cli/​agent-cli/​guides/​delegate-spending.mdx Documents delegated spending.
docs/​tools/​cli/​agent-cli/​guides/​check-balances-and-metadata.mdx Documents balances and metadata.
docs/​tools/​cli/​agent-cli/​guides/​build-and-submit-transactions.mdx Documents transaction handoffs.
docs/​tools/​cli/​agent-cli/​guides/​_category_.json Configures guide navigation.
docs/​tools/​cli/​agent-cli/​_category_.json Configures the section navigation.
config/​theme/​navbar.ts Adds the agent CLI navbar entry.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/tools/cli/agent-cli/quickstart.mdx Outdated
Comment thread docs/tools/cli/agent-cli/README.mdx Outdated
Comment thread docs/tools/cli/agent-cli/README.mdx Outdated
Comment thread docs/tools/cli/agent-cli/guides/build-and-submit-transactions.mdx Outdated
Comment thread docs/tools/cli/agent-cli/guides/delegate-spending.mdx Outdated
Comment thread docs/tools/cli/agent-cli/quickstart.mdx Outdated
Comment thread docs/tools/cli/agent-cli/reference/architecture.mdx Outdated
Comment thread docs/tools/cli/stellar-cli.mdx Outdated
Comment thread docs/tools/cli/agent-cli/guides/usdt0-on-mainnet.mdx Outdated
Comment thread docs/tools/cli/agent-cli/reference/troubleshooting.mdx Outdated
Copilot AI review requested due to automatic review settings September 22, 2026 23:44
@github-actions github-actions Bot removed the preview Preview builds for PRs by SDF employees. label Sep 22, 2026
@oceans404

Copy link
Copy Markdown
Contributor Author

@copilot review

@github-actions github-actions Bot added the preview Preview builds for PRs by SDF employees. label Sep 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The review identifies unresolved documentation inaccuracies and copy-paste failures that require correction before approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Low severity

Open (1)
Resolved since last review (13)
Previously missed (6)

In code that hasn't changed since last review

Low severity Limit simulation claims to contract and SAC reads

docs/​tools/​cli/​agent-cli/​reference/​architecture.mdx:67

This description is too broad: direct RPC reads such as network health, ledger latest, and tx fetch do not simulate a transaction; simulation applies to contract/SAC-style reads. Scope the statement so agents do not infer that every read has simulation semantics.

Low severity Not all state-modifying commands use the five-stage pipeline

docs/​tools/​cli/​agent-cli/​reference/​architecture.mdx:90

Not every state-modifying command goes through these five stages: a classic tx new payment/tx send path does not simulate or authorize Soroban entries. This overstates the write path and conflicts with the later guidance that a custom Soroban pipeline must call tx simulate explicitly.

Low severity Resending the same envelope is not a double spend

docs/​tools/​cli/​agent-cli/​reference/​output-and-errors.mdx:235

The same overstatement appears here: 2>&1 can hide a successful submit, but retrying the exact same signed envelope is not a double spend; only rebuilding a new envelope can repeat the operation. State that distinction so agents do not treat every retry path as equivalent.

Low severity Distinguish rebuilding transactions from resending envelopes

docs/​tools/​cli/​agent-cli/​reference/​troubleshooting.mdx:56

confirmed double-spend is too strong and conflates rebuilding with resending. A parse failure followed by rebuilding the command can submit a second transaction, but resending the same signed envelope is sequence-protected and will not execute it twice.

Low severity Soroban transactions require resource fees beyond the base fee

docs/​tools/​cli/​agent-cli/​reference/​troubleshooting.mdx:80

The base fee is not the whole requirement here. Soroban-backed commands such as token transfer also need a resource fee, so a zero-XLM account can produce this error even when it could cover the 100-stroop classic base fee; describe the required transaction fees instead of only the base fee.

Low severity Restrict simulation claims to Soroban transactions

docs/​tools/​cli/​agent-cli/​reference/​troubleshooting.mdx:304

every tx new command run simulation is incorrect for classic operations such as payment and change-trust; those are built, signed, and submitted without Soroban simulation. Restrict this sentence to Soroban flows, otherwise an agent will look for a simulation result the CLI never produces.

stellar tx fetch result --hash "$TX" --network testnet
```

**Never retry a timed-out write blindly.** On `transaction submission timeout` the RPC accepted the transaction but never reported a final status, so the outcome is unknown. It can still land later. The command exits 1 and `$TX` can be empty, exactly like a real failure. Take the hash from the stderr line `ℹ️ Signing transaction: <HASH>` (text mode only, since JSON mode writes nothing to stderr) and check `stellar tx fetch result --hash <HASH>`. If it is still not found, read both balances and the source account's sequence number before you decide. Only rebuild the payment once you have confirmed the first one did not land.

Copilot AI commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

@copilot review

Reviewed the latest branch state and CI runs for this PR. I don’t see any new actionable issues to change in this branch right now.

@ElliotFriend

Copy link
Copy Markdown
Contributor

@oceans404 now that CLI version 28.1.0 has been released, and the build-from-main process is no longer necessary, can we get this PR updated to just use the "regular" install instructions? also, if there are any other v28-related updates/changes, we should include them, too.

@oceans404

Copy link
Copy Markdown
Contributor Author

@oceans404 now that CLI version 28.1.0 has been released, and the build-from-main process is no longer necessary, can we get this PR updated to just use the "regular" install instructions? also, if there are any other v28-related updates/changes, we should include them, too.

yep! I was waiting for the CLI release to update this PR - doing that now!

Copilot AI review requested due to automatic review settings September 28, 2026 21:08
@github-actions github-actions Bot removed the preview Preview builds for PRs by SDF employees. label Sep 28, 2026
@github-actions github-actions Bot added the preview Preview builds for PRs by SDF employees. label Sep 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@oceans404

Copy link
Copy Markdown
Contributor Author

@ElliotFriend this PR is updated now based on the release and now uses the "regular" cli install instructions

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@ElliotFriend ElliotFriend left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I left one nitpick-y markdown link syntax thing, and some notes about the stellar token transfer-from command that's available in the latest CLI. the transfer-from is probably the only thing i'd block on in this review, though.

thanks for putting this together!

Comment thread docs/tools/cli/agent-cli/guides/delegate-spending.mdx Outdated
Comment thread docs/tools/cli/agent-cli/quickstart.mdx Outdated
Comment thread docs/tools/cli/agent-cli/guides/usdt0-on-mainnet.mdx Outdated
Comment thread docs/tools/cli/agent-cli/guides/pay-for-apis-x402.mdx Outdated
Comment thread docs/tools/cli/agent-cli/guides/usdt0-on-mainnet.mdx
Copilot AI review requested due to automatic review settings September 29, 2026 16:10
@github-actions github-actions Bot removed the preview Preview builds for PRs by SDF employees. label Sep 29, 2026
@github-actions github-actions Bot added the preview Preview builds for PRs by SDF employees. label Sep 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Several documentation inaccuracies and non-runnable examples remain unresolved.

Review effort: Lite
Findings: 2 Medium severity · 1 Low severity

Open (3)

Comment thread docs/tools/cli/agent-cli/guides/pay-for-apis-x402.mdx Outdated
Comment thread docs/tools/cli/agent-cli/quickstart.mdx
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 29, 2026 18:44
@github-actions github-actions Bot removed the preview Preview builds for PRs by SDF employees. label Sep 29, 2026
@github-actions github-actions Bot added the preview Preview builds for PRs by SDF employees. label Sep 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Unresolved documentation correctness issues affect transaction decoding, retries, fees, timeouts, and x402 usage.

Review effort: Lite
Findings: 1 Medium severity · 1 Low severity

Open (2)
Resolved since last review (1)
Previously missed (2)

In code that hasn't changed since last review

Medium severity Distinguish safe resubmission from rebuilding transactions

docs/​tools/​cli/​agent-cli/​reference/​troubleshooting.mdx:56

Resubmitting the same signed envelope cannot double-spend: its sequence number makes a duplicate idempotent. The dangerous retry is rebuilding a new envelope after treating the parse error as a submit failure, so this sentence should distinguish those cases rather than call every retry a confirmed double-spend.

Medium severity Account for Soroban resource fees in transfer guidance

docs/​tools/​cli/​agent-cli/​reference/​troubleshooting.mdx:80

This diagnosis uses stellar token transfer as the remediation, but that command is a Soroban call and needs a variable resource fee in addition to the 100-stroop inclusion fee. Calling 100 stroops the transaction fee understates the XLM headroom required; 100 is only the classic-payment minimum.

@ElliotFriend ElliotFriend left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for turning the 28.1.0 updates around so quickly, @oceans404! I re-ran the transfer-from guidance on testnet and it all checks out. The guides and quickstart are really strong, especially the key-exposure warning in Step 3 and the "Choose a pattern" table in Delegate spending.

I pushed one small commit on top of yours: the Node minimum for the x402 guide (@x402/stellar needs 22+) and a typo in the USDT0 caution.

I'd like to ship this for the developer preview and iterate, so here's what I'd fix now vs. later.

Before merge (all on the README, which currently promises a bit more than the reference pages back up):

  • Structured JSON Outputs: only the stellar token family returns typed JSON, and tx send/tx new have no --output. Scope the bullet to that and point to Output and errors.
  • Onchain Diagnostic Errors: drop "and auto-correct parameters."
  • Safety Architecture: the intro says "rather than prompt compliance," but item 3 is prompt compliance. Soften the intro or move item 3.
  • "Onchain Governance": rename to something like "Spending limits," since governance means protocol decisions on Stellar.
  • Version note: a line like "Verified against stellar-cli 28.1.0" near the top.

Nits: link "[here]" as the Stellar CLI Manual, and match the "Where to go next" labels to page titles.

Later (follow-ups are fine):

  • Bring Architecture and Authority model in line with the guides' voice.
  • Consolidate repeated error details (#13 appears on 8 pages) into Output and errors and Troubleshooting.
  • File the CLI rough edges the pages document (the #6 message, secure-store stranding, no keys rename, and no simulate-only transfer-from) as stellar-cli issues.
  • Eventually, consider whether this section should sync from stellar-cli like the cookbook does.

Happy to approve once the "before merge" bits are in. Thanks again!

Copilot AI lite review requested due to automatic review settings September 29, 2026 21:26
@oceans404

Copy link
Copy Markdown
Contributor Author

@ElliotFriend thanks for re-running the transfer-from flow and for the fix commit! The "before merge" README items are in 04c5cf4:

  • Structured JSON Outputs: scoped to the stellar token family, notes that tx send and tx new have no --output, and links to Output and errors.
  • Onchain Diagnostic Errors: dropped "and auto-correct parameters."
  • Safety Architecture: the intro now says the first two items are enforced by the network or a human signer, and the third (smallest-unit amounts) is a convention the agent follows.
  • "Onchain Governance" is now "Spending Limits".
  • Version note: added "Verified against stellar-cli 28.1.0." under the intro.

Nits: "[here]" now reads "Stellar CLI Manual", and the "Where to go next" labels match the page titles ("Delegate spending", "Authority & Security Model").

I'll take the "later" items as follow-ups, including filing the CLI rough edges as stellar-cli issues.

@github-actions github-actions Bot removed the preview Preview builds for PRs by SDF employees. label Sep 29, 2026
@github-actions github-actions Bot added the preview Preview builds for PRs by SDF employees. label Sep 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

A critical fee-bump example and several moderate workflow inaccuracies must be corrected before approval.

Review effort: Lite
Findings: 1 High severity · 1 Low severity

Open (2)
Resolved since last review (1)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Clarify simulation behavior for tx new and contract invoke

docs/​tools/​cli/​agent-cli/​reference/​troubleshooting.mdx:304

This incorrectly says every tx new command simulates before signing. In v28.1.0, tx new only builds the envelope (as this section's build-only guidance also says at build-and-submit-transactions.mdx:27-28,54); only contract invoke performs automatic simulation. Please distinguish the two and tell readers to run stellar tx simulate explicitly for a tx new pipeline.

inner = json.load(open("inner.json"))
fee = int(inner["tx"]["tx"]["fee"]) + 100
fb = {"tx_fee_bump": {"tx": {"fee_source": sys.argv[1], "fee": str(fee),
"inner_tx": {"tx": inner["tx"]}, "ext": "v0"}, "signatures": []}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Preview builds for PRs by SDF employees.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants