docs(studio): rewrite architecture for the shipped Node runtime - #886
Merged
0xlucasliao merged 1 commit intoAug 25, 2026
Merged
Conversation
The page described a two-artifact Python system that does not ship.
Verified against the published @bnbagent/studio-cli 0.0.12 tarball.
Replaced:
- "two deployable artifacts" / Layer A + Layer B, app/service/ on
EC2/Fargate, the "keyless" boundary, and InvokeAgentRuntime action
envelopes (quote/fulfill/settle) — none of this exists. The shipped
model is one runtime holding the only key and signing in-process.
- The six-layer stack's L4 `bnbagent_studio_core` -> the published
@bnbagent/studio-runtime, and L1 no longer lists app/service/*.
- A `frameworks/` recipe axis with a "Google ADK" default. There is no
frameworks/ directory in recipes at all; the real axes are agent,
wallet, runtimes/{agentcore,azure-foundry}, providers/pieverse-llm,
tools-chain and x402-buyer.
- Emitted .py filenames -> the templates actually shipped: signing.ts,
sellerCore.ts, unifiedMain.ts, mcpMain.ts, dualMain.ts, executor.ts,
agentCard.ts, model.ts, tools.ts, chainTools.ts, x402Buyer.ts.
Added what the invariants actually are: the two bounded ERC-8183
operations (negotiate clamps price in deterministic code and signs
EIP-191; notify_funded verifies the funded job on-chain before doing paid
work), the signing boundary, manual settle, and the ports each entrypoint
binds. Notes that dualMain.ts is AgentCore-only, which is the mechanical
reason Foundry deploys A2A scaffolds only, and that the A2A entrypoint is
byte-identical across runtimes.
Dropped two Further-reading links into bnb-chain/bnbagent-studio/docs/design/
— that repo returns 404, so both were dead.
Pull Request ReviewThis documentation-only PR rewrites the BNB Agent Studio architecture to describe the shipped TypeScript/Node.js runtime rather than the previously documented two-artifact Python design. It documents the single-runtime signing boundary, bounded ERC-8183 and x402 flows, actual recipe and entrypoint layout, workspace isolation, cloud runtime differences, and manual settlement behavior. Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
This was referenced Aug 23, 2026
0xlucasliao
pushed a commit
that referenced
this pull request
Aug 25, 2026
Completes the sweep started in #885 and #886. Verified against the published @bnbagent/studio-cli 0.0.12 tarball. deployment.md — rewritten. It described shipping "two artifacts": Layer A to AgentCore and Layer B to EC2/Fargate, with `bag deploy agent` + `bag deploy package` + a manual EC2 upload. One runtime ships now, and every deploy explicitly selects bnb | aws | azure. Documents the real per-target constraints (48h testnet trial runs in the operator's cloud so signing material leaves your control; Azure is container-only and A2A-only) and the per-target secret channel (Secrets Manager / Foundry CustomKeys / managed store). Notes that local deliverable storage fails readiness by design, and that cloud lifecycle is delegated to the pinned @bnbagent/deploy-cli — no azd, no azure.yaml in the scaffold. configuration.md — dropped the second `app/service/studio.toml` config and the keyless-Service env section; one runtime means one studio.toml. `--project-root app/service` no longer exists. cli-reference.md — removed `bag deploy prepare --include-service-preflight` (absent from the shipped CLI) and the Python flat-imports section. Fixed `bag erc8004 register --endpoint .../apex/`: no `apex` route exists in the package; the runtime serves /readiness, /invocations, /responses, /mcp and /x402. troubleshooting.md — replaced the two-studio.toml drift check, the `main.py` flat-import advice, and the `@aws/agentcore` + Node>=20 prerequisite. Retargeted the funded-jobs checklist at the single runtime and /readiness, and noted settle is manual. demo.md — NOT rewritten, deliberately. It is a 610-line walkthrough of recorded IDE transcripts and command output. A faithful version has to be executed to be trustworthy, not adapted on paper; inferring one would produce a confident guide that does not work. Added a prominent banner pointing at the current Quickstart and Architecture, and fixed a pre-existing broken link (../../bnbagent-sdk/networks.md was one level too deep). Verified: the four rewritten pages contain zero stale markers, and all 37 relative links across the studio doc set resolve.
0xlucasliao
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the Studio Node-path work started in #885, which deliberately left this page alone to stay reviewable.
architecture.mddescribed a two-artifact Python system that does not ship. Verified against the published@bnbagent/studio-cli@0.0.12tarball.What was wrong
app/service/on EC2/Fargate, a "keyless" boundary,InvokeAgentRuntimeaction envelopes (quote/fulfill/settle)bnbagent_studio_core; L1 listsapp/service/*@bnbagent/studio-runtime; there is no service tierframeworks/recipe axis, default Google ADKframeworks/directory exists inrecipes/at all. Real axes:agent,wallet,runtimes/{agentcore,azure-foundry},providers/pieverse-llm,tools-chain,x402-buyermain.py,managed_model.py,tools.py,signing.py,service.pysigning.ts,sellerCore.ts,unifiedMain.ts,mcpMain.ts,dualMain.ts,executor.ts,agentCard.ts,model.ts,tools.ts,chainTools.ts,x402Buyer.tsWhat replaced it
The invariants as they actually are:
negotiateclamps price againststudio.tomlin deterministic code and signs EIP-191 — no LLM touches money.notify_fundedverifies the funded job on-chain (signed terms, assigned provider, status, budget, funded state) before doing paid work.app/agent/src/signing.tsor the bounded x402 handler, never an LLM-callable tool; the model's chain tools are read-only. The keystore sits at the workspace root, outside the deploycodeLocation.bag erc8183 settle <jobId>; Studio never auto-settles a buyer's job.dualMain.tsis AgentCore-only. That last detail is the mechanical reason Foundry deploys A2A scaffolds only —runtimes/azure-foundry/ships nodualMaintemplate. The A2A entrypoint is byte-identical across both runtimes (pinned by a parity test), so one image deploys to either cloud.Also refreshed the mermaid diagram and the commerce-flow sequence to the real
negotiate→ fund →notify_funded→ submit → buyer-decides path.Also fixed
Dropped two Further reading links into
bnb-chain/bnbagent-studio/docs/design/— that repo returns 404, so both were dead.Verification
Layer A|Layer B|keyless|EC2|Fargate|app/service|service.py|main.py|managed_model|bnbagent_studio_core|frameworks/|Google ADK|InvokeAgentRuntime|six-layer|two deployablereturns one deliberate hit: "There is no separate keyless service tier and no cross-service invoke hop."find recipes -name '*.tmpl')Merge order
Independent of #885/#884 — this touches only
architecture.md, which neither of those modifies.