initialize() call.
Install
@fractalresearch/loop, fractal-loop) still work but are deprecated.
Both SDKs run on macOS, Linux, and Windows with no native dependencies: the Node SDK is pure TypeScript (Node 18+), and the Python SDK is pure Python (3.10+). For setting BELVEDIR_API_KEY per operating system, see Environment variables.
Initialize
The SDK patches your LLM client the momentinitialize() runs, so it must run before the LLM SDK is imported. In Next.js use instrumentation.ts at the project root; see the Next.js guide. In a plain CommonJS Node process, call it at the top of your entry file:
.mjs, or "type": "module" in package.json), always pass your LLM SDKs via instrumentModules: static imports hoist above the initialize() call and dynamic import() bypasses the require hook, so auto-instrumentation produces no LLM spans there, with no warning. The same applies to bundled environments. See Configuration.
Next steps
- Configuration: every option accepted by
initialize(), and the full SDK API. - Providers: every LLM provider we auto-instrument.
- Python SDK: same concepts, snake_case, context managers.