Integrations.passthrough relays one HTTP call to a provider’s own REST API through the integration the agent is connected to. The platform adds the connection’s credentials, your code never sees them, and the provider enforces the OAuth scopes the connection was granted. Every connected integration also gives the model a <type>_passthrough tool with the same fields, except that its body field is named body. Available in tools, jobs, webhooks, triggers, processors, and workflow code steps.
Verified against lua-cli 3.33.0.
Quick example
Provider errors come back instatus; only a call that never reached the provider throws.
Methods
passthrough(integrationType, request)
Makes one provider API call through the agent’s connection for that integration type.string
required
The integration type as
lua integrations connect --integration <type> names it, for example github, linear, or googlemail.IntegrationPassthroughMethod
required
One of
GET, POST, PUT, PATCH, DELETE, HEAD.string
required
The provider path after the provider’s base URL, for example
repos/acme/app/pulls/42/files on GitHub or v1.0/me on Microsoft Graph. At most 2,048 characters. A leading / is tolerated, a ?query inside the path is merged into query, and . or .. segments are rejected.Record<string, string | number | boolean>
Query-string parameters, forwarded as given.
unknown
Request body. Objects and arrays are sent as JSON with
Content-Type: application/json unless you set that header; a string is sent verbatim. Ignored on GET and HEAD.Record<string, string>
Extra request headers, forwarded lower-cased.
Authorization, Cookie, Host, and hop-by-hop headers are dropped; the platform manages authentication.IntegrationPassthroughResponse
name is IntegrationPassthroughError; it carries code, statusCode (alias status; 0 in lua test when the platform itself could not be reached), and, when the platform’s own request to the integration layer failed, vendor, vendorStatus, requestId, and retryAfterSeconds. retryAfterSeconds is present only when a blind retry is safe, that is for GET and HEAD.
An answered provider 5xx or 429 is not thrown; classify
status on the envelope yourself. Deployed agents can also throw passthrough_unavailable (Integrations.passthrough is not available in this runtime) when the runtime has no relay.
--scope agent or a personal --scope user connection attached to it. In lua test, a personal connection is used only when it is yours. Paused and disconnected connections are skipped; when several qualify, an active one wins, then the most recently updated. Every call, including a refused one, is audit-logged with identifiers, status, and latency; bodies are never logged.
Types
IntegrationPassthroughRequest, IntegrationPassthroughResponse, and IntegrationPassthroughMethod are exported from lua-cli. The thrown error class is not; branch on name and code.
See also
- Call an integration’s API directly — how-to with relay errors and a local test
- Connect an integration —
lua integrations connect,--scope, and--scopes - About integrations — integrations, MCP tools, and passthrough
lua integrations— list, connect, and disconnect connections

