#Use a service without handing over its credential
A Flow may need a private document, a notification endpoint, or a model API. Give its invocation slot an HTTP grant: the method builds and interprets requests, while Jig keeps the credential and limits where those requests can go.
Use the published Jig and FLOW SDK alphas through the installation guide, with their reviewed contracts.
#Fetch a reference document
Put an exact copy of the HTTP Request descriptor
in flows/reference/http.json. Declare it in flows/reference/FLOW.meta.json:
flows/reference/FLOW.ts uses the ordinary FLOW SDK:
Use ordinary dependency preparation for @jigging/flow.
The Binding proposes an exact endpoint and references its credential:
Supply DOCUMENT_TOKEN through the operator environment, then review and run
from the Jig project with the Flow and Binding included in its membership:
The result's output.document contains the fetched text. To use another
document, change the Binding grant's URL and review the changed permission.
Review shows the exact destination and permission. A missing resource or credential is unavailable; the package cannot manufacture either by declaring them. A child can call the same configured Binding through an exact slot.
#Write an independently replaceable API client
For a POST grant, the Flow supplies a JSON body. This also supports an Agent
transport implemented as ordinary Flow code: it constructs the provider's
request and interprets the provider's response. Jig need not know that API's
prompt or result format.
Give this Flow's http slot a grant with kind: "http" and method: "POST". The
operator grants one exact POST endpoint and can use bodySchema to require
a particular model, cap max_tokens, and reject extra fields. The method can
be edited or replaced without modifying Jig, but its input still has to fit
that independently enforced policy. Returning an HTTP response does not prove
the Agent's answer is correct. This is a finite JSON API client, not native
ACP continuation or the full Agent Run contract.
#Know what the permission permits
Only the trusted request worker receives the credential and network access. Flow code cannot select another URL, change the method, follow a redirect, read the secret or open its own network connection. The approved service must itself be trusted with that credential; no host can reliably detect an encoded secret returned by a hostile service.
Check the returned HTTP status and validate the body. A network failure may occur after a remote action, so Jig does not retry it. Cancelling stops local owned work, not effects the remote server already accepted. Admit a grant removal to prevent new Runs from receiving it. Cancel active work to settle its existing authority snapshot.
For shared policy, use optional named grants.
See HTTP Request for exact bounds and error behavior.