@bnbagent/studio-cli 0.0.13-alpha.2 → 0.0.13-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -6
- package/dist/bag.js +1571 -335
- package/dist/{chunk-XCKI45TP.js → chunk-OFAD65VZ.js} +139 -43
- package/dist/{deployCli-HZNZU3CN.js → deployCli-NZAZDPKK.js} +1 -1
- package/package.json +4 -3
- package/recipes/agent/recipe.toml +1 -1
- package/recipes/mpp-buyer/code/{{PKG}}/mppBuyer.ts.tmpl +113 -0
- package/recipes/mpp-buyer/recipe.toml +15 -0
- package/recipes/runtimes/agentcore/code/{{PKG}}/dualMain.ts.tmpl +13 -12
- package/recipes/runtimes/agentcore/code/{{PKG}}/mcpMain.ts.tmpl +10 -9
- package/recipes/runtimes/agentcore/code/{{PKG}}/unifiedMain.ts.tmpl +16 -15
- package/recipes/runtimes/agentcore/recipe.toml +1 -1
- package/recipes/runtimes/azure-foundry/code/{{PKG}}/mcpMain.ts.tmpl +10 -9
- package/recipes/runtimes/azure-foundry/code/{{PKG}}/unifiedMain.ts.tmpl +16 -15
- package/recipes/runtimes/azure-foundry/recipe.toml +1 -1
- package/recipes/x402-buyer/recipe.toml +1 -1
- package/skills/bnbagent-studio.md +5 -4
- package/skills/references/bnbagent-studio-buying-via-8183.md +2 -2
- package/skills/references/bnbagent-studio-buying-via-mpp.md +44 -0
- package/skills/references/bnbagent-studio-scaffolding-agent.md +9 -5
- package/skills/references/bnbagent-studio-selling-via-8183.md +1 -1
- package/skills/references/bnbagent-studio-selling-via-b402.md +1 -1
- package/skills/references/bnbagent-studio-use-aws-agentcore.md +1 -1
- package/skills/references/bnbagent-studio-use-azure-foundry.md +44 -14
- package/skills/references/bnbagent-studio-use-bnb-trial.md +10 -3
|
@@ -69,10 +69,10 @@ import {
|
|
|
69
69
|
} from "@bnbagent/studio-runtime/wallet";
|
|
70
70
|
import {
|
|
71
71
|
createEnvelopeMiddleware,
|
|
72
|
-
|
|
73
|
-
type
|
|
74
|
-
|
|
75
|
-
} from "@bnbagent/studio-runtime/
|
|
72
|
+
b402SellPath,
|
|
73
|
+
type B402HttpRequest,
|
|
74
|
+
B402Seller,
|
|
75
|
+
} from "@bnbagent/studio-runtime/b402";
|
|
76
76
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
77
77
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
78
78
|
import { isInitializeRequest } from "@modelcontextprotocol/sdk/types.js";
|
|
@@ -185,7 +185,7 @@ function flatQuery(query: Record<string, unknown>): Record<string, string> {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
// ── LLM work hook (lazy: built on first authorized task) ─────────────────────
|
|
188
|
-
// Deferred construction keeps negotiate and unpaid
|
|
188
|
+
// Deferred construction keeps negotiate and unpaid payment challenge paths from
|
|
189
189
|
// building the model, and keeps this module importable without the provider
|
|
190
190
|
// env until a deliverable is actually produced.
|
|
191
191
|
type RunLlm = (prompt: string) => Promise<string>;
|
|
@@ -593,25 +593,26 @@ async function main(): Promise<void> {
|
|
|
593
593
|
|
|
594
594
|
const cfg = loadStudioToml();
|
|
595
595
|
const rails = { erc8183: hasErc8183Rail(cfg) };
|
|
596
|
+
const sellPath = b402SellPath(cfg);
|
|
596
597
|
const host = process.env.AGENT_BIND_HOST || "0.0.0.0";
|
|
597
598
|
const port = Number(process.env.AGENT_PORT || "8000");
|
|
598
|
-
const seller = await
|
|
599
|
+
const seller = await B402Seller.create({
|
|
599
600
|
cfg,
|
|
600
601
|
runWork: ({ prompt }) => runLlm(prompt),
|
|
601
602
|
walletAddress: getWallet().address,
|
|
602
603
|
resourceUrl: `${
|
|
603
604
|
process.env.AGENTCORE_RUNTIME_URL ?? `http://localhost:${port}`
|
|
604
|
-
}${
|
|
605
|
+
}${sellPath}`,
|
|
605
606
|
});
|
|
606
607
|
|
|
607
608
|
const app = express();
|
|
608
609
|
|
|
609
610
|
if (seller.state !== "disabled") {
|
|
610
611
|
app.all(
|
|
611
|
-
|
|
612
|
+
sellPath,
|
|
612
613
|
express.text({ type: "*/*", limit: "1mb" }),
|
|
613
614
|
async (req, res) => {
|
|
614
|
-
const request:
|
|
615
|
+
const request: B402HttpRequest = {
|
|
615
616
|
method: req.method,
|
|
616
617
|
path: req.path,
|
|
617
618
|
query: flatQuery(req.query),
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
* because Foundry's incoming A2A is text-modality only — {@link SkillRouter}
|
|
34
34
|
* parses it and dispatches through the SAME `SellerAgentExecutor.dispatch`.
|
|
35
35
|
*
|
|
36
|
-
* ## How
|
|
36
|
+
* ## How payment buyers reach the selected B402 seller route
|
|
37
37
|
*
|
|
38
38
|
* Neither hosted-agent gateway allows anonymous ingress, and both strip or
|
|
39
39
|
* gate the buyer's half of the HTTP exchange — so the anonymous buyer talks
|
|
40
40
|
* to an external gateway that wraps each request in `http-envelope-v1`
|
|
41
41
|
* (outer HTTP always 200) and forwards it with the runtime's own auth.
|
|
42
42
|
* {@link createEnvelopeMiddleware} unwraps the tunnel onto the in-process
|
|
43
|
-
* {@link
|
|
43
|
+
* {@link B402Seller} below. See docs/guides/self-hosted-x402-gateway.md
|
|
44
44
|
* (AWS) and self-hosted-x402-gateway-azure.md (Azure).
|
|
45
45
|
*
|
|
46
46
|
* Secrets: on AgentCore, `loadRuntimeSecrets()` pulls the Secrets Manager
|
|
@@ -85,11 +85,11 @@ import {
|
|
|
85
85
|
} from "@bnbagent/studio-runtime/wallet";
|
|
86
86
|
import {
|
|
87
87
|
createEnvelopeMiddleware,
|
|
88
|
-
|
|
89
|
-
type
|
|
90
|
-
type
|
|
91
|
-
|
|
92
|
-
} from "@bnbagent/studio-runtime/
|
|
88
|
+
b402SellPath,
|
|
89
|
+
type B402HttpRequest,
|
|
90
|
+
type B402RunWork,
|
|
91
|
+
B402Seller,
|
|
92
|
+
} from "@bnbagent/studio-runtime/b402";
|
|
93
93
|
import { generateText, stepCountIs } from "ai";
|
|
94
94
|
import express from "express";
|
|
95
95
|
import { buildAgentCard } from "./agentCard.js";
|
|
@@ -252,8 +252,8 @@ function flatQuery(query: Record<string, unknown>): Record<string, string> {
|
|
|
252
252
|
return out;
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
function
|
|
256
|
-
return ({ prompt }) => runWork(prompt, { sessionId: "
|
|
255
|
+
function b402Work(runWork: RunWork): B402RunWork {
|
|
256
|
+
return ({ prompt }) => runWork(prompt, { sessionId: "b402" });
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
// ── Foundry text-carrier adapters ────────────────────────────────────────────
|
|
@@ -447,6 +447,7 @@ async function main(): Promise<void> {
|
|
|
447
447
|
|
|
448
448
|
const cfg = loadStudioToml();
|
|
449
449
|
const rails = { erc8183: hasErc8183Rail(cfg) };
|
|
450
|
+
const sellPath = b402SellPath(cfg);
|
|
450
451
|
const host = process.env.AGENT_BIND_HOST || "0.0.0.0";
|
|
451
452
|
// Both hosted-agent contract ports are always bound (AgentCore A2A: 9000,
|
|
452
453
|
// Foundry invocations: 8088) so one image serves either cloud. AGENT_PORT
|
|
@@ -473,9 +474,9 @@ async function main(): Promise<void> {
|
|
|
473
474
|
commerceSkills: rails.erc8183,
|
|
474
475
|
});
|
|
475
476
|
const agentCard = buildAgentCard({ commerceSkills: rails.erc8183 });
|
|
476
|
-
const seller = await
|
|
477
|
+
const seller = await B402Seller.create({
|
|
477
478
|
cfg,
|
|
478
|
-
runWork:
|
|
479
|
+
runWork: b402Work(runWork),
|
|
479
480
|
walletAddress: getWallet().address,
|
|
480
481
|
// The 402 challenge's resource URL must be the BUYER-facing address:
|
|
481
482
|
// BNBAGENT_PUBLIC_URL (the operator's gateway base URL, no /x402 suffix —
|
|
@@ -488,7 +489,7 @@ async function main(): Promise<void> {
|
|
|
488
489
|
process.env.AGENT_PUBLIC_URL ??
|
|
489
490
|
process.env.AGENTCORE_RUNTIME_URL ??
|
|
490
491
|
`http://localhost:${port}`
|
|
491
|
-
}${
|
|
492
|
+
}${sellPath}`,
|
|
492
493
|
});
|
|
493
494
|
const router = new SkillRouter(executor, { name: generatorTag() });
|
|
494
495
|
|
|
@@ -518,10 +519,10 @@ async function main(): Promise<void> {
|
|
|
518
519
|
|
|
519
520
|
if (seller.state !== "disabled") {
|
|
520
521
|
app.all(
|
|
521
|
-
|
|
522
|
+
sellPath,
|
|
522
523
|
express.text({ type: "*/*", limit: "1mb" }),
|
|
523
524
|
async (req, res) => {
|
|
524
|
-
const request:
|
|
525
|
+
const request: B402HttpRequest = {
|
|
525
526
|
method: req.method,
|
|
526
527
|
path: req.path,
|
|
527
528
|
query: flatQuery(req.query),
|
|
@@ -583,7 +584,7 @@ async function main(): Promise<void> {
|
|
|
583
584
|
const servers = ports.map((p, i) => {
|
|
584
585
|
const server = app.listen(p, host, () => {
|
|
585
586
|
console.log(
|
|
586
|
-
`[seller-agent] serving on ${host}:${p}${i === 0 ? "" : " (secondary contract port)"} (
|
|
587
|
+
`[seller-agent] serving on ${host}:${p}${i === 0 ? "" : " (secondary contract port)"} (${seller.protocol}: ${seller.state})`,
|
|
587
588
|
);
|
|
588
589
|
});
|
|
589
590
|
if (i > 0) {
|
|
@@ -32,7 +32,7 @@ node = [
|
|
|
32
32
|
# BNBAGENT_RUNTIME_SECRET_ID is set (default secretsmanager mode + platform).
|
|
33
33
|
"@aws-sdk/client-secrets-manager@^3.600.0",
|
|
34
34
|
"@bnbagent/studio-runtime",
|
|
35
|
-
"@bnbagent/sdk@0.5.
|
|
35
|
+
"@bnbagent/sdk@0.5.3",
|
|
36
36
|
# The LLM work hook (generateText + tools) and the model factory.
|
|
37
37
|
"ai@^7.0.29",
|
|
38
38
|
# Tool input schemas (AI SDK tools + MCP registerTool).
|
|
@@ -69,10 +69,10 @@ import {
|
|
|
69
69
|
} from "@bnbagent/studio-runtime/wallet";
|
|
70
70
|
import {
|
|
71
71
|
createEnvelopeMiddleware,
|
|
72
|
-
|
|
73
|
-
type
|
|
74
|
-
|
|
75
|
-
} from "@bnbagent/studio-runtime/
|
|
72
|
+
b402SellPath,
|
|
73
|
+
type B402HttpRequest,
|
|
74
|
+
B402Seller,
|
|
75
|
+
} from "@bnbagent/studio-runtime/b402";
|
|
76
76
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
77
77
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
78
78
|
import { isInitializeRequest } from "@modelcontextprotocol/sdk/types.js";
|
|
@@ -185,7 +185,7 @@ function flatQuery(query: Record<string, unknown>): Record<string, string> {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
// ── LLM work hook (lazy: built on first authorized task) ─────────────────────
|
|
188
|
-
// Deferred construction keeps negotiate and unpaid
|
|
188
|
+
// Deferred construction keeps negotiate and unpaid payment challenge paths from
|
|
189
189
|
// building the model, and keeps this module importable without the provider
|
|
190
190
|
// env until a deliverable is actually produced.
|
|
191
191
|
type RunLlm = (prompt: string) => Promise<string>;
|
|
@@ -593,25 +593,26 @@ async function main(): Promise<void> {
|
|
|
593
593
|
|
|
594
594
|
const cfg = loadStudioToml();
|
|
595
595
|
const rails = { erc8183: hasErc8183Rail(cfg) };
|
|
596
|
+
const sellPath = b402SellPath(cfg);
|
|
596
597
|
const host = process.env.AGENT_BIND_HOST || "0.0.0.0";
|
|
597
598
|
const port = Number(process.env.AGENT_PORT || "8000");
|
|
598
|
-
const seller = await
|
|
599
|
+
const seller = await B402Seller.create({
|
|
599
600
|
cfg,
|
|
600
601
|
runWork: ({ prompt }) => runLlm(prompt),
|
|
601
602
|
walletAddress: getWallet().address,
|
|
602
603
|
resourceUrl: `${
|
|
603
604
|
process.env.AGENTCORE_RUNTIME_URL ?? `http://localhost:${port}`
|
|
604
|
-
}${
|
|
605
|
+
}${sellPath}`,
|
|
605
606
|
});
|
|
606
607
|
|
|
607
608
|
const app = express();
|
|
608
609
|
|
|
609
610
|
if (seller.state !== "disabled") {
|
|
610
611
|
app.all(
|
|
611
|
-
|
|
612
|
+
sellPath,
|
|
612
613
|
express.text({ type: "*/*", limit: "1mb" }),
|
|
613
614
|
async (req, res) => {
|
|
614
|
-
const request:
|
|
615
|
+
const request: B402HttpRequest = {
|
|
615
616
|
method: req.method,
|
|
616
617
|
path: req.path,
|
|
617
618
|
query: flatQuery(req.query),
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
* because Foundry's incoming A2A is text-modality only — {@link SkillRouter}
|
|
34
34
|
* parses it and dispatches through the SAME `SellerAgentExecutor.dispatch`.
|
|
35
35
|
*
|
|
36
|
-
* ## How
|
|
36
|
+
* ## How payment buyers reach the selected B402 seller route
|
|
37
37
|
*
|
|
38
38
|
* Neither hosted-agent gateway allows anonymous ingress, and both strip or
|
|
39
39
|
* gate the buyer's half of the HTTP exchange — so the anonymous buyer talks
|
|
40
40
|
* to an external gateway that wraps each request in `http-envelope-v1`
|
|
41
41
|
* (outer HTTP always 200) and forwards it with the runtime's own auth.
|
|
42
42
|
* {@link createEnvelopeMiddleware} unwraps the tunnel onto the in-process
|
|
43
|
-
* {@link
|
|
43
|
+
* {@link B402Seller} below. See docs/guides/self-hosted-x402-gateway.md
|
|
44
44
|
* (AWS) and self-hosted-x402-gateway-azure.md (Azure).
|
|
45
45
|
*
|
|
46
46
|
* Secrets: on AgentCore, `loadRuntimeSecrets()` pulls the Secrets Manager
|
|
@@ -85,11 +85,11 @@ import {
|
|
|
85
85
|
} from "@bnbagent/studio-runtime/wallet";
|
|
86
86
|
import {
|
|
87
87
|
createEnvelopeMiddleware,
|
|
88
|
-
|
|
89
|
-
type
|
|
90
|
-
type
|
|
91
|
-
|
|
92
|
-
} from "@bnbagent/studio-runtime/
|
|
88
|
+
b402SellPath,
|
|
89
|
+
type B402HttpRequest,
|
|
90
|
+
type B402RunWork,
|
|
91
|
+
B402Seller,
|
|
92
|
+
} from "@bnbagent/studio-runtime/b402";
|
|
93
93
|
import { generateText, stepCountIs } from "ai";
|
|
94
94
|
import express from "express";
|
|
95
95
|
import { buildAgentCard } from "./agentCard.js";
|
|
@@ -252,8 +252,8 @@ function flatQuery(query: Record<string, unknown>): Record<string, string> {
|
|
|
252
252
|
return out;
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
function
|
|
256
|
-
return ({ prompt }) => runWork(prompt, { sessionId: "
|
|
255
|
+
function b402Work(runWork: RunWork): B402RunWork {
|
|
256
|
+
return ({ prompt }) => runWork(prompt, { sessionId: "b402" });
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
// ── Foundry text-carrier adapters ────────────────────────────────────────────
|
|
@@ -447,6 +447,7 @@ async function main(): Promise<void> {
|
|
|
447
447
|
|
|
448
448
|
const cfg = loadStudioToml();
|
|
449
449
|
const rails = { erc8183: hasErc8183Rail(cfg) };
|
|
450
|
+
const sellPath = b402SellPath(cfg);
|
|
450
451
|
const host = process.env.AGENT_BIND_HOST || "0.0.0.0";
|
|
451
452
|
// Both hosted-agent contract ports are always bound (AgentCore A2A: 9000,
|
|
452
453
|
// Foundry invocations: 8088) so one image serves either cloud. AGENT_PORT
|
|
@@ -473,9 +474,9 @@ async function main(): Promise<void> {
|
|
|
473
474
|
commerceSkills: rails.erc8183,
|
|
474
475
|
});
|
|
475
476
|
const agentCard = buildAgentCard({ commerceSkills: rails.erc8183 });
|
|
476
|
-
const seller = await
|
|
477
|
+
const seller = await B402Seller.create({
|
|
477
478
|
cfg,
|
|
478
|
-
runWork:
|
|
479
|
+
runWork: b402Work(runWork),
|
|
479
480
|
walletAddress: getWallet().address,
|
|
480
481
|
// The 402 challenge's resource URL must be the BUYER-facing address:
|
|
481
482
|
// BNBAGENT_PUBLIC_URL (the operator's gateway base URL, no /x402 suffix —
|
|
@@ -488,7 +489,7 @@ async function main(): Promise<void> {
|
|
|
488
489
|
process.env.AGENT_PUBLIC_URL ??
|
|
489
490
|
process.env.AGENTCORE_RUNTIME_URL ??
|
|
490
491
|
`http://localhost:${port}`
|
|
491
|
-
}${
|
|
492
|
+
}${sellPath}`,
|
|
492
493
|
});
|
|
493
494
|
const router = new SkillRouter(executor, { name: generatorTag() });
|
|
494
495
|
|
|
@@ -518,10 +519,10 @@ async function main(): Promise<void> {
|
|
|
518
519
|
|
|
519
520
|
if (seller.state !== "disabled") {
|
|
520
521
|
app.all(
|
|
521
|
-
|
|
522
|
+
sellPath,
|
|
522
523
|
express.text({ type: "*/*", limit: "1mb" }),
|
|
523
524
|
async (req, res) => {
|
|
524
|
-
const request:
|
|
525
|
+
const request: B402HttpRequest = {
|
|
525
526
|
method: req.method,
|
|
526
527
|
path: req.path,
|
|
527
528
|
query: flatQuery(req.query),
|
|
@@ -583,7 +584,7 @@ async function main(): Promise<void> {
|
|
|
583
584
|
const servers = ports.map((p, i) => {
|
|
584
585
|
const server = app.listen(p, host, () => {
|
|
585
586
|
console.log(
|
|
586
|
-
`[seller-agent] serving on ${host}:${p}${i === 0 ? "" : " (secondary contract port)"} (
|
|
587
|
+
`[seller-agent] serving on ${host}:${p}${i === 0 ? "" : " (secondary contract port)"} (${seller.protocol}: ${seller.state})`,
|
|
587
588
|
);
|
|
588
589
|
});
|
|
589
590
|
if (i > 0) {
|
|
@@ -29,7 +29,7 @@ node = [
|
|
|
29
29
|
# on either cloud.
|
|
30
30
|
"@aws-sdk/client-secrets-manager@^3.600.0",
|
|
31
31
|
"@bnbagent/studio-runtime",
|
|
32
|
-
"@bnbagent/sdk@0.5.
|
|
32
|
+
"@bnbagent/sdk@0.5.3",
|
|
33
33
|
# The LLM work hook (generateText + tools) and the model factory
|
|
34
34
|
# (model.ts buildModel — studio.toml [llm] + the provider key env).
|
|
35
35
|
"ai@^7.0.29",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bnbagent-studio
|
|
3
|
-
description: The single entry point for bnbagent-studio - a TypeScript CLI (`bag`) for building a blockchain SELLER agent that earns $U on BNB Chain via ERC-8004 + ERC-8183 + x402 (Pieverse LLM inside). Load this skill whenever the user works in a bnbagent-studio / `bag` project, or wants to create/scaffold, deploy, run, debug, operate, or monetize such a seller agent (composable A2A, MCP, and X402 faces; BNB Chain trial, AWS AgentCore, or Azure Foundry). All detailed playbooks ship as references/ files inside this skill - route via the decision tree in the body. When invoked with arguments, treat them as the user's intent and route the same way.
|
|
3
|
+
description: The single entry point for bnbagent-studio - a TypeScript CLI (`bag`) for building a blockchain SELLER agent that earns $U on BNB Chain via ERC-8004 + ERC-8183 + an x402 or MPP B402 payment face (Pieverse LLM inside). Load this skill whenever the user works in a bnbagent-studio / `bag` project, or wants to create/scaffold, deploy, run, debug, operate, or monetize such a seller agent (composable A2A, MCP, and alternative X402/MPP faces; BNB Chain trial, AWS AgentCore, or Azure Foundry). All detailed playbooks ship as references/ files inside this skill - route via the decision tree in the body. When invoked with arguments, treat them as the user's intent and route the same way.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# bnbagent-studio (the single entry point)
|
|
@@ -23,11 +23,12 @@ One deployed runtime, one signer: a single valuable Agent serves the selected fa
|
|
|
23
23
|
| Add wallet / the single seller runtime to an existing TypeScript agent | `references/bnbagent-studio-adding-to-project.md` |
|
|
24
24
|
| Run / debug / dev / doctor / RPC / balance / incident triage | `references/bnbagent-studio-operating.md` |
|
|
25
25
|
| Implement what the Agent sells, tune pricing, publish over A2A and/or MCP, defend disputes (seller flow) | `references/bnbagent-studio-selling-via-8183.md` |
|
|
26
|
-
| Sell one paid or FREE HTTP request through the B402-backed x402 rail (pricing choice; paid merchant application, RSA key, credentials, IP allowlist, activation) | `references/bnbagent-studio-selling-via-b402.md` |
|
|
26
|
+
| Sell one paid or FREE HTTP request through the selected B402-backed x402 or MPP rail (pricing choice; paid merchant application, RSA key, credentials, IP allowlist, activation) | `references/bnbagent-studio-selling-via-b402.md` |
|
|
27
27
|
| Deploy / redeploy / status / logs / destroy | Run `bag deploy` and explicitly choose a provider. Non-interactive deploy requires `--provider bnb\|aws\|azure --yes` (and `--allow-multiple` when keeping another provider active). Read `references/bnbagent-studio-use-bnb-trial.md`, `references/bnbagent-studio-use-aws-agentcore.md`, or `references/bnbagent-studio-use-azure-foundry.md` for the selected provider. `bag deploy status` lists every recorded provider; multi-deployment logs/verify/destroy require `--provider`. |
|
|
28
28
|
| Wire chain-read tools into the Agent's LLM (AI SDK `tool()` wrappers, or any TS agent framework) | `references/bnbagent-studio-wiring-llm-tools.md` |
|
|
29
29
|
| Buy a service from another ERC-8183 seller via CLI - incl. testing your own seller from the buyer side (v2/internal - NOT the v1 seller product flow) | `references/bnbagent-studio-buying-via-8183.md` |
|
|
30
30
|
| Give the agent a PAID x402 capability - CMC market data / Binance Bazaar (B402) merchants / any pay-per-call API (`bag x402 trust`, x402-buyer recipe, 402 buyer errors) | `references/bnbagent-studio-buying-from-bazaar.md` |
|
|
31
|
+
| Give the agent a native MPP+B402 buyer capability (`bag mpp trust/quote/buy`, mpp-buyer recipe, recipient/realm pins, unknown outcomes) | `references/bnbagent-studio-buying-via-mpp.md` |
|
|
31
32
|
| Extend the EIP-712 signing allowlist (custom contract / new x402 service / diagnose `PolicyViolation` / `X402PolicyError`) | `references/bnbagent-studio-extending-signing.md` |
|
|
32
33
|
| Project uses `[wallet].kind = "twak"` (create / fund / SIWE-bind / container deploy / known limitations) | `references/bnbagent-studio-using-twak-wallet.md` |
|
|
33
34
|
| Project uses `[wallet].kind = "altana"` (admin keystore / bounded session / quote checker / x402 allowance / local dev / session-only deploy + renewal) | `references/bnbagent-studio-using-altana-wallet.md` |
|
|
@@ -53,11 +54,11 @@ Treat ERC-8183 amounts as decimal strings at CLI/config boundaries and `bigint`
|
|
|
53
54
|
|
|
54
55
|
## CLI groups at a glance
|
|
55
56
|
|
|
56
|
-
`init`, `scan`, `recipe`, `skills`, `wallet`, `erc8004`, `erc8183`, `x402`, `agents`, `config`, `env`, `dev`, `doctor`, `audit`, `deploy`, `platform`, `llm`, `bundle`, `budget` - see `bag --help` for details. `bag deploy [--provider bnb\|aws\|azure] [--backend aws\|azure]` is the primary deploy command; `--backend` is valid only for provider `bnb` and confirms the recipe-derived managed backend. `prepare`, `verify`, `status`, `info`, `destroy`, `logs`, and `fix-gitignore` remain lifecycle subcommands (`deploy agent` is a deprecated compatibility alias). Provider deploy/status/logs/destroy and deploy-time credential validation are delegated to pinned `@bnbagent/deploy-cli@0.5.
|
|
57
|
+
`init`, `scan`, `recipe`, `skills`, `wallet`, `erc8004`, `erc8183`, `x402`, `mpp`, `agents`, `config`, `env`, `dev`, `doctor`, `audit`, `deploy`, `platform`, `llm`, `bundle`, `budget` - see `bag --help` for details. `bag deploy [--provider bnb\|aws\|azure] [--backend aws\|azure]` is the primary deploy command; `--backend` is valid only for provider `bnb` and confirms the recipe-derived managed backend. `prepare`, `verify`, `status`, `info`, `destroy`, `logs`, and `fix-gitignore` remain lifecycle subcommands (`deploy agent` is a deprecated compatibility alias). Provider deploy/status/logs/destroy and deploy-time credential validation are delegated to pinned `@bnbagent/deploy-cli@0.5.15`.
|
|
57
58
|
|
|
58
59
|
## Tool surface
|
|
59
60
|
|
|
60
|
-
- **CLI** - write-side (wallet ops, on-chain register, x402 buy, deploy)
|
|
61
|
+
- **CLI** - write-side (wallet ops, on-chain register, x402/MPP buy, deploy)
|
|
61
62
|
- **MCP** - an external seller face (`bag init --protocols MCP`), composable with A2A; dual mode is A2A-native so `HEALTHY_BUSY` preserves background work
|
|
62
63
|
- **`@bnbagent/studio-runtime/tools`** - 15 pure read-only functions, wrapped into LLM tools by the chain-tools recipe (read `references/bnbagent-studio-wiring-llm-tools.md`)
|
|
63
64
|
|
|
@@ -114,13 +114,13 @@ Delivery is no longer instant: because the seller works in the background, the w
|
|
|
114
114
|
|
|
115
115
|
## Stage 5 - Fetch the deliverable
|
|
116
116
|
|
|
117
|
-
The single seller runtime serves **no** job-query endpoint - the deliverable is read back from the on-chain submission (the `submit` tx carries the `deliverable_url
|
|
117
|
+
The single seller runtime serves **no** job-query endpoint - the deliverable is read back from the on-chain submission (the `submit` tx carries the stable `deliverable_url`). This may be IPFS for self-hosting or a content-addressed HTTPS URL for S3, Azure Blob, or managed-platform storage. Get the URL via CLI:
|
|
118
118
|
|
|
119
119
|
```bash
|
|
120
120
|
bag erc8183 fetch <job_id>
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
Prints the `deliverable_url`. Fetch it
|
|
123
|
+
Prints the `deliverable_url`. Fetch it directly (using a gateway when the scheme is `ipfs://`) to read the `DeliverableManifest`: `{"chain_id", "contracts", "job_id", "response": {"content": ..., "content_type": ...}, "metadata": {...}}`.
|
|
124
124
|
|
|
125
125
|
## Stage 6 - Settle
|
|
126
126
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bnbagent-studio-buying-via-mpp
|
|
3
|
+
description: When the user wants an agent to buy from a native MPP+B402 endpoint. Covers trust, quote, buy, recipe wiring, wallet limits, and unknown payment outcomes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
> **Reference file** of the `bnbagent-studio` router skill, installed at `bnbagent-studio/references/` and loaded on demand (not a standalone skill).
|
|
7
|
+
|
|
8
|
+
# Buy via native MPP+B402
|
|
9
|
+
|
|
10
|
+
MPP and x402 are parallel alternatives. Use this flow only when the server returns a native `WWW-Authenticate: Payment` challenge with method `b402` and intent `charge`. Never route an x402 402 body into this buyer and never add automatic protocol fallback.
|
|
11
|
+
|
|
12
|
+
## Trust, inspect, then buy
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
bag mpp trust https://seller.example/mpp --yes
|
|
16
|
+
bag mpp quote https://seller.example/mpp
|
|
17
|
+
bag mpp buy https://seller.example/mpp --max-usd 0.10
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
`trust` is an unpaid probe. Review the live domain, realm, recipient, CAIP-2 network, token address, EIP-3009 method, price, and cap. For an unreviewed endpoint, verify the realm and recipient out-of-band. The resulting `[payments.mpp.merchants.*]` entry pins all of them before any typed data is signed.
|
|
21
|
+
|
|
22
|
+
P0 supports only:
|
|
23
|
+
|
|
24
|
+
- `wallet.kind = "evm-local"` or an equivalent wallet exposing `sign.typed_data`;
|
|
25
|
+
- native MPP `b402.charge`;
|
|
26
|
+
- B402's pinned BSC mainnet/testnet U facts;
|
|
27
|
+
- EIP-3009;
|
|
28
|
+
- one paid dispatch per call.
|
|
29
|
+
|
|
30
|
+
TWAK's delegated `x402.pay` permission is not generic EIP-712 signing, and Altana's current session interface does not expose the required signing surface. Both must fail before payment.
|
|
31
|
+
|
|
32
|
+
## Wire the agent tools
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
bag recipe code mpp-buyer
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
This emits `mppBuyer.ts` with `quote_mpp` and `buy_with_mpp`. Spread `MPP_BUYER_TOOLS` into the generated AgentCore or Azure Foundry AI SDK tool map. Runtime enforcement remains in `@bnbagent/studio-runtime/mpp`; the LLM can tighten `max_usd` but cannot widen configured merchant or daily caps or choose another recipient.
|
|
39
|
+
|
|
40
|
+
## Unknown means stop
|
|
41
|
+
|
|
42
|
+
After `Authorization: Payment` crosses the fetch boundary, a timeout, connection loss, or paid response without a successful `Payment-Receipt` is an `unknown` outcome. Studio records `mpp_buy` with status `unknown`. Do not retry automatically or tell the user to rerun blindly. Reconcile the wallet/facilitator/seller state first; another request can create another payment.
|
|
43
|
+
|
|
44
|
+
Use `--local-dev` only for an operator-owned loopback endpoint. It permits plain HTTP and pins recipient plus realm from the live challenge for that invocation; it is not a production trust mechanism.
|
|
@@ -70,7 +70,7 @@ The fields (give the user all of them at once):
|
|
|
70
70
|
| 2 | **Network** | `bsc-testnet` / `bsc-mainnet` | `bsc-testnet` |
|
|
71
71
|
| 3 | **LLM provider** | `pieverse-llm` / `openrouter` / `openai` / `anthropic` / `bedrock` | `pieverse-llm` |
|
|
72
72
|
| 4 | **Wallet kind** (`--wallet-kind`) | `evm-local` (encrypted local keystore at the workspace root; `bag wallet new` creates it, `--private-key` imports an existing key; CodeZip deploy) / `twak` (**fully supported, opt in with `--wallet-kind twak`** - Trust Wallet Agent Kit CLI ≥0.20.0, self-custody encrypted mnemonic in a **project-dedicated** home `.studio/twak`, isolated from your main `~/.twak`; created manually with `HOME=<ws>/.studio/twak twak wallet create`, then `bag wallet new` adopts; container deploy. Reuse an existing wallet across agents with `--twak-home <path>`) / `altana` (bounded-session custody - admin keystore stays local, deploys ship ONLY the `ALTANA_SESSION` secret; zip deploy; not compatible with `pieverse-llm` or a paid b402 rail; flow: `references/bnbagent-studio-using-altana-wallet.md`) | `evm-local` |
|
|
73
|
-
| 5 | **Storage** | `local` (
|
|
73
|
+
| 5 | **Storage** | `local` (offline only) / `ipfs` / `s3` / `azure-blob`. Self-hosted deploys use BYOS credentials; managed-platform deploys receive an operator-owned storage endpoint and scoped token through the sealed runtime-secret channel. | `local` |
|
|
74
74
|
| 6 | **Protocol faces** (`--protocols`) | any non-empty subset of `A2A`, `MCP`, `X402` | `A2A,X402` (`A2A` for Altana) |
|
|
75
75
|
| 7 | **LLM model** | provider catalogue; for `pieverse-llm` the default `auto/free` runs at $0/token | `auto/free` |
|
|
76
76
|
| 8 | **Auto-topup** | `enable` / `disable` - lets the Agent auto-pay $U from the wallet when LLM credits run low | deferred (non-interactive `bag init` records no `[budget]`; enable later with `bag budget enable`) |
|
|
@@ -126,7 +126,7 @@ Then execute Stage 2 **without further prompts** until you hit a step that genui
|
|
|
126
126
|
|
|
127
127
|
## Stage 2 - Generate a todo list (visible to the user)
|
|
128
128
|
|
|
129
|
-
Build a TodoWrite list. The shape depends on the `wallet kind`. The canonical 8-step layout (evm-local default, Pieverse default LLM; plus a conditional Step 6b
|
|
129
|
+
Build a TodoWrite list. The shape depends on the `wallet kind`. The canonical 8-step layout (evm-local default, Pieverse default LLM; plus a conditional Step 6b for self-hosted durable storage):
|
|
130
130
|
|
|
131
131
|
> **Step 0 - Pre-flight (informational; do NOT block `bag init` on it).** `bag init` self-renders the `agentcore/` deploy descriptor, and deploys delegate to the pinned `@bnbagent/deploy-cli` run via `bunx`, so Bun is only needed later, at `bag deploy` time. Do **not** re-check Node or `bag` (both are necessarily present - running the CLI required Node, and this skill only loads because `bag` is installed).
|
|
132
132
|
>
|
|
@@ -139,6 +139,8 @@ Build a TodoWrite list. The shape depends on the `wallet kind`. The canonical 8-
|
|
|
139
139
|
> **Onboarding note.** On a human TTY, `bag init` runs steps 3, 4 and 6 automatically (it prompts once for the wallet password, runs `bag wallet new`, zero-deposit-activates Pieverse, and prints faucet URLs). **You (Claude Code) drive `bag init` non-interactively**, so that auto-flow does NOT fire - keep steps 3/4/6 below. Pass `--no-onboard` to `bag init` to make this explicit and deterministic regardless of how the shell wires stdin.
|
|
140
140
|
|
|
141
141
|
1. `bag init <name> --llm-provider <p> --network <n> --storage-provider <s> --wallet-kind <k> [--protocols <comma-list>] [--rails <8183|b402|both>] [--erc8183-price <base-units>] [--b402-price <usd>] --no-onboard` - scaffold the current workspace. **`<name>` must start with a letter, use ASCII letters and digits only, and be at most 23 characters.** `bag init` rejects `-`, `_`, `.`, and overlong names instead of renaming them. Pass `--wallet-kind evm-local` (default) or `--wallet-kind twak` (twak is fully supported - pass the flag to opt in), and `--storage-provider local` (default) or `ipfs`, per the Stage-1 choices; for twak, add `--twak-home <path>` ONLY if the user wants to reuse an existing wallet (otherwise omit - a project-dedicated `.studio/twak` is the safe default). Omit `--protocols` and `--rails` for the default A2A + X402 faces with both ERC-8183 and B402 rails (all wallet kinds, altana included — its paid B402 payout lands at the admin address). Pass either flag when the user chose another face/rail combination (`--protocol <one>` is only a legacy alias), add `--model <m>` only if the user overrode the provider default, and `--enable-auto-topup` / `--no-auto-topup` only if they made an explicit choice (otherwise omit - consent stays deferred). Pass `--erc8183-price 0` only when the user explicitly chose FREE; omitting the flag preserves the paid 0.1 U default. The canonical stack supports FREE; if a custom deployment is selected, set all three `ERC8183_COMMERCE_ADDRESS`, `ERC8183_ROUTER_ADDRESS`, and `ERC8183_POLICY_ADDRESS` values from that same stack. For B402, pass `--b402-price 0` only after the user explicitly accepts an unrestricted anonymous FREE `/x402` endpoint. FREE bypasses B402 verify/settle and needs no merchant credentials; a positive price keeps the `$0.01` default and requires the paid onboarding playbook. **Destination:** while the trial campaign runs, bare `bag init` (no `--destination`) defaults to `platform` - so pass `--destination self` **explicitly** whenever the user chose their own AWS, otherwise studio.toml silently records `platform` and the confirmation block you echoed no longer matches what was written. Omit `--destination` only when the user actually wants the `platform` 48h testnet trial (the campaign default) - do NOT treat that default as a mistake or re-confirm it; it is the intended behavior while the campaign is open. (Bare init also resolves to `self` once the campaign ends, or when `--network bsc-mainnet` / a non-agentcore `--runtime` is passed.) On the `platform` path `bag init` hard-forces `bsc-testnet`, pins `--runtime agentcore` + packages an artifact (a zip for the default evm-local and altana wallets, a container for twak). For evm-local a wallet key will later leave your machine, so pair it with a throwaway `bag wallet new`; for altana only the bounded session ships - do NOT create a new wallet (full flow: `docs/guides/platform-deploy.md`). Defaults `--runtime agentcore` (the only advertised runtime; the Preview `azure-foundry` runtime remains explicitly selectable but is outside this playbook; there is no `--framework` flag because the AI SDK model/tools story is part of the runtime templates). Creates `<name>/` workspace root + `<name>/app/agent/` (the single sub-project: A2A emits `src/unifiedMain.ts` (the express + A2A entrypoint, one code set for both deploy clouds) + `src/sellerCore.ts` (the protocol-neutral core; executor inherits it) + `src/executor.ts` + `src/agentCard.ts`; MCP emits `src/mcpMain.ts`; both include `src/signing.ts` + `src/tools.ts` + `src/model.ts` + their own `studio.toml` + `package.json` + `tsconfig.json`) + `<name>/agentcore/` (`agentcore.json` + `aws-targets.json`, self-rendered - no agentcore CLI needed at init). The workspace root holds the `agentcore/` deploy descriptor, the `.studio/wallets/` keystore, a thin `package.json` + `pnpm-workspace.yaml`, README, and `.gitignore`. (v1 is seller-only - no `--role`.)
|
|
142
|
+
> **Current storage choices:** `--storage-provider` accepts `local`, `ipfs`, `s3`, and `azure-blob`. The latter three are BYOS only for self-hosted deployment; a managed-platform deployment replaces the writer with its injected API endpoint/token.
|
|
143
|
+
>
|
|
142
144
|
> **Altana + custom contracts:** Altana sessions remain bound to the canonical ERC-8183 targets. Use `evm-local` for a custom Commerce/Router/Policy stack; doctor and deploy readiness reject this unsupported combination when the ERC-8183 rail is active.
|
|
143
145
|
|
|
144
146
|
2. `cd <name>`, then make sure the dependencies are installed. `bag init` already runs the install by default (skip only if it was scaffolded with `--no-install`); the manual equivalent from the workspace root is:
|
|
@@ -194,7 +196,7 @@ Build a TodoWrite list. The shape depends on the `wallet kind`. The canonical 8-
|
|
|
194
196
|
|
|
195
197
|
6. **Activate Pieverse LLM** (only if `llm=pieverse-llm`, default): `bag llm activate` - **zero-deposit by default** (`--initial-usd` defaults to 0). SIWE-logs in with the agent wallet (an off-chain EIP-191 signature - no gas, no U), creates an `sk-pv-...` key with a $0 allocation, and writes `PIEVERSE_LLM_API_KEY` to `.env.local` + `key_hash` to studio.toml. The default model `auto/free` runs at $0/token, so **no funding is required to start**. Only when you switch to a paid model do you fund the wallet and run `bag llm topup --amount N` (then `[llm.auto_renew]` auto-**allocates** from your Pieverse Account Balance to the key below the floor; wallet U is spent only when `[budget]` has been explicitly enabled). For non-Pieverse providers, manually set the API key env var instead.
|
|
196
198
|
|
|
197
|
-
**Step 6b - Set
|
|
199
|
+
**Step 6b - Set self-hosted deliverable-storage credentials** (skip this for managed-platform deploys; the platform injects its own scoped upload token). With `--storage-provider ipfs` the self-hosted Agent pins each deliverable to IPFS at delivery and publishes `ipfs://CID` on-chain. Works with any IPFS pinning service or a self-hosted node:
|
|
198
200
|
|
|
199
201
|
> Pick a pinning service and create a write key/JWT in its console (or run your own IPFS node - its `/api/v0/add` endpoint usually needs no key), then:
|
|
200
202
|
>
|
|
@@ -203,7 +205,9 @@ Build a TodoWrite list. The shape depends on the `wallet kind`. The canonical 8-
|
|
|
203
205
|
> bag env set STORAGE_API_KEY <your-write-key>
|
|
204
206
|
> ```
|
|
205
207
|
>
|
|
206
|
-
> Written to `.studio/.env.local`.
|
|
208
|
+
> Written to `.studio/.env.local`. They are required before deploy and the first real delivery. You can also pass `--ipfs-key <key>` to `bag init` upfront.
|
|
209
|
+
|
|
210
|
+
For self-hosted `s3`, fill `bucket`/`region` and set `DELIVERABLE_S3_ACCESS_KEY_ID` plus `DELIVERABLE_S3_SECRET_ACCESS_KEY`. For self-hosted `azure-blob`, fill `account_url`/`container` and set a write SAS or the complete namespaced service-principal variables scaffolded in `.studio/.env.local`. A `public_base_url` may point at the user's CloudFront/Azure Front Door/CDN; otherwise the bucket/container must itself allow anonymous reads. Never use a presigned/SAS URL for the public base. Canonical JSON deliverables are capped at 10 MiB before upload and are re-read/hash-verified through the public URL before on-chain submit. `credential_mode = "ambient"` is a runtime option, not an IAM/RBAC provisioner: the operator must grant the runtime identity write access. Managed-platform deploys ignore this BYOS writer configuration and use the API-injected storage endpoint/token. For pure offline dev, keep `local`.
|
|
207
211
|
|
|
208
212
|
7. **Recipe code is already emitted by `bag init`** - the `app/agent/` sub-project plus its `studio.toml` is written by step 1, so **skip manual recipe emission**. To re-emit or inspect a recipe later, `bag recipe code agent` / `bag recipe code runtimes/agentcore` (emits under `{{PKG}}` = the agent's `src/` dir; pass `--pkg <name>` to override). The real work is editing the Agent's `runWork` hook in `app/agent/src/sellerCore.ts` (A2A) / `app/agent/src/mcpMain.ts` (MCP) (see `bnbagent-studio-selling-via-8183.md` in this same directory).
|
|
209
213
|
8. **Verify**: `bag doctor` - confirms the scaffold + Pieverse key activation (if applicable) + config. Zero BNB / U are **WARN only** (not failures) - funding is optional (see step 5), so do NOT refuse to continue on a balance warning. Only refuse on real FAILs (missing keystore, unparseable config, etc.).
|
|
@@ -230,7 +234,7 @@ For each todo item:
|
|
|
230
234
|
- Step 3 (password): the USER sets it **themselves, in their own terminal** - never through the chat or on a command line (see Step 3's security note). They edit `.studio/.env.local` and set `TWAK_WALLET_PASSWORD` (twak) or `WALLET_PASSWORD` (evm-local). `bag` auto-loads that file, so once it's set `bag wallet new` / `bag llm activate` pick it up - no `source`/`cd` needed. Wait for the user to confirm before continuing.
|
|
231
235
|
- Step 5 (funding): OPTIONAL - only stop here if the user explicitly wants a paid LLM model, on-chain settle, or to pay ERC-8183 buys now. Otherwise skip; the `auto/free` default needs no funds.
|
|
232
236
|
- Step 6 (Pieverse activation): zero-deposit, so it just works - no funding precheck needed. If `bag llm activate` fails on connectivity, retry once.
|
|
233
|
-
- Step 6b (
|
|
237
|
+
- Step 6b (deliverable storage): skip for `local` and for every managed-platform deploy. Self-hosted IPFS needs its write endpoint, S3 needs namespaced keys unless ambient identity is deliberately configured, and Azure Blob needs a write SAS/service principal unless ambient identity is deliberately configured. Do not ask for secret values in chat; have the user set them with `bag env set`. Self-hosted deploy readiness blocks incomplete storage configuration.
|
|
234
238
|
- Business-logic step: ask the user what the Agent should produce when it delivers a job - the `runWork` hook in `app/agent/src/sellerCore.ts` (A2A) / `app/agent/src/mcpMain.ts` (MCP) is the developer hook. Leave the generic LLM passthrough stub if they don't know yet
|
|
235
239
|
|
|
236
240
|
**Never** ask the user to `echo "KEY=VALUE" >> .env.local`. Always call `bag env set KEY VALUE` - it replaces the existing line if present, otherwise appends, so it's safe to run repeatedly.
|
|
@@ -175,7 +175,7 @@ Older contracts may have required a manual `withdraw` - confirm against the depl
|
|
|
175
175
|
|
|
176
176
|
## How a buyer reads the deliverable
|
|
177
177
|
|
|
178
|
-
The agent serves **no** job-query endpoint. The buyer reads the
|
|
178
|
+
The agent serves **no** job-query endpoint. The buyer reads the stable `deliverable_url` from the on-chain submission, then fetches the content-addressed object from IPFS, self-hosted S3/Blob, or the managed API proxy. This is by design - the chain is the shared source of truth, and the agent stays a thin A2A surface.
|
|
179
179
|
|
|
180
180
|
## Common errors + remediation
|
|
181
181
|
|
|
@@ -89,7 +89,7 @@ B402 allowlists the merchant's **outbound** (egress) IPs, the addresses the agen
|
|
|
89
89
|
|
|
90
90
|
As an alternative, use AWS-supported AgentCore VPC mode with a private subnet, NAT Gateway, and Elastic IP. Submit the Elastic IP and keep `B402_BASE_URL` pointed at the facilitator. Studio does not deploy or manage that AWS network.
|
|
91
91
|
|
|
92
|
-
4. **Self-hosted Azure Foundry egress (self-deploys)**: Foundry hosted-agent containers have floating egress just like AgentCore, so the agent must NOT call the facilitator directly. Run the envelope gateway on a Container Apps workload-profiles environment whose subnet has a NAT Gateway with a Standard static public IP, co-host a restricted B402 forwarder there (the AWS guide's Relay example works verbatim — the NAT Gateway replaces its fixed-IP host requirement), point the runtime `B402_BASE_URL` at that forwarder, and submit the NAT Gateway IP. The environment type and VNet cannot be changed after creation;
|
|
92
|
+
4. **Self-hosted Azure Foundry egress (self-deploys)**: Foundry hosted-agent containers have floating egress just like AgentCore, so the agent must NOT call the facilitator directly. Run the envelope gateway on a Container Apps workload-profiles environment whose subnet has a NAT Gateway with a Standard static public IP, co-host a restricted B402 forwarder there (the AWS guide's Relay example works verbatim — the NAT Gateway replaces its fixed-IP host requirement), point the runtime `B402_BASE_URL` at that forwarder, and submit the NAT Gateway IP. The environment type and VNet cannot be changed after creation; the full recipe (subnet sizing, ingress caveats, minReplicas) is in the [Azure self-hosted x402 gateway guide](https://github.com/bnb-chain/bnbagent-studio/blob/main/docs/guides/self-hosted-x402-gateway-azure.md). Studio does not deploy or manage that Azure network.
|
|
93
93
|
|
|
94
94
|
Do not add the public inbound gateway IP, a transient build-runner IP, or guessed addresses. If the whitelist endpoint is unreachable, stop onboarding and confirm the platform environment with the operator.
|
|
95
95
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bnbagent-studio-use-aws-agentcore
|
|
3
|
-
description: When the user wants to deploy or operate a bnbagent-studio project on AWS Bedrock AgentCore - deploy with `bag deploy --provider aws` (all cloud lifecycle mutations are delegated to pinned `@bnbagent/deploy-cli@0.5.
|
|
3
|
+
description: When the user wants to deploy or operate a bnbagent-studio project on AWS Bedrock AgentCore - deploy with `bag deploy --provider aws` (all cloud lifecycle mutations are delegated to pinned `@bnbagent/deploy-cli@0.5.15`), inspect with `bag deploy status` / `logs --provider aws` / `verify --provider aws`, and tear down with `bag deploy destroy --provider aws --execute [--purge]`. Also covers AWS credential prerequisites, the optional read-only quota probe, and the runtime-secret channel.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
> **Reference file** of the `bnbagent-studio` router skill - installed at `bnbagent-studio/references/` and loaded on demand (not a standalone skill). Route here via the router's decision tree.
|