← Back to Plugins
Tools

Weft Openclaw

spranab By spranab 👁 31 views ▲ 0 votes

Weft plugin for OpenClaw — land agent work through a verification gate. npm i @weftgate/openclaw-weft

GitHub

Install

npm install @weftgate/openclaw-weft

Configuration Example

{ "plugins": { "entries": { "weft": { "enabled": true,
    "config": { "hub": "http://127.0.0.1:8747" } } } } }

README

# Weft plugin for OpenClaw

Give your OpenClaw agent a **verification gate** to land work through.

[Weft](https://weftgate.com) is an execution ledger for autonomous coding
agents: an agent proposes a change, and it lands only if the gate's evidence
and policy pass. Everything that lands carries signed provenance — which
model, under whose delegated authority — back to a human authority key.

## Install

```bash
npm install @weftgate/openclaw-weft
```

Then enable it in your OpenClaw config:

```jsonc
{ "plugins": { "entries": { "weft": { "enabled": true,
    "config": { "hub": "http://127.0.0.1:8747" } } } } }
```

Don't have a hub? One command, no signup:

```bash
git clone https://github.com/spranab/weft && cd weft
cargo run --release -p weftd             # console on :8747
```

## Tools

| Tool | What it does |
|---|---|
| `weft_status` | trunk sequence, queue depth, approvals due, this agent's key |
| `weft_intents` | the machine-readable work graph |
| `weft_workspace` | the head tree as **numbered lines**, with untrusted-data hedges |
| `weft_submit` | edit by **line number** → signed change → `landed` / `pending_approval` / `rejected` |
| `weft_provenance` | walk any change to the authority root |

## First run: the delegation loop

The plugin mints its own Ed25519 key (`~/.openclaw/weft-agent.key`) and the
first write is **refused**:

```
no live capability granting 'publish_change' is delegated to this agent key
(57a4a022…). Ask a human to open the Weft console → Access → mint a
Contributor capability for that key.
```

That refusal is the onboarding instruction. A human opens the console, pastes
the key, picks Contributor and an expiry, signs — and the agent's next
submission lands. Reads work throughout.

This is the security model in one interaction: **agents don't get accounts,
they get scoped, expiring, revocable capabilities.**

## Config

| key | meaning |
|---|---|
| `hub` | hub base URL (default `http://127.0.0.1:8747`, or `WEFT_HUB`) |
| `keyPath` | agent key seed (default `~/.openclaw/weft-agent.key`, or `WEFT_KEY`) |
| `model` | model tag recorded in provenance (default `openclaw`) |
| `timeoutMs` | per-request timeout (default 15000) |
| `submitTimeoutMs` | how long to await the gate's verdict (default 20000) |

## Security posture, by construction

- no subprocesses, no eval, no filesystem access beyond the agent key;
- network I/O goes exclusively to the configured hub;
- the Ed25519 private key never leaves the machine — the hub returns a digest
  to sign and only ever receives signatures;
- workspace files whose authors lack the `instruct` capability are surfaced
  with an explicit untrusted-data hedge (Weft RFC §12.1), so repository text
  cannot quietly become agent instructions.

## Status

Written against the OpenClaw plugin SDK and typechecked against it. The
[Hermes plugin](https://github.com/spranab/weft-hermes-plugin) is the path
exercised end to end against a live gate so far — if you run this one inside
an OpenClaw host, issues and reports are very welcome.

Prefer zero integration code? Weft ships an MCP server and OpenClaw speaks
MCP — see [all three paths](https://github.com/spranab/weft/tree/main/integrations).

MIT · [weftgate.com](https://weftgate.com) · [source](https://github.com/spranab/weft)
tools

Comments

Sign in to leave a comment

Loading comments...