Conduit

Conduit Developer Docs

A comprehensive manual on how docs, tools, and agents can format Conduit requests without requiring a live handshake first.

1. Quickstart: Hello World

If Conduit is running on your machine, copy the block below and run a clipboard check from Conduit Control. Conduit will detect the request, ask for local review when needed, and then run it locally.

Conduit Fenced Block
```conduit
{
  "v": "1",
  "source": { "kind": "docs", "trust": "untrusted" },
  "permissions": [{ "kind": "shell" }],
  "shell": "echo 'Hello, Conduit World!'"
}
```

Once approved, Conduit executes the shell command and places the rendered result directly into your clipboard. Paste your clipboard into the box below to verify it worked.

2. Who This Is For

Conduit requests are useful any time a user should execute code locally with clear review and fast feedback. A request can be copied as an exact envelope, rendered as a fenced block, or opened through a conduit:// link.

At the limit, Conduit enables useful flows that do not fit normal installer packages or browser permission boundaries. For example:

Without a trusted live session, Conduit does not silently execute. It creates a local one-request review so the user can inspect the source, permissions, and actions first.

3. Request Envelope

Use a single JSON object with stable action IDs. Clipboard-origin requests should be raw JSON or one fenced conduit block, with no extra prose inside the copied block.

Conduit Request
{
  "schema": "conduit.request.v1",
  "source": { "kind": "docs", "trust": "untrusted" },
  "permissions": [],
  "title": "Show Conduit help",
  "actions": [
    { "id": "help", "tool": "conduit.help", "args": {} }
  ]
}

4. Fenced Blocks

Agents and docs can show a request as a single fenced block. The copied block should contain only the JSON request.

Conduit Fenced Block
```conduit
{
  "schema": "conduit.request.v1",
  "source": { "kind": "docs", "trust": "untrusted" },
  "permissions": [],
  "title": "Show Conduit help",
  "actions": [
    { "id": "help", "tool": "conduit.help", "args": {} }
  ]
}
```

5. Compact Requests

For small requests, Conduit accepts a compact dialect. The runtime expands shortcuts into normal tool actions before policy evaluation.

Conduit Compact Request
{
  "v": "1",
  "source": { "kind": "docs", "trust": "untrusted" },
  "permissions": [],
  "do": "help"
}

7. Paired Sessions

A paired session adds a live sessionId and nonce. Conduit validates the nonce before executing and returns a replacement nonce with successful results.

Conduit Paired Session
{
  "schema": "conduit.request.v1",
  "source": { "kind": "chat", "trust": "paired-session" },
  "permissions": [
    { "kind": "filesystem", "scope": "project", "access": "read" }
  ],
  "sessionId": "sess_...",
  "nonce": "call_...",
  "actions": [
    {
      "id": "list_project",
      "tool": "file.list",
      "args": { "path": "." }
    }
  ]
}

8. Agent Formatting