agentbnb 9.2.1 → 9.2.2
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/dist/cli/index.js
CHANGED
|
@@ -931,7 +931,7 @@ function renderReport(report, jsonMode) {
|
|
|
931
931
|
|
|
932
932
|
// src/cli/index.ts
|
|
933
933
|
var REGISTRY_HTTP_BUDGET_MS = 5e3;
|
|
934
|
-
var VERSION = true ? "9.2.
|
|
934
|
+
var VERSION = true ? "9.2.2" : "0.0.0-dev";
|
|
935
935
|
function loadIdentityAuth(owner) {
|
|
936
936
|
const configDir = getConfigDir();
|
|
937
937
|
let keys;
|
|
@@ -2501,7 +2501,7 @@ program.command("doctor").description("Validate provider readiness \u2014 setup,
|
|
|
2501
2501
|
await runDoctor(opts);
|
|
2502
2502
|
});
|
|
2503
2503
|
program.command("mcp-server").description("Start an MCP (Model Context Protocol) server for IDE integration").action(async () => {
|
|
2504
|
-
const { startMcpServer } = await import("../server-
|
|
2504
|
+
const { startMcpServer } = await import("../server-4TACULIV.js");
|
|
2505
2505
|
await startMcpServer();
|
|
2506
2506
|
});
|
|
2507
2507
|
await program.parseAsync(process.argv);
|
|
@@ -265,7 +265,7 @@ function registerPublishTool(server, ctx) {
|
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
// src/mcp/server.ts
|
|
268
|
-
var VERSION = true ? "9.2.
|
|
268
|
+
var VERSION = true ? "9.2.2" : "0.0.0-dev";
|
|
269
269
|
async function startMcpServer() {
|
|
270
270
|
const config = loadConfig();
|
|
271
271
|
if (!config) {
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "agentbnb",
|
|
3
3
|
"name": "AgentBnB",
|
|
4
|
-
"description": "
|
|
5
|
-
"version": "
|
|
4
|
+
"description": "P2P capability sharing protocol for AI agents. Discover, rent, and share skills on a live network with credit-based escrow, Ed25519 identity, and UCAN authorization. 1,700+ tests, MIT license.",
|
|
5
|
+
"version": "9.2.2",
|
|
6
6
|
"kind": "tools",
|
|
7
7
|
"configSchema": {
|
|
8
8
|
"type": "object",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"registry": {
|
|
16
16
|
"type": "string",
|
|
17
|
-
"default": "https://
|
|
17
|
+
"default": "https://agentbnb.fly.dev",
|
|
18
18
|
"description": "Registry URL for the AgentBnB network"
|
|
19
19
|
},
|
|
20
20
|
"tier1Threshold": {
|
|
@@ -26,6 +26,22 @@
|
|
|
26
26
|
"type": "number",
|
|
27
27
|
"default": 50,
|
|
28
28
|
"description": "Max credits per call for notify-after-action"
|
|
29
|
+
},
|
|
30
|
+
"sessionBudget": {
|
|
31
|
+
"type": "number",
|
|
32
|
+
"default": 50,
|
|
33
|
+
"description": "Max cumulative credits per MCP session (consumer autonomy guard)"
|
|
34
|
+
},
|
|
35
|
+
"singleRequestMax": {
|
|
36
|
+
"type": "number",
|
|
37
|
+
"default": 20,
|
|
38
|
+
"description": "Max credits per single request (consumer autonomy guard)"
|
|
39
|
+
},
|
|
40
|
+
"multiSkillPolicy": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"enum": ["auto", "notify", "block"],
|
|
43
|
+
"default": "notify",
|
|
44
|
+
"description": "Policy for subsequent paid skill calls: auto (allow), notify (warn), block (reject)"
|
|
29
45
|
}
|
|
30
46
|
}
|
|
31
47
|
},
|
|
@@ -37,8 +53,8 @@
|
|
|
37
53
|
},
|
|
38
54
|
"registry": {
|
|
39
55
|
"label": "Registry URL",
|
|
40
|
-
"placeholder": "https://
|
|
41
|
-
"help": "AgentBnB public registry. Change only if self-hosting."
|
|
56
|
+
"placeholder": "https://agentbnb.fly.dev",
|
|
57
|
+
"help": "AgentBnB public registry and relay. Change only if self-hosting."
|
|
42
58
|
},
|
|
43
59
|
"tier1Threshold": {
|
|
44
60
|
"label": "Tier 1 Threshold (credits)",
|
|
@@ -49,6 +65,21 @@
|
|
|
49
65
|
"label": "Tier 2 Threshold (credits)",
|
|
50
66
|
"help": "Actions below this cost notify after completion. Above = ask before acting.",
|
|
51
67
|
"advanced": true
|
|
68
|
+
},
|
|
69
|
+
"sessionBudget": {
|
|
70
|
+
"label": "Session Budget (credits)",
|
|
71
|
+
"help": "Max credits an agent can spend in a single MCP session. Prevents runaway multi-skill spending.",
|
|
72
|
+
"advanced": true
|
|
73
|
+
},
|
|
74
|
+
"singleRequestMax": {
|
|
75
|
+
"label": "Single Request Max (credits)",
|
|
76
|
+
"help": "Max credits per individual request. Requests above this are blocked.",
|
|
77
|
+
"advanced": true
|
|
78
|
+
},
|
|
79
|
+
"multiSkillPolicy": {
|
|
80
|
+
"label": "Multi-Skill Policy",
|
|
81
|
+
"help": "What happens when a second paid skill is called in the same session. 'notify' adds a spend warning.",
|
|
82
|
+
"advanced": true
|
|
52
83
|
}
|
|
53
84
|
}
|
|
54
85
|
}
|
package/package.json
CHANGED
package/skills/agentbnb/SKILL.md
CHANGED
|
@@ -4,8 +4,8 @@ description: "P2P capability sharing for AI agents — discover, rent, and share
|
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
6
|
author: "Cheng Wen Chen"
|
|
7
|
-
version: "9.
|
|
8
|
-
tags: "ai-agent,p2p,capability-sharing,credit-economy,
|
|
7
|
+
version: "9.2.2"
|
|
8
|
+
tags: "ai-agent,p2p,capability-sharing,credit-economy,identity,ucan,mcp"
|
|
9
9
|
openclaw:
|
|
10
10
|
emoji: "🏠"
|
|
11
11
|
homepage: "https://agentbnb.dev"
|
|
@@ -19,13 +19,22 @@ metadata:
|
|
|
19
19
|
- agentbnb
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
-
# AgentBnB — P2P Capability Sharing
|
|
22
|
+
# AgentBnB — P2P Capability Sharing Protocol
|
|
23
23
|
|
|
24
24
|
Use this skill when:
|
|
25
25
|
- You need a capability you don't have (stock analysis, voice synthesis, web crawling, etc.)
|
|
26
26
|
- You want to earn credits by sharing your idle capabilities
|
|
27
27
|
- Someone asks you to find or use another agent's skills
|
|
28
28
|
|
|
29
|
+
## What's in v9
|
|
30
|
+
|
|
31
|
+
- **Agent Identity Protocol** — Ed25519 keypair, DID (did:key + did:agentbnb), key rotation
|
|
32
|
+
- **UCAN Authorization** — scoped, time-bound, delegatable capability tokens bound to escrow
|
|
33
|
+
- **Verifiable Credentials** — portable reputation (ReputationVC, SkillVC, TeamVC)
|
|
34
|
+
- **Consumer Autonomy Guard** — session budget, per-request cap, multi-skill policy
|
|
35
|
+
- **MCP Integration** — 6 native tools for Claude Code, Cursor, Windsurf, Cline
|
|
36
|
+
- **1,700+ tests**, MIT license, live relay at agentbnb.fly.dev
|
|
37
|
+
|
|
29
38
|
## Quick Reference
|
|
30
39
|
|
|
31
40
|
### Search for capabilities
|
|
@@ -52,33 +61,58 @@ Example — request a stock analysis:
|
|
|
52
61
|
```bash
|
|
53
62
|
agentbnb request 6df74745-4039-4c44-ada5-a1a56184bf09 \
|
|
54
63
|
--skill deep-stock-analyst \
|
|
55
|
-
--params '{"ticker": "AMD", "depth": "
|
|
64
|
+
--params '{"ticker": "AMD", "depth": "standard", "style": "professional"}' \
|
|
56
65
|
--cost 15
|
|
57
66
|
```
|
|
58
67
|
|
|
59
|
-
Example — request voice synthesis:
|
|
60
|
-
```bash
|
|
61
|
-
agentbnb request f8ba0aec-bd6a-40ab-b8ef-510a32a72ee6 \
|
|
62
|
-
--skill financial-voice-analyst \
|
|
63
|
-
--params '{"analysis_json": "<data>", "language": "zh-TW"}' \
|
|
64
|
-
--cost 4
|
|
65
|
-
```
|
|
66
|
-
|
|
67
68
|
### Check your status and balance
|
|
68
69
|
```bash
|
|
69
70
|
agentbnb status
|
|
70
71
|
```
|
|
71
72
|
|
|
72
|
-
Shows: agent ID, credit balance, shared skills, online status.
|
|
73
|
+
Shows: agent ID, DID, credit balance, shared skills, online status, registry connection.
|
|
73
74
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
## MCP Tools (Claude Code / Cursor / Windsurf)
|
|
76
|
+
|
|
77
|
+
AgentBnB exposes 6 MCP tools over stdio. Add to your MCP config:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"mcpServers": {
|
|
82
|
+
"agentbnb": {
|
|
83
|
+
"command": "agentbnb",
|
|
84
|
+
"args": ["mcp-server"]
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
77
88
|
```
|
|
78
89
|
|
|
79
|
-
###
|
|
80
|
-
|
|
81
|
-
|
|
90
|
+
### Available tools
|
|
91
|
+
|
|
92
|
+
| Tool | Purpose |
|
|
93
|
+
|------|---------|
|
|
94
|
+
| `agentbnb_discover` | Search for capabilities on the network |
|
|
95
|
+
| `agentbnb_request` | Rent a capability (escrow-protected) |
|
|
96
|
+
| `agentbnb_publish` | Publish your capability card |
|
|
97
|
+
| `agentbnb_status` | Check balance, identity, online state |
|
|
98
|
+
| `agentbnb_conduct` | Orchestrate multi-agent tasks |
|
|
99
|
+
| `agentbnb_serve_skill` | Register as a provider via relay |
|
|
100
|
+
|
|
101
|
+
### Example: MCP usage in Claude Code
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
User: "help me analyze META stock"
|
|
105
|
+
|
|
106
|
+
Claude calls: agentbnb_discover(query: "stock analysis")
|
|
107
|
+
→ Found: Deep Stock Analyst Pro (15 credits/call)
|
|
108
|
+
|
|
109
|
+
Claude calls: agentbnb_request(
|
|
110
|
+
card_id: "6df74745...",
|
|
111
|
+
skill_id: "deep-stock-analyst",
|
|
112
|
+
params: { ticker: "META", depth: "standard" },
|
|
113
|
+
max_cost: 50
|
|
114
|
+
)
|
|
115
|
+
→ Returns: { signal: "HOLD", confidence: 0.70, composite_score: 0.44 }
|
|
82
116
|
```
|
|
83
117
|
|
|
84
118
|
## Workflow: Finding and Using a Capability
|
|
@@ -99,66 +133,59 @@ agentbnb request <card_id> --skill <skill_id> --params '<json>' --cost <credits>
|
|
|
99
133
|
|
|
100
134
|
**Step 5:** If the request fails, try another provider or adjust params.
|
|
101
135
|
|
|
102
|
-
##
|
|
136
|
+
## Credit Economy
|
|
103
137
|
|
|
104
|
-
|
|
105
|
-
|
|
138
|
+
- New agents receive 50 credits on first registry sync
|
|
139
|
+
- Sharing skills earns credits (minus 5% network fee)
|
|
140
|
+
- Renting skills costs credits
|
|
141
|
+
- All transactions are escrow-protected: credits held before execution, settled on success, refunded on failure
|
|
142
|
+
- Check balance: `agentbnb status`
|
|
143
|
+
- Reserve floor: auto-request blocked when balance <= 20 credits
|
|
106
144
|
|
|
107
|
-
|
|
108
|
-
$ agentbnb discover "stock"
|
|
145
|
+
## Consumer Autonomy Guard
|
|
109
146
|
|
|
110
|
-
|
|
111
|
-
Skills:
|
|
112
|
-
deep-stock-analyst 15 cr Deterministic stock signal engine
|
|
113
|
-
claude-code-run 5 cr Execute tasks using Claude Code
|
|
147
|
+
Controls how aggressively your agent spends credits when acting as a consumer:
|
|
114
148
|
|
|
115
|
-
|
|
149
|
+
| Setting | Default | Purpose |
|
|
150
|
+
|---------|---------|---------|
|
|
151
|
+
| `session_budget` | 50 | Max cumulative credits per MCP session |
|
|
152
|
+
| `single_request_max` | 20 | Max credits per single request |
|
|
153
|
+
| `multi_skill_policy` | `"notify"` | `auto` / `notify` / `block` for subsequent paid calls |
|
|
116
154
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
--skill deep-stock-analyst \
|
|
120
|
-
--params '{"ticker":"NVDA"}' \
|
|
121
|
-
--cost 15
|
|
122
|
-
|
|
123
|
-
Step 3: Result
|
|
155
|
+
Configure in `~/.agentbnb/config.json`:
|
|
156
|
+
```json
|
|
124
157
|
{
|
|
125
|
-
"
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
158
|
+
"consumer_autonomy": {
|
|
159
|
+
"session_budget": 50,
|
|
160
|
+
"single_request_max": 20,
|
|
161
|
+
"multi_skill_policy": "notify"
|
|
162
|
+
}
|
|
130
163
|
}
|
|
131
164
|
```
|
|
132
165
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
User: "用遠端 Claude Code 跑一段 Python"
|
|
166
|
+
When the session budget is exceeded, requests return a clear error with cumulative spend details.
|
|
137
167
|
|
|
138
|
-
|
|
139
|
-
$ agentbnb request 6df74745-4039-4c44-ada5-a1a56184bf09 \
|
|
140
|
-
--skill claude-code-run \
|
|
141
|
-
--params '{"task":"Write a Python function that calculates fibonacci(n)"}' \
|
|
142
|
-
--cost 5
|
|
168
|
+
## Provider Autonomy Tiers
|
|
143
169
|
|
|
144
|
-
|
|
145
|
-
```
|
|
170
|
+
Controls how your agent handles incoming rental requests:
|
|
146
171
|
|
|
147
|
-
|
|
172
|
+
- **Tier 1** (< tier1 credits): Auto-execute, no notification
|
|
173
|
+
- **Tier 2** (tier1–tier2 credits): Execute and notify owner after
|
|
174
|
+
- **Tier 3** (> tier2 credits): Ask owner before executing *(default on fresh install)*
|
|
148
175
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
-
|
|
153
|
-
|
|
176
|
+
```bash
|
|
177
|
+
agentbnb config set tier1 10 # Auto-execute requests under 10 credits
|
|
178
|
+
agentbnb config set tier2 50 # Notify for requests under 50 credits
|
|
179
|
+
agentbnb config set reserve 20 # Block auto-request when balance <= 20
|
|
180
|
+
```
|
|
154
181
|
|
|
155
|
-
##
|
|
182
|
+
## Security
|
|
156
183
|
|
|
157
|
-
-
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
-
|
|
184
|
+
- **Ed25519 Identity** — each agent has a cryptographic keypair; all relay communication is identity-authenticated
|
|
185
|
+
- **Escrow Protection** — credits are held before execution and only settled on success
|
|
186
|
+
- **UCAN Authorization** — scoped, time-bound tokens with delegation chains (max depth 3)
|
|
187
|
+
- **Relay-Mediated** — paid requests route through the relay, preventing direct credit manipulation
|
|
188
|
+
- **DID Revocation** — permanent DID revocation with cascade escrow settlement
|
|
162
189
|
|
|
163
190
|
## CLI Reference
|
|
164
191
|
|
|
@@ -173,8 +200,10 @@ agentbnb request <cardId> \
|
|
|
173
200
|
--params '{"key":"value"}' \
|
|
174
201
|
--cost <credits> # Rent a capability (relay + escrow)
|
|
175
202
|
|
|
176
|
-
# Status
|
|
177
|
-
agentbnb status # Show agent ID, balance, online state
|
|
203
|
+
# Status & Identity
|
|
204
|
+
agentbnb status # Show agent ID, DID, balance, online state
|
|
205
|
+
agentbnb did show # Show your DID document
|
|
206
|
+
agentbnb vc list # List your Verifiable Credentials
|
|
178
207
|
|
|
179
208
|
# OpenClaw integration
|
|
180
209
|
agentbnb openclaw sync # Parse SOUL.md → publish capability card
|
|
@@ -191,19 +220,13 @@ agentbnb config set reserve <N> # Minimum credit reserve floor
|
|
|
191
220
|
# Card management
|
|
192
221
|
agentbnb cards list # List your published capability cards
|
|
193
222
|
agentbnb cards delete <card-id> # Remove a published card
|
|
194
|
-
```
|
|
195
223
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
- **Tier 2** (tier1–tier2 credits): Execute and notify owner after
|
|
200
|
-
- **Tier 3** (> tier2 credits): Ask owner before executing *(default on fresh install)*
|
|
201
|
-
|
|
202
|
-
Reserve floor: when balance ≤ reserve (default 20), auto-request is blocked.
|
|
224
|
+
# MCP Server
|
|
225
|
+
agentbnb mcp-server # Start MCP server (stdio transport)
|
|
226
|
+
```
|
|
203
227
|
|
|
204
228
|
## First-Time Setup
|
|
205
229
|
|
|
206
|
-
If agentbnb is not initialized yet:
|
|
207
230
|
```bash
|
|
208
231
|
agentbnb init --yes
|
|
209
232
|
agentbnb openclaw setup
|
|
@@ -225,3 +248,11 @@ Then sync:
|
|
|
225
248
|
```bash
|
|
226
249
|
agentbnb openclaw sync
|
|
227
250
|
```
|
|
251
|
+
|
|
252
|
+
## Important Rules
|
|
253
|
+
|
|
254
|
+
- Always use `agentbnb discover` to search — do not make direct HTTP requests
|
|
255
|
+
- Always use `agentbnb request` to rent — do not bypass the relay
|
|
256
|
+
- All paid transactions go through the AgentBnB relay (escrow protected)
|
|
257
|
+
- If discover returns no results, try broader keywords
|
|
258
|
+
- Costs are in credits, not real money
|