Skip to content

docs(bnbagent-sdk): add a TypeScript quickstart - #884

Merged
0xlucasliao merged 3 commits into
bnb-chain:mainfrom
Ang-dot:docs/add-typescript-sdk-quickstart
Aug 26, 2026
Merged

docs(bnbagent-sdk): add a TypeScript quickstart#884
0xlucasliao merged 3 commits into
bnb-chain:mainfrom
Ang-dot:docs/add-typescript-sdk-quickstart

Conversation

@Ang-dot

@Ang-dot Ang-dot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

📋 Merge order

One of four related docs PRs. Recommended sequence:

# PR Depends on
1 #885 — Studio Node path + nav order
2 #884 — TypeScript SDK quickstart rebased on #885; fast-forwards after it
3 #886 — Studio architecture independent
4 #887 — remaining Studio pages independent

#882 (SDK server-module fixes) is independent of all four.


Summary

The SDK README states that Python and TypeScript are both "first-class, long-term" and that they "target the same protocols and network deployments". The docs had only a Python quickstart — so the single page where a developer chooses a language showed one language.

This adds quickstart-typescript.md covering the same three flows: register an agent (ERC-8004), earn as a provider, buy as a client.

Snippets are shipped code, not freshly written

Every code block was lifted from working source and retargeted to the published package imports:

Section Source
Register an agent typescript/examples/agent-server/scripts/register.ts — relative ../../../src/ imports swapped for @bnbagent/sdk/erc8004
Provider earn loop typescript/README.md §Quickstart (b)
Client job lifecycle typescript/README.md §Quickstart (a)

It says plainly that TS has no HTTP server layer

The Python provider examples wrap the protocol in FastAPI. The TypeScript SDK is transport-agnostic — the provider path is a headless fundedJobWatcher loop. The page calls that out in an admonition rather than implying a server exists.

That omission is deliberate: implying a FastAPI-style server layer existed is exactly what made the Python quickstart's server section wrong (see #882, where bnbagent.erc8183.server turned out not to exist at all).

Verification

Every API used exists in typescript/src:

Symbol Evidence
ERC8004Agent.create src/erc8004/agent.ts:351
AgentEndpoint, ERC8004Agent, AgentURIGenerator all exported from src/erc8004/index.ts
policy.disputeWindow() used internally at src/erc8183/client.ts:366
tokenDecimals / createJob / registerJob / fund / settle / getJob / setBudget all present in src/erc8183/
TWAKProvider src/index.ts:79

Also checked: subpath exports (., ./erc8004, ./erc8183, ./x402, ./storage, ./wallets, ./signing, ./networks, ./utils) and engines.node >= 20 from typescript/package.json; every mkdocs.yml nav path resolves to a real file; every relative link in the new page resolves; the three GitHub links return 200.

Other changes

  • quickstart.md retitled (Python), with a cross-link to the TS page. The existing /quickstart/ URL is unchanged — no redirect needed.
  • Both pages carry a short note that the two SDKs release independently, so differing version numbers are expected rather than a sign either is behind.
  • mkdocs.yml nav: Quickstart (Python) + Quickstart (TypeScript).
  • index.md doc table and llms.txt index updated to list both.

Docs-only.

@hashdit-bot

hashdit-bot Bot commented Aug 23, 2026

Copy link
Copy Markdown

Pull Request Review

This docs-only PR adds a TypeScript quickstart for the BNB Agent SDK covering ERC-8004 agent registration and ERC-8183 provider and client flows. It also distinguishes the Python and TypeScript guides, documents the TypeScript SDK’s transport-agnostic provider model, and updates the documentation index, LLM index, and MkDocs navigation.

Sensitive Content

No sensitive content detected.

Security Issues

No serious security issues detected.


Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits.

@hashdit-bot

hashdit-bot Bot commented Aug 23, 2026

Copy link
Copy Markdown

Pull Request Review

This docs-only PR adds a TypeScript quickstart for the BNB Agent SDK covering ERC-8004 agent registration and ERC-8183 provider and client workflows. It also distinguishes the Python and TypeScript quickstarts across navigation and indexes, documents their independent release cycles, and clarifies that the TypeScript SDK provides a headless provider loop rather than an HTTP server layer.

Sensitive Content

No sensitive content detected.

Security Issues

No serious security issues detected.


Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits.

@Ang-dot

Ang-dot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

