Skip to main content
Loom is the product. You author an agent in the dashboard, then your users talk to it through your app. A run is one conversation turn. The agent may ask a question, call a tool, or wait for you to confirm that a side effect happened. Every run has a trace — what the agent did, in order.

Two integration modes

Direct

The browser talks to Patchwork. You mint a short-lived session token on your backend. Best when the agent is in your product UI.

Relay

Your backend talks to Patchwork with a workspace API key. Best for Slack, WhatsApp, email, or any channel you already own.
Same agents. Same traces. Same patches. Different caller.

Objects

Run states

React SDK

If the agent lives in a React app, start with @usepatchwork/react:
useAgent opens a thread, posts messages, and streams the run over Pusher. You still mint the session token on your backend — the SDK does not hold a workspace key.
The SDK is the fastest path for a product UI. Direct and relay are the HTTP contracts if you are not on React, or if you need a channel Patchwork does not render.