Guard HTTP calls
The http action routes a permitted call through a configured project upstream.
The request names an upstream; it does not supply an arbitrary destination URL.
No Vercel connection is needed.
Configure a real-work project
Create a separate project after the connection check. Register an HTTPS upstream, its allowed methods and any credentials through the dashboard. Keep credentials on the relay side, not in model context.
Grant the agent http with narrow constraints, for example:
{
"allowedUpstreams": ["inventory"],
"allowedMethods": ["GET"],
"allowedPaths": ["/v1/items/*"],
"deniedPaths": ["/v1/items/private/*"],
"dailyCalls": 100
}
Set a matching policy and allowed source. Empty or omitted allowlists are
unrestricted within that dimension, not deny-all. approveMethods and
approvePaths can require a human for sensitive operations.
Request and execute
With the Node client configured for this project:
const request = await passport.authorize({
action: "http",
parameters: {
upstream: "inventory",
method: "GET",
path: "/v1/items/example",
amount: 1,
},
});
const decision = request.status === "pending"
? await passport.waitForDecision(request)
: request;
if (decision.status !== "allowed") {
throw new Error(`HTTP call stopped: ${decision.reasonCode}`);
}
const result = await passport.execute(request);
Use a relative path beginning with /, without spaces, query strings or
fragments. Supply query parameters separately as a string-valued query
object. Write methods can include a JSON body.
Bodies and parameters are recorded. Never embed API keys or unnecessary personal data in them. Configure upstream credentials separately.
The relay performs live authorization and destination checks before forwarding. Do not add a fallback that sends a denied call directly. The upstream must not be independently reachable with model-controlled credentials.