-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAGENT_SETUP.rbmem
More file actions
258 lines (233 loc) · 7.77 KB
/
Copy pathAGENT_SETUP.rbmem
File metadata and controls
258 lines (233 loc) · 7.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
rbmem# RBMEM v1.3 - Rust-Brain Memory Format
meta:
version: 1.3
purpose: "RBForge-agent-setup"
generated_at: "2026-04-29T00:00:00Z"
last_updated: "2026-04-29T00:00:00Z"
valid_until: null
created_by: "RBForge"
default_expiry_days: null
compact_mode: minified
[SECTION: rbforge.agent_setup.overview]
type: hermes:memory
graph:
node_type: "agent_setup"
relations:
- to: "rbforge.agent_setup.rust_brain"
type: "requires"
- to: "rbforge.agent_setup.install"
type: "contains"
- to: "rbforge.agent_setup.runtime_policy"
type: "contains"
- to: "rbforge.agent_setup.forge_protocol"
type: "contains"
temporal:
created_at: "2026-04-29T00:00:00Z"
updated_at: "2026-04-29T00:00:00Z"
expires_at: null
content: |
RBForge is a Rust-Brain/RBMEM-based runtime tool creation system.
Use this RBMEM file as the agent-facing setup brief.
Core rule:
- RBForge tools must be persisted through Rust-Brain RBMEM.
- Use the Rust-Brain rbmem CLI for validation, reads, writes, and inspection.
- Do not treat this as a plain Markdown-only setup process.
Repositories:
- RBForge: https://github.com/DJLougen/RBForge
- Rust-Brain: https://github.com/DJLougen/Rust-Brain
[END SECTION]
[SECTION: rbforge.agent_setup.rust_brain]
type: hermes:memory
graph:
node_type: "dependency"
relations:
- to: "rbforge.agent_setup.install"
type: "enables"
- to: "rbforge.agent_setup.health_check"
type: "validates"
temporal:
created_at: "2026-04-29T00:00:00Z"
updated_at: "2026-04-29T00:00:00Z"
expires_at: null
content: |
Rust-Brain is the required durable memory backend for RBForge.
Setup requirement:
- Install or build rbmem from https://github.com/DJLougen/Rust-Brain.
- Put rbmem on PATH, or set RBMEM_CLI to the rbmem executable path.
- Use RBMEM files, not ad hoc JSON or Markdown, for durable agent setup.
Useful Rust-Brain commands:
- rbmem --help
- rbmem validate memory.rbmem
- rbmem read memory.rbmem tools.registry
- rbmem read memory.rbmem tools.custom.<tool_name>
If rbmem is unavailable, do not claim RBForge persistence is active.
[END SECTION]
[SECTION: rbforge.agent_setup.install]
type: hermes:memory
graph:
node_type: "procedure"
relations:
- to: "rbforge.agent_setup.rust_brain"
type: "requires"
- to: "rbforge.agent_setup.health_check"
type: "verified_by"
temporal:
created_at: "2026-04-29T00:00:00Z"
updated_at: "2026-04-29T00:00:00Z"
expires_at: null
content: |
Install RBForge from the repository root:
python -m pip install -e .[dev]
Configure Rust-Brain rbmem:
export RBMEM_CLI=/path/to/rbmem
When running from source:
export PYTHONPATH=src
Optional Hermes bridge:
python scripts/install_hermes_bridge.py
The bridge reads HERMES_HOME, HERMES_RBMEM, and RBMEM_CLI when set.
Keep setup path-neutral. Do not write user-specific paths into public docs.
[END SECTION]
[SECTION: rbforge.agent_setup.runtime_policy]
type: hermes:memory
graph:
node_type: "policy"
relations:
- to: "rbforge.agent_setup.forge_protocol"
type: "constrains"
- to: "rbforge.agent_setup.review_policy"
type: "contains"
temporal:
created_at: "2026-04-29T00:00:00Z"
updated_at: "2026-04-29T00:00:00Z"
expires_at: null
content: |
Forge a tool only when all conditions are true:
- The missing capability is reusable.
- The implementation can be small and deterministic.
- Inputs can be described by a strict JSON object schema.
- Output can be a JSON-serializable dictionary.
- The tool does not need secrets or credentials.
- The tool does not require unsafe filesystem, shell, memory, or network access.
Do not forge tools for one-off work.
Do not forge tools that handle credentials, secrets, or tokens.
Do not bypass Rust-Brain RBMEM persistence.
[END SECTION]
[SECTION: rbforge.agent_setup.forge_protocol]
type: json
graph:
node_type: "protocol"
relations:
- to: "rbforge.agent_setup.runtime_policy"
type: "governed_by"
- to: "rbforge.agent_setup.review_policy"
type: "uses"
temporal:
created_at: "2026-04-29T00:00:00Z"
updated_at: "2026-04-29T00:00:00Z"
expires_at: null
content: |
{
"tool_creation_sequence": [
"Search tools.registry for an existing suitable tool.",
"If none exists, decide whether the missing capability is reusable.",
"If reusable and safe, call forge_tool with a complete Python run(...) implementation.",
"Provide a strict JSON object schema, category, expected output keys, and sample args when needed.",
"If forge_tool returns status=registered, call run_forged_tool with task arguments.",
"If forge_tool returns review_queued, report that review is needed.",
"If validation fails, fix the proposal once or abandon the forge.",
"Prefer the registered tool on later tasks."
],
"forge_status_handling": {
"registered": "Tool is active; run it with run_forged_tool.",
"review_queued": "Do not run automatically; request review.",
"sandbox_failed": "Inspect sandbox output and fix implementation.",
"validation_failed": "Fix schema, name, category, or source."
},
"required_tool_shape": {
"language": "python",
"entrypoint": "def run(...) -> dict",
"schema": "strict JSON object schema",
"output": "JSON-serializable dictionary",
"persistence": "Rust-Brain RBMEM"
},
"low_impact_categories": [
"analysis",
"debugger",
"profiler",
"refactor",
"report"
],
"high_impact_categories": [
"filesystem",
"memory",
"shell",
"web_bubble"
]
}
[END SECTION]
[SECTION: rbforge.agent_setup.review_policy]
type: hermes:memory
graph:
node_type: "policy"
relations:
- to: "rbforge.agent_setup.forge_protocol"
type: "constrains"
temporal:
created_at: "2026-04-29T00:00:00Z"
updated_at: "2026-04-29T00:00:00Z"
expires_at: null
content: |
High-impact categories require review:
- filesystem
- memory
- shell
- web_bubble
If a forged tool returns review_queued:
- Do not run it automatically.
- Report the section path and reason.
- Wait for explicit human approval or integration policy.
[END SECTION]
[SECTION: rbforge.agent_setup.minimal_instruction]
type: hermes:memory
graph:
node_type: "agent_instruction"
relations:
- to: "rbforge.agent_setup.forge_protocol"
type: "summarizes"
- to: "rbforge.agent_setup.runtime_policy"
type: "summarizes"
temporal:
created_at: "2026-04-29T00:00:00Z"
updated_at: "2026-04-29T00:00:00Z"
expires_at: null
content: |
Use RBForge for reusable missing capabilities. Before forging, prefer existing
tools in tools.registry. When forging, provide a complete Python run(...)
implementation, a strict JSON object schema, a category, expected output keys,
and representative sample arguments if defaults are insufficient. Run a forged
tool only when forge_tool returns status=registered. Treat filesystem, memory,
shell, and web_bubble categories as review-required. Never forge tools that
handle secrets, credentials, arbitrary shell execution, destructive file writes,
or one-off work. Persist and inspect durable setup through Rust-Brain RBMEM.
[END SECTION]
[SECTION: rbforge.agent_setup.health_check]
type: hermes:memory
graph:
node_type: "procedure"
relations:
- to: "rbforge.agent_setup.install"
type: "verifies"
- to: "rbforge.agent_setup.rust_brain"
type: "verifies"
temporal:
created_at: "2026-04-29T00:00:00Z"
updated_at: "2026-04-29T00:00:00Z"
expires_at: null
content: |
Health check:
- python -m compileall -q src tests examples scripts
- pytest -q
- rbmem validate memory.rbmem
Then forge a small temporary tool against a temporary RBMEM file.
If the tool registers and run_forged_tool returns ok=true, RBForge is ready.
[END SECTION]