MindSim Node.js / TypeScript SDK

MindSim Node.js SDK

The official MindSim TypeScript SDK allows you to programmatically create digital minds, populate them with conversational data, and run powerful simulations to get an accurate preview of how a person will think, feel, say, and act in any scenario.

Installation

The SDK requires Node.js version 24 or higher.

To install the SDK in your project:

$npm install mindsim

To install the CLI tool globally (useful for authentication):

$npm install -g mindsim

Why use the SDK?

While the MindSim API is accessible via standard HTTP requests, the SDK provides several distinct advantages for developers:

  1. Type Safety: Written in TypeScript, the SDK exports interfaces for all requests and responses (e.g., Mind, Simulation, SnapshotStatus). This ensures autocomplete support in your IDE and catches errors at compile time.
  2. Simplified File Uploads: The SDK abstracts away the complex logic required for uploading large training files, handling signed URLs, binary streams, and multipart form data automatically.
  3. Automatic Authentication: Integrates seamlessly with the CLI’s mindsim auth command for local development without needing to manually manage bearer tokens.
  4. Update Notifications: The SDK automatically checks for critical updates, ensuring you are using the most accurate simulation models available.