Skip to main content
All Docs
FeaturesmyProp (AgentOS People Portal)Updated April 3, 2026

Environment Configuration Service

Environment Configuration Service

Available from v0.1.4

The Environment Configuration Service is a server-side utility that resolves the AgentOS API base URL and API key from environment variables based on the active deployment context. This ensures that development, staging, and production environments each connect to the correct AgentOS (letmc.com) API endpoint with the appropriate credentials — without any code changes between deployments.


How It Works

At runtime, the service reads the following environment variables and uses them to configure all outbound requests to the AgentOS API:

VariableDescription
LETMC_API_BASE_URLThe base URL of the AgentOS (letmc.com) API for the active environment
LETMC_API_KEYThe API key used to authenticate requests to the AgentOS API

The service resolves these values according to the deployment context (NODE_ENV or equivalent), routing traffic to the correct endpoint for each environment.


Supported Environments

EnvironmentPurpose
developmentLocal development — routes to the AgentOS development API
stagingPre-production testing — routes to the AgentOS staging API
productionLive portal — routes to the AgentOS production API

Configuration

Set the following environment variables in each deployment environment. Values will differ per environment.

# Development
LETMC_API_BASE_URL=https://dev-api.letmc.com
LETMC_API_KEY=your_development_api_key

# Staging
LETMC_API_BASE_URL=https://staging-api.letmc.com
LETMC_API_KEY=your_staging_api_key

# Production
LETMC_API_BASE_URL=https://api.letmc.com
LETMC_API_KEY=your_production_api_key

Security note: Never commit LETMC_API_KEY values to source control. Use your hosting provider's secrets management or a .env file excluded from version control.


Why This Matters

Prior to v0.1.4, API credentials and endpoint URLs needed to be managed manually per deployment. The Environment Configuration Service centralises this logic server-side, so:

  • The correct AgentOS endpoint is always used for the active environment.
  • API keys are resolved from environment variables — not hardcoded in the codebase.
  • Deployments to staging and production require only environment variable changes, not code changes.

Related