Skip to main content

SDK installation

The official Node/TypeScript SDK is @withfoundry/sdk. It talks to https://api.withfoundry.ai and uses the standard response envelope.

Install

Configure

Create a client with your API key. Prefer environment variables over hardcoding.
Optional: override the base URL (e.g. for self-hosting or tests):

Usage

  • Memory: foundry.memory.write(), foundry.memory.search(), foundry.memory.getContext() — see Memory Engine.
  • Security: foundry.security.scanRepo(), foundry.security.getScanResult() — see Security Scanner.
All methods return Promises. Response shape follows the API envelope: { data, meta } on success; errors are thrown or returned depending on SDK design (check SDK reference).

TypeScript

The package ships with types. Use as usual in TS:
Next: SDK reference for method signatures and options.