Environment Configuration

Configure your environment variables to customize MindedJS behavior and connect to external services.

Environment Variables

Create a .env file in your project root to configure MindedJS:

# .env file

BROWSER_TASK_MODE

Controls the mode in which the browser task runs.

BROWSER_TASK_MODE=cloud
  • onPrem: Browser task runs on the customer's own infrastructure with a remotely installed on-premise kit.

  • localRun: Browser task runs locally where the SDK is running. Requires configuring a UV project and installing dependencies.

  • cloud: Browser task runs on the Minded platform. This is the default mode.

Platform Connection

MINDED_CONNECTION_TOKEN

Required to connect to the Minded platform for advanced features and monitoring. Each token is specific to the agent you are working on.

MINDED_CONNECTION_TOKEN=your-minded-connection-token

Your connection token is available on the Minded platform in the agent page within the GitHub integration popup. You can also use the npx command provided there to automatically set the minded token.

Example .env File

Here's a complete example of a .env file:

Loading Environment Variables

MindedJS automatically loads environment variables from your .env file. Make sure to:

  1. Create the .env file in your project root

  2. Add .env to your .gitignore file to keep credentials secure

  3. Never commit your .env file to version control

Runtime Environment Detection

MindedJS uses specific environment variables to determine the runtime environment and adjust behavior accordingly.

Environment Variables

Environment
NODE_ENV
MINDED_CLOUD
Description

Local Development

development

false

Running locally on developer machine

Minded Platform

development

true

Running in Minded platform sandbox

Staging Service

staging

true

Agent deployed as staging service

Production Service

production

true

Agent deployed as production service

Usage in Code

Environment-Specific Behavior

Next Steps

With your environment configured, continue to:

  1. Project Configuration - Set up your minded.json file

  2. Quick Start - Build your first agent

Last updated