ts/docs/internal/configuration.md
This guide explains how to configure the Composio SDK using environment variables and initialization options.
The SDK supports several environment variables for configuration:
COMPOSIO_API_KEY: Your Composio API key
COMPOSIO_BASE_URL: Custom API base URL
https://backend.composio.devCOMPOSIO_LOG_LEVEL: Controls the verbosity of SDK logs
silent, error, warn, info, debuginfosilent: No logserror: Only critical errorswarn: Warnings and errorsinfo: General information, warnings, and errorsdebug: Detailed debugging informationNODE_ENV: Environment mode
development, production, testDEVELOPMENT: Development mode flag
CI: CI environment flag
COMPOSIO_DISABLE_TELEMETRY: Disable telemetry collection
"true" to disable"false"allowTracking initialization optionWhen initializing the SDK, you can provide configuration through the constructor:
const composio = new Composio({
apiKey: 'your-api-key', // Override COMPOSIO_API_KEY
baseURL: 'custom-url', // Override COMPOSIO_BASE_URL
allowTracking: false, // Disable telemetry
allowTracing: true, // Enable tracing
provider: new CustomProvider(), // Custom provider
host: 'mcp', // host where the sdk is being used
});
When multiple configuration sources are present, the SDK follows this priority order:
# Development environment with debug logging
export NODE_ENV=development
export COMPOSIO_LOG_LEVEL=debug
export COMPOSIO_API_KEY=your-api-key
# Production environment with minimal logging
export NODE_ENV=production
export COMPOSIO_LOG_LEVEL=error
export COMPOSIO_API_KEY=your-api-key
# Test environment with telemetry disabled
export NODE_ENV=test
export COMPOSIO_DISABLE_TELEMETRY=true
export COMPOSIO_API_KEY=your-test-api-key
Environment-specific Configuration
Security
Telemetry
Error Handling