Workbench developer docs中文

How it works

Your company's keys never leave Workbench

Your company's keys for its vendors (Company keys) are stored sealed in Workbench. A call from wb or your own app goes to Workbench's pass-through:

https://desktop-api.wbench.io/v1/proxy/<connection>/<the vendor's own path>
  1. You send your Workbench token, never a vendor key.
  2. Workbench checks who you are, that your company has the CLI on, that you are one of its admins, and that the spending limits have room.
  3. It checks that the address is one of the connection's own hosts, over HTTPS. Any other host is refused before anything is sent, so the pass-through can't reach arbitrary addresses.
  4. It adds your company's key and sends the request to the vendor.
  5. It checks the whole answer before passing it back. An answer that holds the key in any form is withheld, and a vendor's error is turned into a Workbench error, because vendors sometimes echo keys in their errors. A streamed answer (stream: true) is checked the same way an event at a time, and ends at the first event that holds the key.

The key is never in an answer, an error, a log line or your terminal. Only your company's own keys are used.

Spend limits

Every call counts against your company's monthly AI spending limit and your own. Model calls (Anthropic, OpenAI) go through Workbench's AI relay and cost what the model call costs; other connections cost nothing. When a limit is reached, calls are refused until the next month or until a company admin raises the limit; the refusal says which limit.

Every call is logged

Every call, and every refusal, is logged for your company: who made it, the connection, the method, the path (without the query), the status and the cost. Company admins see it in Admin › Tool calls. The log is kept for a year.

Your token

wb login gives you a personal token. It acts as you, in your company, with your role, for 90 days. It stops working at once if you revoke it, if you stop being a company admin, or if your company turns the CLI off. Treat it like a password: anyone holding it can make calls as you.

Not in the trial