yellow-settlement-room
它能做什么
这项技能指导在 Yellow Network 上运行多方结算室,多个 AI 智能体共同持有资金,并结算一个最终结果。它适合构建需要多方共享最终分配的智能体系统的开发者。
适用场景
- ✓当超过两个智能体需要在同一次结算中持有并共享资金时。
- ✓当智能体需要彼此转移余额,而不必为每一步支付 Gas 时。
- ✓当你需要所有参与者在最后签署一份最终分配方案的时候。
技能链接
https://github.com/internet-court/internet-court-skill/blob/main/vendored/yellow/yellow-settlement-room/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“你能设置一个 Yellow 会话,让我的三个智能体汇集资金,然后按约定的权重分配结果吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会连接 Yellow SDK,用参与者、权重和法定人数创建一个会话,然后跟踪存款、余额转移和提款。会话最终通过一份共同签署的分配方案关闭。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Yellow Settlement Room
Use this skill when several AI agents need to hold funds together and settle one outcome: open a shared session, each agent's balance is tracked inside it, they reallocate between themselves off-chain with no gas per step, and they co-sign the final split.
The session holds N agents, not two. A payment rail moves value from one payer to one payee; a swarm of agents settling over a rail needs a separate escrow per pair. One session settles all of them at once: one object, one deposit per agent, one final allocation. That is the shape to reach for when more than two agents have a stake in the same outcome.
This skill covers the app-session (virtual) layer only. It operates on funds that are already in an account balance at Yellow. A session opens with zero allocations, so not every participant needs funds - only a participant that makes a deposit does. Getting funds into an account is a one-time on-chain step, out of scope here - see ## Prerequisite. This skill never funds accounts; before a participant deposits, check its balance with client.getBalances(wallet), and if it is short, stop and report it.
Package: @yellow-org/sdk (v1). A complete runnable reference is the official example at github.com/layer-3/docs, examples/nitrolite-v1-lifecycle; the flow below matches it exactly, generalised from two participants to N. For method lookups, the docs MCP: npx -y @yellow-org/sdk-mcp@^1.
Core Model
Each agent runs its own client with its own key (backend: private-key based)
-> agents open one app session: N participants, signature weights, quorum
(opens with ZERO allocations; nobody needs funds yet)
-> a depositing agent commits its OWN funds into the session
(only depositors need a funded account; others can hold zero)
-> agents reallocate between themselves (operate), each update co-signed to quorum
-> withdraw / close: the final split releases back to channels, withdrawable on-chain
The session is an off-chain ledger hosted by the Yellow node. Its guarantee is signature-based: no agent's allocation changes without signatures meeting the quorum. It is not a trustless escrow; read ## Trust Boundary before sizing exposure.
Design Rules
- One agent, one key, one client. Each agent signs only with its own key, from its own process. A backend service is private-key based; a frontend is wallet based. You cannot take several agents' private keys into one client. Holding multiple participants' keys in one process is valid only as a local test or an explicitly custodial server. See
## Roles and key separation. - Never fund accounts from this skill. Funding happens once, on-chain, before a session. Only a participant that deposits needs funds; check its balance first with
client.getBalances(wallet)and if it is short, stop and report the shortfall. Do not attemptdeposit,approveToken, ortransferto self-fund. - Never call an allocation "locked on-chain and enforceable." Funds are committed out of a channel and governed by quorum, so no counterparty agent can take them - but releasing them still needs the node to co-sign. State both halves.
- Default to equal weights and unanimous quorum. Only give a subset of agents combined weight >= quorum when that subset is intentionally trusted. See
## Weights and Quorum.
Prerequisite: a funded account for each depositor
A session is created with zero allocations, so not every participant needs funds. Only a participant that makes a deposit needs a funded account balance at Yellow for the asset. (An account is backed by an on-chain state channel, but you can treat it as the participant's balance.) That balance is the ceiling on what a depositor can commit and the most it can lose. Check a depositor's balance before it deposits:
const balances = await client.getBalances(wallet); // account balances at Yellow, per asset
Funding is a one-time on-chain operation, done once before any session and out of scope here. The funding calls, for reference, are:
await client.setHomeBlockchain(asset, chainId);
await client.approveToken(chainId, asset, amount);
await client.deposit(chainId, asset, amount);
await client.checkpoint(asset); // finalizes the deposit on-chain
For the exact funding sequence and any Node-specific transaction setup, see the quickstart at docs.yellow.org/nitrolite/build/getting-started/quickstart and the official
常见问题
这项技能会为账户充值吗?
不会。该技能只处理 Yellow 账户余额中已有的资金,并在存款前检查余额。
为什么使用一个会话,而不是多个托管?
该技能说明,一个会话可以同时结算所有参与者,而无需为每一对参与者各设一个托管。
参考示例在哪里?
该技能指向 layer-3 文档仓库中的一个官方示例。
详情
作者的原始描述
Yellow Network Protocol app sessions for AI agents - a shared room where several agents pool funds, reallocate off-chain at machine speed, and settle one final split. Use for multiparty settlement among agents. Covers connecting, the funded-account prerequisite, creating a session with participants + weights + quorum, deposit, operate, withdraw, close, and the trust boundary. Grounded in the official @yellow-org/sdk lifecycle example.
热度
- GitHub 星标
- 7.0k
- 排名
- #13691
- 许可证
- —
- 更新时间
- 2026/10/26
评论
- …
同一仓库的更多技能
internet-court
7.0k帮你的智能体安全地向其他 AI 智能体或付费服务付款、雇用或进行交易,并指引它找到合适的专业指南。
genlayer-erc7710-connector
7.0k帮你的智能体把 AI 审核结果与权限系统连接起来,使不合格的审核可以限制或取消智能体的权限。
genlayer-intelligent-contracts
7.0k帮你的智能体定义 AI 裁判的规则、证据和输出,用于检查另一个智能体是否遵循了其授权范围。
x402-erc7710
7.0k帮你的智能体按次为网络服务付款,并设置在权限预算范围内的持续支出。