Set FORGE_API_KEY on the server. On Node, the setup looks like this:
Install: npm install @forgeintel/sdk@0.5.0-beta.17. On Bun, Deno, or Workers, supply the corresponding server-side secret from that runtime’s configuration rather than process.env. With agentContext: true, Forge asks agents for their name and search query (optional); { required: true } requires them before payment. Both switches are off by default. Keep payment terms and settlement in your existing x402 integration. Check the connection.