You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zhub is a substrate, not a product specific to any one AI or device.
remove the violations:
examples/zai_publish.py — belonged in the ZAI repo
examples/ZAI_PUBLISH.md — same
kotlin/.../zhub/loki/ — Loki bridge belonged in Loki repo
kotlin/LOKI_INTEGRATION.md — same
scrub remaining named-user references in README, mcp_server docstring,
zhub/__init__.py, examples/connect_demo.py, examples/orchestrate_demo.py.
rephrase as "any AI / any client / a generic device" — neutral language
that anyone (openclaw, hermes, future-projects-not-yet-imagined) can
read without the substrate having opinions about them.
generic Kotlin client primitives (Manifest, Protocol, Connection)
stay — those are substrate. anyone embedding zhub can use them; the
Loki-specific bridge is now Loki repo's job.
122/122 pytest still green.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ In Production
8
8
9
9
## What this is
10
10
11
-
Today, when you build a custom AI (ZAI, an autonomous agent, a fine-tuned local model, anything), exposing it to the rest of the world means writing your own auth, your own tunnel, your own API gateway, your own client SDK. And once exposed, your AI has no idea who's connected to it or what those clients can do.
11
+
Today, when you build a custom AI (an autonomous agent, a fine-tuned local model, an MCP server, anything), exposing it to the rest of the world means writing your own auth, your own tunnel, your own API gateway, your own client SDK. And once exposed, your AI has no idea who's connected to it or what those clients can do.
12
12
13
13
`zhub` is a tiny library + a tiny hub server that fixes both halves at once:
# the client now exposes send_whatsapp, get_battery to the AI
46
46
# the AI can invoke those capabilities through the hub
@@ -213,15 +213,15 @@ Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_conf
213
213
"args": [
214
214
"-m", "zhub.mcp_server",
215
215
"--hub", "https://hub.example.com",
216
-
"--ai", "zai",
216
+
"--ai", "my-ai",
217
217
"--key", "zk_xxxxxxxxxxxxxxxxx"
218
218
]
219
219
}
220
220
}
221
221
}
222
222
```
223
223
224
-
Restart Claude Desktop and the AI shows up as a tool named `chat`. **Plus every capability the AI's connected clients expose** — `get_battery`, `send_whatsapp`, anything Loki or another client `connect()`s with — surfaces as its own MCP tool, callable directly from Claude. Same setup works for Cursor, Cline, and any other MCP host.
224
+
Restart Claude Desktop and the AI shows up as a tool named `chat`. **Plus every capability the AI's connected clients expose** — `get_battery`, `send_whatsapp`, anything any client `connect()`s with — surfaces as its own MCP tool, callable directly from Claude. Same setup works for Cursor, Cline, and any other MCP host.
225
225
226
226
For scripts that want to invoke a connected capability without going through chat, the hub also exposes a direct HTTP endpoint:
The publisher prints a `zk_` key on startup. Pocket / Loki / curl / Claude Desktop all reach it via `<hub>/<name>/v1/chat/completions` — restart the publisher with a different brain and **the key stays the same** (re-registration via persistence). External clients see no change; the brain underneath silently swaps.
257
+
The publisher prints a `zk_` key on startup. Any client (browser BYOK app, native client, curl, Claude Desktop) reaches it via `<hub>/<name>/v1/chat/completions` — restart the publisher with a different brain and **the key stays the same** (re-registration via persistence). External clients see no change; the brain underneath silently swaps.
258
258
259
259
Adapters live in `zhub/brains/` and implement a tiny `BrainAdapter` interface (one async streaming method). Adding a new brain is ~80 lines.
0 commit comments