Heads-up on merge order: this PR and #885 both edit the same mkdocs.yml nav region — #885 moves the whole BNB Agent Studio block above BNB Agent SDK, while this PR splits the SDK's single Quickstart: entry into Quickstart (TypeScript) + Quickstart (Python). Verified locally that they conflict in mkdocs.yml (content conflict, nav only — no doc content overlaps).

Suggested order: merge #885 first, then rebase this one. The resolution is mechanical — keep #885's Studio-above-SDK ordering and this PR's two quickstart lines inside the SDK block. Happy to rebase and force-push whenever you've picked an order.

@hashdit-bot

hashdit-bot Bot commented Aug 23, 2026

Copy link
Copy Markdown

Pull Request Review

This docs-only PR adds a TypeScript quickstart for the BNB Agent SDK covering agent registration, provider job handling, and the client lifecycle, while distinguishing it from the existing Python guide and updating navigation/indexes. It also substantially revises BNB Agent Studio documentation to describe its TypeScript, single-runtime/single-signer architecture, generated project layout, IDE skill workflow, and deployment options.

Sensitive Content

No sensitive content detected.

Security Issues

No serious security issues detected.


Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits.

@Ang-dot

Ang-dot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto #885 — the mkdocs.yml conflict is resolved and this is MERGEABLE again.

This PR is now stacked on #885, so its commit list includes #885's commit until that one merges. Merge order: #885 first, then this one (it will fast-forward cleanly).

Resulting Developer Kit nav:

Developer Kit
  ├── Overview
  ├── BNB Agent Studio
  ├── BNB Agent SDK
  │     ├── Quickstart (TypeScript)
  │     └── Quickstart (Python)
  ├── Greenfield SDK
  └── …

Verified after the rebase: mkdocs.yml parses, exactly one BNB Agent SDK block remains, and all 34 developer-kit nav paths resolve.

The SDK README commits to Python and TypeScript both being "first-class,
long-term", but the only quickstart was Python. The one page where a
developer picks a language showed one language.

Adds quickstart-typescript.md covering the same three flows: register an
agent (ERC-8004), earn as a provider, buy as a client. Every snippet is
taken from shipped code, not written fresh:

- registration from typescript/examples/agent-server/scripts/register.ts,
  retargeted from relative src/ imports to the published subpath exports
- provider and client flows from the typescript/README.md quickstart

States plainly that the TypeScript SDK ships no HTTP server layer. The
Python provider examples wrap the protocol in FastAPI; the TS path is a
headless fundedJobWatcher loop. Implying otherwise is what made the Python
quickstart's server section wrong in the first place.

quickstart.md is retitled "(Python)" and both pages cross-link, with a note
that independent release cadences mean the version numbers differ by design.
Existing /quickstart/ URL is unchanged.

Verified: all 7 documented APIs exist in typescript/src (ERC8004Agent.create
at erc8004/agent.ts:351, policy.disputeWindow used at erc8183/client.ts:366,
tokenDecimals/createJob/registerJob/fund/settle/getJob/setBudget all present);
subpath exports and Node >=20 from typescript/package.json; every nav path
and relative link resolves; the three GitHub links return 200.
Node is the path being pushed for agentic use, so it should be the first
quickstart a developer sees. Applies to both the nav and the overview
page's guide table. Neither page's URL changes.
@Ang-dot
Ang-dot force-pushed the docs/add-typescript-sdk-quickstart branch from 63b4c43 to 0fde380 Compare August 23, 2026 18:07
@hashdit-bot

hashdit-bot Bot commented Aug 23, 2026

Copy link
Copy Markdown

Pull Request Review

This docs-only PR adds a TypeScript quickstart for the BNB Agent SDK covering ERC-8004 registration and ERC-8183 provider/client flows, while distinguishing it from the existing Python quickstart and updating navigation and indexes. It also substantially refreshes BNB Agent Studio documentation to describe its TypeScript, single-runtime architecture, generated project layout, guided IDE workflow, payment rails, and deployment options.

Sensitive Content

No sensitive content detected.

Security Issues

No serious security issues detected.


Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits.

@hashdit-bot

hashdit-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown

Pull Request Review

This docs-only PR adds a TypeScript quickstart for the BNB Agent SDK, covering ERC-8004 agent registration and ERC-8183 provider and client workflows. It also distinguishes the existing Python quickstart, adds cross-links and release guidance, and updates the documentation index, navigation, and LLM index to list both languages.

Sensitive Content

No sensitive content detected.

Security Issues

No serious security issues detected.


Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits.

@0xlucasliao
0xlucasliao merged commit a54af17 into bnb-chain:main Aug 26, 2026
1 check 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.

2 participants