-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagents.html
More file actions
149 lines (135 loc) · 6.22 KB
/
Copy pathagents.html
File metadata and controls
149 lines (135 loc) · 6.22 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ZeroFuse — Agents & MCP</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header class="topbar">
<div class="inner">
<a class="wordmark" href="index.html">ZeroFuse</a>
<nav class="links">
<a href="index.html">Overview</a>
<a href="algorithm.html">Algorithm</a>
<a href="architecture.html">Architecture</a>
<a href="usage.html">Usage</a>
<a href="agents.html" class="active">Agents</a>
<a href="api.html">API</a>
</nav>
</div>
</header>
<main>
<section class="hero">
<span class="tag">agent-native</span>
<h1>Drive ZeroFuse from an agent</h1>
<p class="lead">ZeroFuse ships a Model Context Protocol (MCP) server. Any MCP-capable
harness — Claude Desktop, OpenAI Codex, Google AntiGravity — can point it at a model
and let it conduct trials, identify the refusal architecture, and abliterate it.</p>
</section>
<section>
<h2>Quiet by default</h2>
<p>An agent should not be flooded with optimization internals. ZeroFuse surfaces
only three high-level phases, and keeps everything else out of sight unless the
harness explicitly asks for it.</p>
<table>
<tr><th>Visibility</th><th>What it carries</th><th>How it's emitted</th></tr>
<tr>
<td><strong>Always shown</strong></td>
<td>"Identifying refusal architecture", "Conducting optimization trials",
"Abliterating model", and a final summary.</td>
<td>MCP <code>info</code> log + a progress fraction.</td>
</tr>
<tr>
<td><strong>Shown only on request</strong></td>
<td>Per-trial parameters, KL/refusal numbers, layer indices, dtype attempts,
batch sizes.</td>
<td>MCP <code>debug</code> log — visible only if the harness lowers its log
level, or if you pass <code>verbose: true</code>.</td>
</tr>
</table>
<div class="callout">
The mapping is deliberate: <strong>details live at debug level</strong>, so a
harness sees them <em>only when it is specifically interested</em>. The default
experience is "ZeroFuse is conducting trials… abliterating… done."
</div>
</section>
<section>
<h2>Install</h2>
<pre><code>pip install -e ".[mcp]" # installs the `zerofuse-mcp` server entry point</code></pre>
</section>
<section>
<h2>The <code>abliterate</code> tool</h2>
<p>The server exposes a single tool. The agent calls it; ZeroFuse runs the full
pipeline and returns a compact summary.</p>
<table>
<tr><th>Argument</th><th>Default</th><th>Meaning</th></tr>
<tr><td><code>model</code></td><td>—</td><td>Hugging Face id or local path. Required.</td></tr>
<tr><td><code>n_trials</code></td><td><code>100</code></td><td>Optimization trials.</td></tr>
<tr><td><code>output_dir</code></td><td><code>zerofuse-output</code></td><td>Where the model is written.</td></tr>
<tr><td><code>selection</code></td><td><code>auto</code></td><td><code>auto</code> / <code>min_refusals</code> / <code>knee</code>.</td></tr>
<tr><td><code>quantization</code></td><td><code>none</code></td><td><code>none</code> or <code>bnb_4bit</code> (load-only).</td></tr>
<tr><td><code>batch_size</code></td><td><code>16</code></td><td>Prompts per forward pass.</td></tr>
<tr><td><code>save</code></td><td><code>true</code></td><td><code>false</code> = report achievable metrics only.</td></tr>
<tr><td><code>verbose</code></td><td><code>false</code></td><td>Surface per-trial internals at <code>info</code> level.</td></tr>
</table>
<p class="muted">Returns: baseline vs. remaining refusals, KL divergence, the selected
trial, the Pareto point count, and the output path.</p>
</section>
<section>
<h2>Per-harness setup</h2>
<h3>Claude Desktop</h3>
<p>Add to <code>claude_desktop_config.json</code> (Settings → Developer → Edit Config):</p>
<pre><code>{
"mcpServers": {
"zerofuse": {
"command": "zerofuse-mcp"
}
}
}</code></pre>
<h3>OpenAI Codex</h3>
<p>Add an MCP server entry to your Codex config (<code>~/.codex/config.toml</code>):</p>
<pre><code>[mcp_servers.zerofuse]
command = "zerofuse-mcp"</code></pre>
<h3>Google AntiGravity</h3>
<p>Register the server in the agent/MCP settings, pointing at the same command:</p>
<pre><code>{
"mcpServers": {
"zerofuse": { "command": "zerofuse-mcp" }
}
}</code></pre>
<div class="callout">
If <code>zerofuse-mcp</code> isn't on the harness's <code>PATH</code>, use the
absolute path to the executable inside your virtual environment
(e.g. <code>/path/to/.venv/bin/zerofuse-mcp</code>).
</div>
</section>
<section>
<h2>What the agent sees</h2>
<p>A default run reports like this — phases only:</p>
<pre><code>▸ Identifying refusal architecture…
▸ Conducting optimization trials (target: 100)… [progress 100/100]
▸ Abliterating model…
✓ ZeroFuse complete: refusals 88→3/64, KL 0.0124 → zerofuse-output</code></pre>
<p>Lower the harness's MCP log level to <code>debug</code> (or pass
<code>verbose: true</code>) and the same run additionally streams per-trial
parameters, KL values, and layer choices.</p>
</section>
<section>
<h2>Non-MCP harnesses</h2>
<p>For agents that shell out instead of speaking MCP, the CLI mirrors the same
behavior:</p>
<pre><code># Machine-readable: a single JSON summary on stdout, phases on stderr
zerofuse --model <id> --json
# Only high-level phases
zerofuse --model <id> --quiet
# Everything
zerofuse --model <id> --verbose</code></pre>
<p>The <code>--json</code> payload matches the MCP tool's return value, so a wrapper
can parse one shape regardless of transport.</p>
</section>
</main>
<footer>ZeroFuse · Agents & MCP · quiet by default, detailed on request. · Created by <a href="https://osmAPI.com">osmAPI.com</a></footer>
</body>
</html>