Node

createForge(options) returns the adapter for the import you chose: All adapters expose diagnostics() with enabled, configErrors, event counters, and OpenAPI status. enrichOpenApi(document) is available for build-time enrichment. Call await forge.shutdown() after your server drains to flush queued events.

Python

Forge(...) holds configuration and diagnostics. Install ForgeMiddleware outside the payment handler, or use forge.wrap(app) for plain ASGI. Inspect forge.diagnostics() for enabled, config_errors, and event counters. forge.enrich_openapi(document) supports build-time enrichment. ASGI lifespan shutdown closes the SDK automatically; call await forge.shutdown() if your host disables lifespan. Forge observes x402 behavior but does not verify signatures or settle payments. Keep your existing payment stack and facilitator.