Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Configuration

Here you can find all available configuration options using ENV variables.

DockerComposeSettings

These environment variables are used to configure the default Docker Compose in the MADSci example lab.

NameTypeDefaultDescriptionExample
USER_IDinteger1000The user ID to use for the MADSci services inside Docker containers. This should match your host user ID to avoid file permission issues. If not set, the default value used by the container is 9999.1000
GROUP_IDinteger1000The group ID to use for the MADSci services inside Docker containers. This should match your host group ID to avoid file permission issues. If not set, the default value used by the container is 9999.1000
REPO_PATHstring"./"The path to the MADSci repository on the host machine. This is mounted into the Docker containers to provide access to the codebase."./"
REDIS_PORTinteger6379The port on the host machine to bind the Redis service to. This allows other services to connect to Redis running inside the Docker container.6379
MONGODB_PORTinteger27017The port on the host machine to bind the MongoDB service to. This allows other services to connect to MongoDB running inside the Docker container.27017
POSTGRES_PORTinteger5432The port on the host machine to bind the PostgreSQL service to. This allows other services to connect to PostgreSQL running inside the Docker container.5432
MINIO_PORTinteger9000The port on the host machine to bind the MinIO service to. This allows other services to connect to MinIO running inside the Docker container.9000
MINIO_CONSOLE_PORTinteger9001The port on the host machine to bind the MinIO console to. This allows other services to connect to the MinIO console running inside the Docker container.9001

MadsciDeveloperSettings

Developer-focused settings for MADSci behavior.

These settings control development experience features like rich tracebacks. All settings use the MADSCI_ prefix for environment variables.

Environment Variables: MADSCI_DISABLE_RICH_TRACEBACKS: Set to true to disable rich tracebacks (default: false, rich tracebacks are enabled) MADSCI_RICH_TRACEBACKS_SHOW_LOCALS: Set to true to show local variables in tracebacks (default: false for security - can leak secrets)

Note: show_locals is disabled by default to prevent accidental exposure of sensitive data (tokens, passwords) that may be present in local variables during exceptions.

Environment Prefix: MADSCI_

NameTypeDefaultDescriptionExample
MADSCI_DISABLE_RICH_TRACEBACKSbooleanfalseDisable rich traceback handler for exception output.false
MADSCI_RICH_TRACEBACKS_SHOW_LOCALSbooleanfalseShow local variables in tracebacks. Disabled by default for security - can leak sensitive data.false

MadsciContext

Base class for MADSci context settings.

NameTypeDefaultDescriptionExample
LAB_SERVER_URLAnyUrl | NoneTypenullThe URL of the lab server.null
EVENT_SERVER_URLAnyUrl | NoneTypenullThe URL of the event server.null
EXPERIMENT_SERVER_URLAnyUrl | NoneTypenullThe URL of the experiment server.null
DATA_SERVER_URLAnyUrl | NoneTypenullThe URL of the data server.null
RESOURCE_SERVER_URLAnyUrl | NoneTypenullThe URL of the resource server.null
WORKCELL_SERVER_URLAnyUrl | NoneTypenullThe URL of the workcell server.null
LOCATION_SERVER_URLAnyUrl | NoneTypenullThe URL of the location server.null

DataManagerSettings

Settings for the MADSci Data Manager.

Environment Prefix: DATA_

NameTypeDefaultDescriptionExample
DATA_SERVER_URLAnyUrl"http://localhost:8004/"The URL of the data manager server."http://localhost:8004/"
DATA_MANAGER_IDstring | NoneTypenullUnique identifier for this manager instance. If not set, a new ULID is generated at runtime. The registry system provides the stable ID thereafter.null
DATA_MANAGER_TYPEManagerType | NoneType"data_manager"The type of manager."data_manager"
DATA_RATE_LIMIT_ENABLEDbooleantrueEnable rate limiting for API endpoints.true
DATA_RATE_LIMIT_REQUESTSinteger300Maximum number of requests allowed per long time window.300
DATA_RATE_LIMIT_WINDOWinteger60Long time window for rate limiting in seconds.60
DATA_RATE_LIMIT_SHORT_REQUESTSinteger | NoneType50Maximum number of requests allowed per short time window for burst protection. If None, short window limiting is disabled.50
DATA_RATE_LIMIT_SHORT_WINDOWinteger | NoneType1Short time window for burst protection in seconds. If None, short window limiting is disabled.1
DATA_RATE_LIMIT_CLEANUP_INTERVALinteger300Interval in seconds between cleanup operations to prevent memory leaks.300
DATA_RATE_LIMIT_EXEMPT_IPSarray | NoneTypenullList of IP addresses exempt from rate limiting. Defaults to localhost IPs (127.0.0.1, ::1) if not specified.null
DATA_UVICORN_WORKERSinteger | NoneTypenullNumber of uvicorn worker processes. If None, uses uvicorn default (1).null
DATA_UVICORN_LIMIT_CONCURRENCYinteger | NoneTypenullMaximum number of concurrent connections. If None, no limit is enforced.null
DATA_UVICORN_LIMIT_MAX_REQUESTSinteger | NoneTypenullMaximum number of requests a worker will process before restarting. Helps prevent memory leaks.null
DATA_ENABLE_REGISTRY_RESOLUTIONbooleantrueWhen true, resolve manager_id from the ID Registry at startup for stable identity across restarts.true
DATA_MANAGER_NAMEstring | NoneTypenullName for this manager instance. Used for registry lookup and display.null
DATA_MANAGER_DESCRIPTIONstring | NoneTypenullHuman-readable description of this manager instance.null
DATA_LAB_URLAnyUrl | NoneTypenullLab Manager URL for distributed registry coordination.null
DATA_REGISTRY_LOCK_TIMEOUTnumber60.0Seconds to retry registry lock acquisition on contention at startup. Should be at least 2x the lock TTL (30s) to survive ungraceful container restarts.60.0
DATA_OTEL_ENABLEDbooleanfalseEnable OpenTelemetry tracing and metrics integration for this managerfalse
DATA_OTEL_SERVICE_NAMEstring | NoneTypenullOverride service name for OpenTelemetry (defaults to manager name)null
DATA_OTEL_EXPORTER"console" | "otlp" | "none""console"OpenTelemetry exporter type: ‘console’ for development, ‘otlp’ for production, ‘none’ to disable"console"
DATA_OTEL_ENDPOINTstring | NoneTypenullOTLP collector endpoint (required when otel_exporter=‘otlp’)null
DATA_OTEL_PROTOCOL"grpc" | "http""grpc"OTLP transport protocol (‘grpc’ or ‘http’)"grpc"
DATA_DATABASE_NAMEstring"madsci_data"The name of the MongoDB database where events are stored."madsci_data"
DATA_COLLECTION_NAMEstring"datapoints"The name of the MongoDB collection where data are stored."datapoints"
MONGO_DB_URL | DATA_DB_URL | DB_URLAnyUrl"mongodb://localhost:27017"The URL of the MongoDB database used by the Data Manager."mongodb://localhost:27017"
DATA_FILE_STORAGE_PATHstring | Path".madsci/datapoints"The path where files are stored on the server.".madsci/datapoints"

ObjectStorageSettings

Settings for S3-compatible object storage.

Environment Prefix: OBJECT_STORAGE_

NameTypeDefaultDescriptionExample
OBJECT_STORAGE_ENDPOINTstring | NoneTypenullEndpoint for S3-compatible storage (e.g., ‘minio.example.com:9000’)null
OBJECT_STORAGE_ACCESS_KEYstring""Access key for authentication""
OBJECT_STORAGE_SECRET_KEYstring""Secret key for authentication""
OBJECT_STORAGE_SECUREbooleanfalseWhether to use HTTPS (True) or HTTP (False)false
OBJECT_STORAGE_DEFAULT_BUCKETstring"madsci-data"Default bucket to use for storing data"madsci-data"
OBJECT_STORAGE_REGIONstring | NoneTypenullOptional for AWS S3/other providersnull

EventManagerSettings

Handles settings and configuration for the Event Manager.

Environment Prefix: EVENT_

NameTypeDefaultDescriptionExample
EVENT_SERVER_URLAnyUrl"http://localhost:8001/"The URL of the Event Manager server."http://localhost:8001/"
EVENT_MANAGER_IDstring | NoneTypenullUnique identifier for this manager instance. If not set, a new ULID is generated at runtime. The registry system provides the stable ID thereafter.null
EVENT_MANAGER_TYPEManagerType | NoneType"event_manager"The type of manager."event_manager"
EVENT_RATE_LIMIT_ENABLEDbooleantrueEnable rate limiting for API endpoints.true
EVENT_RATE_LIMIT_REQUESTSinteger300Maximum number of requests allowed per long time window.300
EVENT_RATE_LIMIT_WINDOWinteger60Long time window for rate limiting in seconds.60
EVENT_RATE_LIMIT_SHORT_REQUESTSinteger | NoneType50Maximum number of requests allowed per short time window for burst protection. If None, short window limiting is disabled.50
EVENT_RATE_LIMIT_SHORT_WINDOWinteger | NoneType1Short time window for burst protection in seconds. If None, short window limiting is disabled.1
EVENT_RATE_LIMIT_CLEANUP_INTERVALinteger300Interval in seconds between cleanup operations to prevent memory leaks.300
EVENT_RATE_LIMIT_EXEMPT_IPSarray | NoneTypenullList of IP addresses exempt from rate limiting. Defaults to localhost IPs (127.0.0.1, ::1) if not specified.null
EVENT_UVICORN_WORKERSinteger | NoneTypenullNumber of uvicorn worker processes. If None, uses uvicorn default (1).null
EVENT_UVICORN_LIMIT_CONCURRENCYinteger | NoneTypenullMaximum number of concurrent connections. If None, no limit is enforced.null
EVENT_UVICORN_LIMIT_MAX_REQUESTSinteger | NoneTypenullMaximum number of requests a worker will process before restarting. Helps prevent memory leaks.null
EVENT_ENABLE_REGISTRY_RESOLUTIONbooleantrueWhen true, resolve manager_id from the ID Registry at startup for stable identity across restarts.true
EVENT_MANAGER_NAMEstring | NoneTypenullName for this manager instance. Used for registry lookup and display.null
EVENT_MANAGER_DESCRIPTIONstring | NoneTypenullHuman-readable description of this manager instance.null
EVENT_LAB_URLAnyUrl | NoneTypenullLab Manager URL for distributed registry coordination.null
EVENT_REGISTRY_LOCK_TIMEOUTnumber60.0Seconds to retry registry lock acquisition on contention at startup. Should be at least 2x the lock TTL (30s) to survive ungraceful container restarts.60.0
EVENT_OTEL_ENABLEDbooleanfalseEnable OpenTelemetry tracing and metrics integration for this managerfalse
EVENT_OTEL_SERVICE_NAMEstring | NoneTypenullOverride service name for OpenTelemetry (defaults to manager name)null
EVENT_OTEL_EXPORTER"console" | "otlp" | "none""console"OpenTelemetry exporter type: ‘console’ for development, ‘otlp’ for production, ‘none’ to disable"console"
EVENT_OTEL_ENDPOINTstring | NoneTypenullOTLP collector endpoint (required when otel_exporter=‘otlp’)null
EVENT_OTEL_PROTOCOL"grpc" | "http""grpc"OTLP transport protocol (‘grpc’ or ‘http’)"grpc"
MONGO_DB_URL | EVENT_DB_URL | DB_URLAnyUrl"mongodb://localhost:27017"The URL of the MongoDB database used by the Event Manager."mongodb://localhost:27017"
EVENT_DATABASE_NAMEstring"madsci_events"The name of the MongoDB database where events are stored."madsci_events"
EVENT_COLLECTION_NAMEstring"events"The name of the MongoDB collection where events are stored."events"
EVENT_ALERT_LEVELEventLogLevel40The log level at which to send an alert.40
EVENT_EMAIL_ALERTSEmailAlertsConfig | NoneTypenullThe configuration for sending email alerts.null
EVENT_RETENTION_ENABLEDbooleanfalseWhether automatic event retention is enabled.false
EVENT_SOFT_DELETE_AFTER_DAYSinteger90Days after which events are soft-deleted (archived).90
EVENT_HARD_DELETE_AFTER_DAYSinteger365Days after archive when events are permanently deleted via TTL index.365
EVENT_RETENTION_CHECK_INTERVAL_HOURSinteger24How often to run soft-delete retention checks (in hours).24
EVENT_ARCHIVE_BATCH_SIZEinteger1000Maximum number of events to archive in a single batch operation.1000
EVENT_MAX_BATCHES_PER_RUNinteger100Maximum number of batches to process per retention run (0 = unlimited).100
EVENT_BACKUP_ENABLEDbooleanfalseWhether automatic event backups are enabled.false
EVENT_BACKUP_SCHEDULEstring | NoneTypenullCron expression for backup schedule (e.g., ‘0 2 * * *’ for 2am daily).null
EVENT_BACKUP_DIRstring | Path".madsci/backups/events"Directory for event backups.".madsci/backups/events"
EVENT_BACKUP_MAX_COUNTinteger10Maximum number of backup files to keep.10
EVENT_FAIL_ON_RETENTION_ERRORbooleanfalseIf True, raise exceptions on retention failures. If False, log and continue.false

WorkcellManagerSettings

Settings for the MADSci Workcell Manager.

Environment Prefix: WORKCELL_

NameTypeDefaultDescriptionExample
WORKCELL_SERVER_URLAnyUrl"http://localhost:8005/"The URL of the workcell manager server."http://localhost:8005/"
WORKCELL_MANAGER_IDstring | NoneTypenullUnique identifier for this manager instance. If not set, a new ULID is generated at runtime. The registry system provides the stable ID thereafter.null
WORKCELL_MANAGER_TYPEManagerType | NoneType"workcell_manager"The type of manager."workcell_manager"
WORKCELL_RATE_LIMIT_ENABLEDbooleantrueEnable rate limiting for API endpoints.true
WORKCELL_RATE_LIMIT_REQUESTSinteger300Maximum number of requests allowed per long time window.300
WORKCELL_RATE_LIMIT_WINDOWinteger60Long time window for rate limiting in seconds.60
WORKCELL_RATE_LIMIT_SHORT_REQUESTSinteger | NoneType50Maximum number of requests allowed per short time window for burst protection. If None, short window limiting is disabled.50
WORKCELL_RATE_LIMIT_SHORT_WINDOWinteger | NoneType1Short time window for burst protection in seconds. If None, short window limiting is disabled.1
WORKCELL_RATE_LIMIT_CLEANUP_INTERVALinteger300Interval in seconds between cleanup operations to prevent memory leaks.300
WORKCELL_RATE_LIMIT_EXEMPT_IPSarray | NoneTypenullList of IP addresses exempt from rate limiting. Defaults to localhost IPs (127.0.0.1, ::1) if not specified.null
WORKCELL_UVICORN_WORKERSinteger | NoneTypenullNumber of uvicorn worker processes. If None, uses uvicorn default (1).null
WORKCELL_UVICORN_LIMIT_CONCURRENCYinteger | NoneTypenullMaximum number of concurrent connections. If None, no limit is enforced.null
WORKCELL_UVICORN_LIMIT_MAX_REQUESTSinteger | NoneTypenullMaximum number of requests a worker will process before restarting. Helps prevent memory leaks.null
WORKCELL_ENABLE_REGISTRY_RESOLUTIONbooleantrueWhen true, resolve manager_id from the ID Registry at startup for stable identity across restarts.true
WORKCELL_MANAGER_NAMEstring | NoneTypenullName for this manager instance. Used for registry lookup and display.null
WORKCELL_MANAGER_DESCRIPTIONstring | NoneTypenullHuman-readable description of this manager instance.null
WORKCELL_LAB_URLAnyUrl | NoneTypenullLab Manager URL for distributed registry coordination.null
WORKCELL_REGISTRY_LOCK_TIMEOUTnumber60.0Seconds to retry registry lock acquisition on contention at startup. Should be at least 2x the lock TTL (30s) to survive ungraceful container restarts.60.0
WORKCELL_OTEL_ENABLEDbooleanfalseEnable OpenTelemetry tracing and metrics integration for this managerfalse
WORKCELL_OTEL_SERVICE_NAMEstring | NoneTypenullOverride service name for OpenTelemetry (defaults to manager name)null
WORKCELL_OTEL_EXPORTER"console" | "otlp" | "none""console"OpenTelemetry exporter type: ‘console’ for development, ‘otlp’ for production, ‘none’ to disable"console"
WORKCELL_OTEL_ENDPOINTstring | NoneTypenullOTLP collector endpoint (required when otel_exporter=‘otlp’)null
WORKCELL_OTEL_PROTOCOL"grpc" | "http""grpc"OTLP transport protocol (‘grpc’ or ‘http’)"grpc"
WORKCELL_NODESobject | NoneTypenullNode URLs for the workcell, as a JSON dict mapping node names to their URLs.null
WORKCELLS_DIRECTORY | WORKCELLS_DIRECTORYstring | Path | NoneType".madsci/workcells"Directory used to store workcell-related files in. Defaults to .madsci/workcells. Workcell-related files will be stored in a sub-folder with the workcell name.".madsci/workcells"
WORKCELL_REDIS_HOSTstring"localhost"The hostname for the redis server ."localhost"
WORKCELL_REDIS_PORTinteger6379The port for the redis server.6379
WORKCELL_REDIS_PASSWORDstring | NoneTypenullThe password for the redis server.null
WORKCELL_SCHEDULER_UPDATE_INTERVALnumber5.0The interval at which the scheduler runs, in seconds. Must be >= node_update_interval5.0
WORKCELL_NODE_UPDATE_INTERVALnumber2.0The interval at which the workcell queries its node’s states and status, in seconds. Must be <= scheduler_update_interval2.0
WORKCELL_RECONNECT_ATTEMPT_INTERVALnumber30.0The interval (in seconds) at which the workcell retries connecting to disconnected nodes. A non-disruptive retry: if the node responds, its status is restored naturally; if not, it remains disconnected until the next attempt.30.0
WORKCELL_NODE_INFO_UPDATE_INTERVALnumber60.0The interval at which the workcell queries its node’s info, in seconds. Node info changes infrequently, so this can be much larger than node_update_interval to reduce network overhead.60.0
WORKCELL_COLD_START_DELAYinteger0How long the Workcell engine should sleep on startup0
WORKCELL_SCHEDULERstring"madsci.workcell_manager.schedulers.default_scheduler"Scheduler module that contains a Scheduler class that inherits from AbstractScheduler to use"madsci.workcell_manager.schedulers.default_scheduler"
MONGO_DB_URL | WORKCELL_MONGO_URL | MONGO_URLAnyUrl | NoneType"mongodb://localhost:27017"The URL for the MongoDB database."mongodb://localhost:27017"
WORKCELL_DATABASE_NAMEstring"madsci_workcells"The name of the MongoDB database where events are stored."madsci_workcells"
WORKCELL_COLLECTION_NAMEstring"archived_workflows"The name of the MongoDB collection where events are stored."archived_workflows"
WORKCELL_GET_ACTION_RESULT_RETRIESinteger3Number of times to retry getting an action result3

ExperimentManagerSettings

Settings for the MADSci Experiment Manager.

Environment Prefix: EXPERIMENT_

NameTypeDefaultDescriptionExample
EXPERIMENT_SERVER_URLAnyUrl"http://localhost:8002/"The URL of the experiment manager server."http://localhost:8002/"
EXPERIMENT_MANAGER_IDstring | NoneTypenullUnique identifier for this manager instance. If not set, a new ULID is generated at runtime. The registry system provides the stable ID thereafter.null
EXPERIMENT_MANAGER_TYPEManagerType | NoneType"experiment_manager"The type of manager."experiment_manager"
EXPERIMENT_RATE_LIMIT_ENABLEDbooleantrueEnable rate limiting for API endpoints.true
EXPERIMENT_RATE_LIMIT_REQUESTSinteger300Maximum number of requests allowed per long time window.300
EXPERIMENT_RATE_LIMIT_WINDOWinteger60Long time window for rate limiting in seconds.60
EXPERIMENT_RATE_LIMIT_SHORT_REQUESTSinteger | NoneType50Maximum number of requests allowed per short time window for burst protection. If None, short window limiting is disabled.50
EXPERIMENT_RATE_LIMIT_SHORT_WINDOWinteger | NoneType1Short time window for burst protection in seconds. If None, short window limiting is disabled.1
EXPERIMENT_RATE_LIMIT_CLEANUP_INTERVALinteger300Interval in seconds between cleanup operations to prevent memory leaks.300
EXPERIMENT_RATE_LIMIT_EXEMPT_IPSarray | NoneTypenullList of IP addresses exempt from rate limiting. Defaults to localhost IPs (127.0.0.1, ::1) if not specified.null
EXPERIMENT_UVICORN_WORKERSinteger | NoneTypenullNumber of uvicorn worker processes. If None, uses uvicorn default (1).null
EXPERIMENT_UVICORN_LIMIT_CONCURRENCYinteger | NoneTypenullMaximum number of concurrent connections. If None, no limit is enforced.null
EXPERIMENT_UVICORN_LIMIT_MAX_REQUESTSinteger | NoneTypenullMaximum number of requests a worker will process before restarting. Helps prevent memory leaks.null
EXPERIMENT_ENABLE_REGISTRY_RESOLUTIONbooleantrueWhen true, resolve manager_id from the ID Registry at startup for stable identity across restarts.true
EXPERIMENT_MANAGER_NAMEstring | NoneTypenullName for this manager instance. Used for registry lookup and display.null
EXPERIMENT_MANAGER_DESCRIPTIONstring | NoneTypenullHuman-readable description of this manager instance.null
EXPERIMENT_LAB_URLAnyUrl | NoneTypenullLab Manager URL for distributed registry coordination.null
EXPERIMENT_REGISTRY_LOCK_TIMEOUTnumber60.0Seconds to retry registry lock acquisition on contention at startup. Should be at least 2x the lock TTL (30s) to survive ungraceful container restarts.60.0
EXPERIMENT_OTEL_ENABLEDbooleanfalseEnable OpenTelemetry tracing and metrics integration for this managerfalse
EXPERIMENT_OTEL_SERVICE_NAMEstring | NoneTypenullOverride service name for OpenTelemetry (defaults to manager name)null
EXPERIMENT_OTEL_EXPORTER"console" | "otlp" | "none""console"OpenTelemetry exporter type: ‘console’ for development, ‘otlp’ for production, ‘none’ to disable"console"
EXPERIMENT_OTEL_ENDPOINTstring | NoneTypenullOTLP collector endpoint (required when otel_exporter=‘otlp’)null
EXPERIMENT_OTEL_PROTOCOL"grpc" | "http""grpc"OTLP transport protocol (‘grpc’ or ‘http’)"grpc"
MONGO_DB_URL | EXPERIMENT_DB_URL | DB_URLAnyUrl"mongodb://localhost:27017"The URL of the MongoDB database for the experiment manager."mongodb://localhost:27017"
EXPERIMENT_DATABASE_NAMEstring"madsci_experiments"The name of the MongoDB database where events are stored."madsci_experiments"
EXPERIMENT_COLLECTION_NAMEstring"experiments"The name of the MongoDB collection where events are stored."experiments"

ResourceManagerSettings

Settings for the MADSci Resource Manager.

Environment Prefix: RESOURCE_

NameTypeDefaultDescriptionExample
RESOURCE_SERVER_URLAnyUrl"http://localhost:8003"The URL of the resource manager server."http://localhost:8003"
RESOURCE_MANAGER_IDstring | NoneTypenullUnique identifier for this manager instance. If not set, a new ULID is generated at runtime. The registry system provides the stable ID thereafter.null
RESOURCE_MANAGER_TYPEManagerType | NoneType"resource_manager"The type of manager."resource_manager"
RESOURCE_RATE_LIMIT_ENABLEDbooleantrueEnable rate limiting for API endpoints.true
RESOURCE_RATE_LIMIT_REQUESTSinteger300Maximum number of requests allowed per long time window.300
RESOURCE_RATE_LIMIT_WINDOWinteger60Long time window for rate limiting in seconds.60
RESOURCE_RATE_LIMIT_SHORT_REQUESTSinteger | NoneType50Maximum number of requests allowed per short time window for burst protection. If None, short window limiting is disabled.50
RESOURCE_RATE_LIMIT_SHORT_WINDOWinteger | NoneType1Short time window for burst protection in seconds. If None, short window limiting is disabled.1
RESOURCE_RATE_LIMIT_CLEANUP_INTERVALinteger300Interval in seconds between cleanup operations to prevent memory leaks.300
RESOURCE_RATE_LIMIT_EXEMPT_IPSarray | NoneTypenullList of IP addresses exempt from rate limiting. Defaults to localhost IPs (127.0.0.1, ::1) if not specified.null
RESOURCE_UVICORN_WORKERSinteger | NoneTypenullNumber of uvicorn worker processes. If None, uses uvicorn default (1).null
RESOURCE_UVICORN_LIMIT_CONCURRENCYinteger | NoneTypenullMaximum number of concurrent connections. If None, no limit is enforced.null
RESOURCE_UVICORN_LIMIT_MAX_REQUESTSinteger | NoneTypenullMaximum number of requests a worker will process before restarting. Helps prevent memory leaks.null
RESOURCE_ENABLE_REGISTRY_RESOLUTIONbooleantrueWhen true, resolve manager_id from the ID Registry at startup for stable identity across restarts.true
RESOURCE_MANAGER_NAMEstring | NoneTypenullName for this manager instance. Used for registry lookup and display.null
RESOURCE_MANAGER_DESCRIPTIONstring | NoneTypenullHuman-readable description of this manager instance.null
RESOURCE_LAB_URLAnyUrl | NoneTypenullLab Manager URL for distributed registry coordination.null
RESOURCE_REGISTRY_LOCK_TIMEOUTnumber60.0Seconds to retry registry lock acquisition on contention at startup. Should be at least 2x the lock TTL (30s) to survive ungraceful container restarts.60.0
RESOURCE_OTEL_ENABLEDbooleanfalseEnable OpenTelemetry tracing and metrics integration for this managerfalse
RESOURCE_OTEL_SERVICE_NAMEstring | NoneTypenullOverride service name for OpenTelemetry (defaults to manager name)null
RESOURCE_OTEL_EXPORTER"console" | "otlp" | "none""console"OpenTelemetry exporter type: ‘console’ for development, ‘otlp’ for production, ‘none’ to disable"console"
RESOURCE_OTEL_ENDPOINTstring | NoneTypenullOTLP collector endpoint (required when otel_exporter=‘otlp’)null
RESOURCE_OTEL_PROTOCOL"grpc" | "http""grpc"OTLP transport protocol (‘grpc’ or ‘http’)"grpc"
RESOURCE_DEFAULT_TEMPLATESarray | NoneTypenullDefault resource template definitions to create or update on manager startup.null
RESOURCE_DB_URLstring"postgresql://madsci:madsci@localhost:5432/resources"The URL of the database for the resource manager."postgresql://madsci:madsci@localhost:5432/resources"

LabManagerSettings

Settings for the MADSci Lab.

Environment Prefix: LAB_

NameTypeDefaultDescriptionExample
LAB_SERVER_URLAnyUrl"http://localhost:8000/"The URL of the lab manager."http://localhost:8000/"
LAB_MANAGER_IDstring | NoneTypenullUnique identifier for this manager instance. If not set, a new ULID is generated at runtime. The registry system provides the stable ID thereafter.null
LAB_MANAGER_TYPEManagerType | NoneType"lab_manager"The type of manager."lab_manager"
LAB_RATE_LIMIT_ENABLEDbooleantrueEnable rate limiting for API endpoints.true
LAB_RATE_LIMIT_REQUESTSinteger300Maximum number of requests allowed per long time window.300
LAB_RATE_LIMIT_WINDOWinteger60Long time window for rate limiting in seconds.60
LAB_RATE_LIMIT_SHORT_REQUESTSinteger | NoneType50Maximum number of requests allowed per short time window for burst protection. If None, short window limiting is disabled.50
LAB_RATE_LIMIT_SHORT_WINDOWinteger | NoneType1Short time window for burst protection in seconds. If None, short window limiting is disabled.1
LAB_RATE_LIMIT_CLEANUP_INTERVALinteger300Interval in seconds between cleanup operations to prevent memory leaks.300
LAB_RATE_LIMIT_EXEMPT_IPSarray | NoneTypenullList of IP addresses exempt from rate limiting. Defaults to localhost IPs (127.0.0.1, ::1) if not specified.null
LAB_UVICORN_WORKERSinteger | NoneTypenullNumber of uvicorn worker processes. If None, uses uvicorn default (1).null
LAB_UVICORN_LIMIT_CONCURRENCYinteger | NoneTypenullMaximum number of concurrent connections. If None, no limit is enforced.null
LAB_UVICORN_LIMIT_MAX_REQUESTSinteger | NoneTypenullMaximum number of requests a worker will process before restarting. Helps prevent memory leaks.null
LAB_ENABLE_REGISTRY_RESOLUTIONbooleantrueWhen true, resolve manager_id from the ID Registry at startup for stable identity across restarts.true
LAB_MANAGER_NAMEstring | NoneTypenullName for this manager instance. Used for registry lookup and display.null
LAB_MANAGER_DESCRIPTIONstring | NoneTypenullHuman-readable description of this manager instance.null
LAB_LAB_URLAnyUrl | NoneTypenullLab Manager URL for distributed registry coordination.null
LAB_REGISTRY_LOCK_TIMEOUTnumber60.0Seconds to retry registry lock acquisition on contention at startup. Should be at least 2x the lock TTL (30s) to survive ungraceful container restarts.60.0
LAB_OTEL_ENABLEDbooleanfalseEnable OpenTelemetry tracing and metrics integration for this managerfalse
LAB_OTEL_SERVICE_NAMEstring | NoneTypenullOverride service name for OpenTelemetry (defaults to manager name)null
LAB_OTEL_EXPORTER"console" | "otlp" | "none""console"OpenTelemetry exporter type: ‘console’ for development, ‘otlp’ for production, ‘none’ to disable"console"
LAB_OTEL_ENDPOINTstring | NoneTypenullOTLP collector endpoint (required when otel_exporter=‘otlp’)null
LAB_OTEL_PROTOCOL"grpc" | "http""grpc"OTLP transport protocol (‘grpc’ or ‘http’)"grpc"
LAB_DASHBOARD_FILES_PATHstring | Path | NoneType"~/MADSci/ui/dist"Path to the static files for the dashboard. Set to None to disable the dashboard."~/MADSci/ui/dist"

LocationManagerSettings

Settings for the LocationManager.

Environment Prefix: LOCATION_

NameTypeDefaultDescriptionExample
LOCATION_SERVER_URLAnyUrl"http://localhost:8006/"The URL where this manager’s server runs."http://localhost:8006/"
LOCATION_MANAGER_IDstring | NoneTypenullUnique identifier for this manager instance. If not set, a new ULID is generated at runtime. The registry system provides the stable ID thereafter.null
LOCATION_MANAGER_TYPEManagerType | NoneType"location_manager"The type of manager."location_manager"
LOCATION_RATE_LIMIT_ENABLEDbooleantrueEnable rate limiting for API endpoints.true
LOCATION_RATE_LIMIT_REQUESTSinteger300Maximum number of requests allowed per long time window.300
LOCATION_RATE_LIMIT_WINDOWinteger60Long time window for rate limiting in seconds.60
LOCATION_RATE_LIMIT_SHORT_REQUESTSinteger | NoneType50Maximum number of requests allowed per short time window for burst protection. If None, short window limiting is disabled.50
LOCATION_RATE_LIMIT_SHORT_WINDOWinteger | NoneType1Short time window for burst protection in seconds. If None, short window limiting is disabled.1
LOCATION_RATE_LIMIT_CLEANUP_INTERVALinteger300Interval in seconds between cleanup operations to prevent memory leaks.300
LOCATION_RATE_LIMIT_EXEMPT_IPSarray | NoneTypenullList of IP addresses exempt from rate limiting. Defaults to localhost IPs (127.0.0.1, ::1) if not specified.null
LOCATION_UVICORN_WORKERSinteger | NoneTypenullNumber of uvicorn worker processes. If None, uses uvicorn default (1).null
LOCATION_UVICORN_LIMIT_CONCURRENCYinteger | NoneTypenullMaximum number of concurrent connections. If None, no limit is enforced.null
LOCATION_UVICORN_LIMIT_MAX_REQUESTSinteger | NoneTypenullMaximum number of requests a worker will process before restarting. Helps prevent memory leaks.null
LOCATION_ENABLE_REGISTRY_RESOLUTIONbooleantrueWhen true, resolve manager_id from the ID Registry at startup for stable identity across restarts.true
LOCATION_MANAGER_NAMEstring | NoneTypenullName for this manager instance. Used for registry lookup and display.null
LOCATION_MANAGER_DESCRIPTIONstring | NoneTypenullHuman-readable description of this manager instance.null
LOCATION_LAB_URLAnyUrl | NoneTypenullLab Manager URL for distributed registry coordination.null
LOCATION_REGISTRY_LOCK_TIMEOUTnumber60.0Seconds to retry registry lock acquisition on contention at startup. Should be at least 2x the lock TTL (30s) to survive ungraceful container restarts.60.0
LOCATION_OTEL_ENABLEDbooleanfalseEnable OpenTelemetry tracing and metrics integration for this managerfalse
LOCATION_OTEL_SERVICE_NAMEstring | NoneTypenullOverride service name for OpenTelemetry (defaults to manager name)null
LOCATION_OTEL_EXPORTER"console" | "otlp" | "none""console"OpenTelemetry exporter type: ‘console’ for development, ‘otlp’ for production, ‘none’ to disable"console"
LOCATION_OTEL_ENDPOINTstring | NoneTypenullOTLP collector endpoint (required when otel_exporter=‘otlp’)null
LOCATION_OTEL_PROTOCOL"grpc" | "http""grpc"OTLP transport protocol (‘grpc’ or ‘http’)"grpc"
LOCATION_LOCATIONSarray | NoneTypenullLocation definitions managed by this LocationManager.null
LOCATION_TRANSFER_CAPABILITIESLocationTransferCapabilities | NoneTypenullTransfer capabilities configuration for this LocationManager.null
LOCATION_REDIS_HOSTstring"localhost"The host of the Redis server for state storage."localhost"
LOCATION_REDIS_PORTinteger6379The port of the Redis server for state storage.6379
LOCATION_REDIS_PASSWORDstring | NoneTypenullThe password for the Redis server (if required).null

EventClientConfig

Configuration for an Event Client.

Inherits all HTTP client configuration from MadsciClientConfig including:

Environment Prefix: EVENT_CLIENT_

NameTypeDefaultDescriptionExample
EVENT_CLIENT_RETRY_ENABLEDbooleantrueWhether to enable automatic retries for failed requeststrue
EVENT_CLIENT_RETRY_TOTALinteger3Total number of retry attempts3
EVENT_CLIENT_RETRY_BACKOFF_FACTORnumber0.3Backoff factor between retries in seconds0.3
EVENT_CLIENT_RETRY_STATUS_FORCELISTarray[429,500,502,503,504]HTTP status codes that should trigger a retry[429,500,502,503,504]
EVENT_CLIENT_RETRY_ALLOWED_METHODSarray | NoneTypenullHTTP methods allowed to be retried (None uses urllib3 defaults)null
EVENT_CLIENT_TIMEOUT_DEFAULTnumber10.0Default timeout in seconds for standard requests10.0
EVENT_CLIENT_TIMEOUT_DATA_OPERATIONSnumber60.0Timeout in seconds for data-heavy operations60.0
EVENT_CLIENT_TIMEOUT_LONG_OPERATIONSnumber100.0Timeout in seconds for long-running operations100.0
EVENT_CLIENT_POOL_CONNECTIONSinteger10Number of connection pool entries10
EVENT_CLIENT_POOL_MAXSIZEinteger10Maximum size of the connection pool10
EVENT_CLIENT_RATE_LIMIT_TRACKING_ENABLEDbooleantrueWhether to track rate limit headers from server responsestrue
EVENT_CLIENT_RATE_LIMIT_WARNING_THRESHOLDnumber0.8Threshold (as fraction of limit) at which to log warnings about approaching rate limits0.8
EVENT_CLIENT_RATE_LIMIT_RESPECT_LIMITSbooleanfalseWhether to proactively delay requests when approaching rate limitsfalse
EVENT_CLIENT_NAMEstring | NoneTypenullThe name of the event client.null
EVENT_SERVER_URL | EVENT_SERVER_URLAnyUrl | NoneTypenullThe URL of the event server.null
EVENT_CLIENT_LOG_LEVELinteger | EventLogLevel20The log level of the event client.20
EVENT_CLIENT_LOG_DIRstring | Path".madsci/logs"The directory to store logs in.".madsci/logs"
EVENT_CLIENT_LOG_ROTATION_TYPE"size" | "time" | "none""size"Type of log rotation: ‘size’ (RotatingFileHandler), ‘time’ (TimedRotatingFileHandler), or ‘none’"size"
EVENT_CLIENT_LOG_MAX_BYTESinteger10485760Maximum log file size in bytes before rotation (for size-based rotation)10485760
EVENT_CLIENT_LOG_BACKUP_COUNTinteger5Number of backup log files to keep5
EVENT_CLIENT_LOG_ROTATION_WHENstring"midnight"When to rotate logs (for time-based rotation): ‘S’, ‘M’, ‘H’, ‘D’, ‘midnight’, ‘W0’-‘W6’"midnight"
EVENT_CLIENT_LOG_ROTATION_INTERVALinteger1Interval for time-based rotation1
EVENT_CLIENT_LOG_COMPRESSION_ENABLEDbooleantrueWhether to compress rotated log files with gziptrue
EVENT_CLIENT_LOG_OUTPUT_FORMAT"json" | "console""console"Log output format: ‘json’ for structured machine-readable, ‘console’ for human-readable"console"
EVENT_CLIENT_FAIL_ON_ERRORbooleanfalseIf True, raise exceptions on logging/sending failures. If False, log errors silently and continue.false
EVENT_CLIENT_OTEL_ENABLEDbooleanfalseEnable OpenTelemetry tracing and metrics integrationfalse
EVENT_CLIENT_OTEL_SERVICE_NAMEstring | NoneTypenullOverride service name for OpenTelemetry (defaults to client name)null
EVENT_CLIENT_OTEL_EXPORTER"console" | "otlp" | "none""console"OpenTelemetry exporter type: ‘console’ for development, ‘otlp’ for production, ‘none’ to disable"console"
EVENT_CLIENT_OTEL_ENDPOINTstring | NoneTypenullOTLP collector endpoint (required when otel_exporter=‘otlp’)null
EVENT_CLIENT_OTEL_PROTOCOL"grpc" | "http""grpc"OTLP transport protocol (‘grpc’ or ‘http’)"grpc"
EVENT_CLIENT_OTEL_METRIC_EXPORT_INTERVAL_MSinteger10000Interval in milliseconds for exporting metrics to the collector10000

OwnershipInfo

Information about the ownership of a MADSci object.

Environment Prefix: EVENT_CLIENT_SOURCE__

NameTypeDefaultDescriptionExample
EVENT_CLIENT_SOURCE__USER_IDstring | NoneTypenullThe ID of the user who owns the object.null
EVENT_CLIENT_SOURCE__EXPERIMENT_IDstring | NoneTypenullThe ID of the experiment that owns the object.null
EVENT_CLIENT_SOURCE__CAMPAIGN_IDstring | NoneTypenullThe ID of the campaign that owns the object.null
EVENT_CLIENT_SOURCE__PROJECT_IDstring | NoneTypenullThe ID of the project that owns the object.null
EVENT_CLIENT_SOURCE__NODE_IDstring | NoneTypenullThe ID of the node that owns the object.null
EVENT_CLIENT_SOURCE__WORKCELL_IDstring | NoneTypenullThe ID of the workcell that owns the object.null
EVENT_CLIENT_SOURCE__LAB_IDstring | NoneTypenullThe ID of the lab that owns the object.null
EVENT_CLIENT_SOURCE__STEP_IDstring | NoneTypenullThe ID of the step that owns the object.null
EVENT_CLIENT_SOURCE__WORKFLOW_IDstring | NoneTypenullThe ID of the workflow that owns the object.null
EVENT_CLIENT_SOURCE__MANAGER_IDstring | NoneTypenullThe ID of the manager that owns the object.null

RestNodeClientConfig

Configuration for Node REST clients.

Node clients handle action operations (create, upload, start, download) that may require extended timeouts.

Environment Prefix: NODE_CLIENT_

NameTypeDefaultDescriptionExample
NODE_CLIENT_RETRY_ENABLEDbooleantrueWhether to enable automatic retries for failed requeststrue
NODE_CLIENT_RETRY_TOTALinteger3Total number of retry attempts3
NODE_CLIENT_RETRY_BACKOFF_FACTORnumber0.3Backoff factor between retries in seconds0.3
NODE_CLIENT_RETRY_STATUS_FORCELISTarray[429,500,502,503,504]HTTP status codes that should trigger a retry[429,500,502,503,504]
NODE_CLIENT_RETRY_ALLOWED_METHODSarray | NoneTypenullHTTP methods allowed to be retried (None uses urllib3 defaults)null
NODE_CLIENT_TIMEOUT_DEFAULTnumber10.0Default timeout in seconds for standard requests10.0
NODE_CLIENT_TIMEOUT_DATA_OPERATIONSnumber60.0Timeout for node action operations60.0
NODE_CLIENT_TIMEOUT_LONG_OPERATIONSnumber100.0Timeout in seconds for long-running operations100.0
NODE_CLIENT_POOL_CONNECTIONSinteger10Number of connection pool entries10
NODE_CLIENT_POOL_MAXSIZEinteger10Maximum size of the connection pool10
NODE_CLIENT_RATE_LIMIT_TRACKING_ENABLEDbooleantrueWhether to track rate limit headers from server responsestrue
NODE_CLIENT_RATE_LIMIT_WARNING_THRESHOLDnumber0.8Threshold (as fraction of limit) at which to log warnings about approaching rate limits0.8
NODE_CLIENT_RATE_LIMIT_RESPECT_LIMITSbooleanfalseWhether to proactively delay requests when approaching rate limitsfalse

ResourceClientConfig

Configuration for the Resource Manager client.

Environment Prefix: RESOURCE_CLIENT_

NameTypeDefaultDescriptionExample
RESOURCE_CLIENT_RETRY_ENABLEDbooleantrueWhether to enable automatic retries for failed requeststrue
RESOURCE_CLIENT_RETRY_TOTALinteger3Total number of retry attempts3
RESOURCE_CLIENT_RETRY_BACKOFF_FACTORnumber0.3Backoff factor between retries in seconds0.3
RESOURCE_CLIENT_RETRY_STATUS_FORCELISTarray[429,500,502,503,504]HTTP status codes that should trigger a retry[429,500,502,503,504]
RESOURCE_CLIENT_RETRY_ALLOWED_METHODSarray | NoneTypenullHTTP methods allowed to be retried (None uses urllib3 defaults)null
RESOURCE_CLIENT_TIMEOUT_DEFAULTnumber10.0Default timeout in seconds for standard requests10.0
RESOURCE_CLIENT_TIMEOUT_DATA_OPERATIONSnumber60.0Timeout in seconds for data-heavy operations60.0
RESOURCE_CLIENT_TIMEOUT_LONG_OPERATIONSnumber100.0Timeout in seconds for long-running operations100.0
RESOURCE_CLIENT_POOL_CONNECTIONSinteger10Number of connection pool entries10
RESOURCE_CLIENT_POOL_MAXSIZEinteger10Maximum size of the connection pool10
RESOURCE_CLIENT_RATE_LIMIT_TRACKING_ENABLEDbooleantrueWhether to track rate limit headers from server responsestrue
RESOURCE_CLIENT_RATE_LIMIT_WARNING_THRESHOLDnumber0.8Threshold (as fraction of limit) at which to log warnings about approaching rate limits0.8
RESOURCE_CLIENT_RATE_LIMIT_RESPECT_LIMITSbooleanfalseWhether to proactively delay requests when approaching rate limitsfalse

ExperimentClientConfig

Configuration for the Experiment Manager client.

Environment Prefix: EXPERIMENT_CLIENT_

NameTypeDefaultDescriptionExample
EXPERIMENT_CLIENT_RETRY_ENABLEDbooleantrueWhether to enable automatic retries for failed requeststrue
EXPERIMENT_CLIENT_RETRY_TOTALinteger3Total number of retry attempts3
EXPERIMENT_CLIENT_RETRY_BACKOFF_FACTORnumber0.3Backoff factor between retries in seconds0.3
EXPERIMENT_CLIENT_RETRY_STATUS_FORCELISTarray[429,500,502,503,504]HTTP status codes that should trigger a retry[429,500,502,503,504]
EXPERIMENT_CLIENT_RETRY_ALLOWED_METHODSarray | NoneTypenullHTTP methods allowed to be retried (None uses urllib3 defaults)null
EXPERIMENT_CLIENT_TIMEOUT_DEFAULTnumber10.0Default timeout in seconds for standard requests10.0
EXPERIMENT_CLIENT_TIMEOUT_DATA_OPERATIONSnumber60.0Timeout in seconds for data-heavy operations60.0
EXPERIMENT_CLIENT_TIMEOUT_LONG_OPERATIONSnumber100.0Timeout in seconds for long-running operations100.0
EXPERIMENT_CLIENT_POOL_CONNECTIONSinteger10Number of connection pool entries10
EXPERIMENT_CLIENT_POOL_MAXSIZEinteger10Maximum size of the connection pool10
EXPERIMENT_CLIENT_RATE_LIMIT_TRACKING_ENABLEDbooleantrueWhether to track rate limit headers from server responsestrue
EXPERIMENT_CLIENT_RATE_LIMIT_WARNING_THRESHOLDnumber0.8Threshold (as fraction of limit) at which to log warnings about approaching rate limits0.8
EXPERIMENT_CLIENT_RATE_LIMIT_RESPECT_LIMITSbooleanfalseWhether to proactively delay requests when approaching rate limitsfalse

DataClientConfig

Configuration for the Data Manager client.

The Data Manager handles data uploads and downloads that may require extended timeouts.

Environment Prefix: DATA_CLIENT_

NameTypeDefaultDescriptionExample
DATA_CLIENT_RETRY_ENABLEDbooleantrueWhether to enable automatic retries for failed requeststrue
DATA_CLIENT_RETRY_TOTALinteger3Total number of retry attempts3
DATA_CLIENT_RETRY_BACKOFF_FACTORnumber0.3Backoff factor between retries in seconds0.3
DATA_CLIENT_RETRY_STATUS_FORCELISTarray[429,500,502,503,504]HTTP status codes that should trigger a retry[429,500,502,503,504]
DATA_CLIENT_RETRY_ALLOWED_METHODSarray | NoneTypenullHTTP methods allowed to be retried (None uses urllib3 defaults)null
DATA_CLIENT_TIMEOUT_DEFAULTnumber10.0Default timeout in seconds for standard requests10.0
DATA_CLIENT_TIMEOUT_DATA_OPERATIONSnumber60.0Timeout in seconds for data-heavy operations60.0
DATA_CLIENT_TIMEOUT_LONG_OPERATIONSnumber100.0Timeout in seconds for long-running operations100.0
DATA_CLIENT_POOL_CONNECTIONSinteger10Number of connection pool entries10
DATA_CLIENT_POOL_MAXSIZEinteger10Maximum size of the connection pool10
DATA_CLIENT_RATE_LIMIT_TRACKING_ENABLEDbooleantrueWhether to track rate limit headers from server responsestrue
DATA_CLIENT_RATE_LIMIT_WARNING_THRESHOLDnumber0.8Threshold (as fraction of limit) at which to log warnings about approaching rate limits0.8
DATA_CLIENT_RATE_LIMIT_RESPECT_LIMITSbooleanfalseWhether to proactively delay requests when approaching rate limitsfalse

MadsciClientConfig

Base configuration for MADSci HTTP clients.

This class provides standardized configuration for requests library usage, including retry strategies, timeout values, and backoff algorithms. All MADSci clients should use this configuration to ensure consistency.

Attributes

retry_enabled : bool Whether to enable automatic retries for failed requests. Default: True. retry_total : int Total number of retry attempts. Default: 3. retry_backoff_factor : float Backoff factor between retries (in seconds). The actual delay is calculated as {backoff factor} * (2 ** ({retry number} - 1)). Default: 0.3. retry_status_forcelist : list[int] HTTP status codes that should trigger a retry. Default: [429, 500, 502, 503, 504]. retry_allowed_methods : Optional[list[str]] HTTP methods that are allowed to be retried. If None, uses urllib3 defaults (HEAD, GET, PUT, DELETE, OPTIONS, TRACE). Default: None. timeout_default : float Default timeout in seconds for standard requests. Default: 10. timeout_data_operations : float Timeout in seconds for data-heavy operations (e.g., uploads, downloads). Default: 60. timeout_long_operations : float Timeout in seconds for long-running operations (e.g., workflow queries, utilization). Default: 100. pool_connections : int Number of connection pool entries for the session. Default: 10. pool_maxsize : int Maximum size of the connection pool. Default: 10. rate_limit_tracking_enabled : bool Whether to track rate limit headers from server responses. Default: True. rate_limit_warning_threshold : float Threshold (0.0 to 1.0) at which to log warnings about approaching rate limits. Default: 0.8. rate_limit_respect_limits : bool Whether to proactively delay requests when approaching rate limits. Default: False.

Environment Prefix: MADSCI_CLIENT_

NameTypeDefaultDescriptionExample
MADSCI_CLIENT_RETRY_ENABLEDbooleantrueWhether to enable automatic retries for failed requeststrue
MADSCI_CLIENT_RETRY_TOTALinteger3Total number of retry attempts3
MADSCI_CLIENT_RETRY_BACKOFF_FACTORnumber0.3Backoff factor between retries in seconds0.3
MADSCI_CLIENT_RETRY_STATUS_FORCELISTarray[429,500,502,503,504]HTTP status codes that should trigger a retry[429,500,502,503,504]
MADSCI_CLIENT_RETRY_ALLOWED_METHODSarray | NoneTypenullHTTP methods allowed to be retried (None uses urllib3 defaults)null
MADSCI_CLIENT_TIMEOUT_DEFAULTnumber10.0Default timeout in seconds for standard requests10.0
MADSCI_CLIENT_TIMEOUT_DATA_OPERATIONSnumber60.0Timeout in seconds for data-heavy operations60.0
MADSCI_CLIENT_TIMEOUT_LONG_OPERATIONSnumber100.0Timeout in seconds for long-running operations100.0
MADSCI_CLIENT_POOL_CONNECTIONSinteger10Number of connection pool entries10
MADSCI_CLIENT_POOL_MAXSIZEinteger10Maximum size of the connection pool10
MADSCI_CLIENT_RATE_LIMIT_TRACKING_ENABLEDbooleantrueWhether to track rate limit headers from server responsestrue
MADSCI_CLIENT_RATE_LIMIT_WARNING_THRESHOLDnumber0.8Threshold (as fraction of limit) at which to log warnings about approaching rate limits0.8
MADSCI_CLIENT_RATE_LIMIT_RESPECT_LIMITSbooleanfalseWhether to proactively delay requests when approaching rate limitsfalse

LocationClientConfig

Configuration for the Location Manager client.

Environment Prefix: LOCATION_CLIENT_

NameTypeDefaultDescriptionExample
LOCATION_CLIENT_RETRY_ENABLEDbooleantrueWhether to enable automatic retries for failed requeststrue
LOCATION_CLIENT_RETRY_TOTALinteger3Total number of retry attempts3
LOCATION_CLIENT_RETRY_BACKOFF_FACTORnumber0.3Backoff factor between retries in seconds0.3
LOCATION_CLIENT_RETRY_STATUS_FORCELISTarray[429,500,502,503,504]HTTP status codes that should trigger a retry[429,500,502,503,504]
LOCATION_CLIENT_RETRY_ALLOWED_METHODSarray | NoneTypenullHTTP methods allowed to be retried (None uses urllib3 defaults)null
LOCATION_CLIENT_TIMEOUT_DEFAULTnumber10.0Default timeout in seconds for standard requests10.0
LOCATION_CLIENT_TIMEOUT_DATA_OPERATIONSnumber60.0Timeout in seconds for data-heavy operations60.0
LOCATION_CLIENT_TIMEOUT_LONG_OPERATIONSnumber100.0Timeout in seconds for long-running operations100.0
LOCATION_CLIENT_POOL_CONNECTIONSinteger10Number of connection pool entries10
LOCATION_CLIENT_POOL_MAXSIZEinteger10Maximum size of the connection pool10
LOCATION_CLIENT_RATE_LIMIT_TRACKING_ENABLEDbooleantrueWhether to track rate limit headers from server responsestrue
LOCATION_CLIENT_RATE_LIMIT_WARNING_THRESHOLDnumber0.8Threshold (as fraction of limit) at which to log warnings about approaching rate limits0.8
LOCATION_CLIENT_RATE_LIMIT_RESPECT_LIMITSbooleanfalseWhether to proactively delay requests when approaching rate limitsfalse

WorkcellClientConfig

Configuration for the Workcell Manager client.

The Workcell Manager handles workflow queries that may require extended timeouts.

Environment Prefix: WORKCELL_CLIENT_

NameTypeDefaultDescriptionExample
WORKCELL_CLIENT_RETRY_ENABLEDbooleantrueWhether to enable automatic retries for failed requeststrue
WORKCELL_CLIENT_RETRY_TOTALinteger3Total number of retry attempts3
WORKCELL_CLIENT_RETRY_BACKOFF_FACTORnumber0.3Backoff factor between retries in seconds0.3
WORKCELL_CLIENT_RETRY_STATUS_FORCELISTarray[429,500,502,503,504]HTTP status codes that should trigger a retry[429,500,502,503,504]
WORKCELL_CLIENT_RETRY_ALLOWED_METHODSarray | NoneTypenullHTTP methods allowed to be retried (None uses urllib3 defaults)null
WORKCELL_CLIENT_TIMEOUT_DEFAULTnumber10.0Default timeout in seconds for standard requests10.0
WORKCELL_CLIENT_TIMEOUT_DATA_OPERATIONSnumber60.0Timeout in seconds for data-heavy operations60.0
WORKCELL_CLIENT_TIMEOUT_LONG_OPERATIONSnumber100.0Timeout in seconds for long-running operations100.0
WORKCELL_CLIENT_POOL_CONNECTIONSinteger10Number of connection pool entries10
WORKCELL_CLIENT_POOL_MAXSIZEinteger10Maximum size of the connection pool10
WORKCELL_CLIENT_RATE_LIMIT_TRACKING_ENABLEDbooleantrueWhether to track rate limit headers from server responsestrue
WORKCELL_CLIENT_RATE_LIMIT_WARNING_THRESHOLDnumber0.8Threshold (as fraction of limit) at which to log warnings about approaching rate limits0.8
WORKCELL_CLIENT_RATE_LIMIT_RESPECT_LIMITSbooleanfalseWhether to proactively delay requests when approaching rate limitsfalse

LabClientConfig

Configuration for the Lab (Squid) client.

Environment Prefix: LAB_CLIENT_

NameTypeDefaultDescriptionExample
LAB_CLIENT_RETRY_ENABLEDbooleantrueWhether to enable automatic retries for failed requeststrue
LAB_CLIENT_RETRY_TOTALinteger3Total number of retry attempts3
LAB_CLIENT_RETRY_BACKOFF_FACTORnumber0.3Backoff factor between retries in seconds0.3
LAB_CLIENT_RETRY_STATUS_FORCELISTarray[429,500,502,503,504]HTTP status codes that should trigger a retry[429,500,502,503,504]
LAB_CLIENT_RETRY_ALLOWED_METHODSarray | NoneTypenullHTTP methods allowed to be retried (None uses urllib3 defaults)null
LAB_CLIENT_TIMEOUT_DEFAULTnumber10.0Default timeout in seconds for standard requests10.0
LAB_CLIENT_TIMEOUT_DATA_OPERATIONSnumber60.0Timeout in seconds for data-heavy operations60.0
LAB_CLIENT_TIMEOUT_LONG_OPERATIONSnumber100.0Timeout in seconds for long-running operations100.0
LAB_CLIENT_POOL_CONNECTIONSinteger10Number of connection pool entries10
LAB_CLIENT_POOL_MAXSIZEinteger10Maximum size of the connection pool10
LAB_CLIENT_RATE_LIMIT_TRACKING_ENABLEDbooleantrueWhether to track rate limit headers from server responsestrue
LAB_CLIENT_RATE_LIMIT_WARNING_THRESHOLDnumber0.8Threshold (as fraction of limit) at which to log warnings about approaching rate limits0.8
LAB_CLIENT_RATE_LIMIT_RESPECT_LIMITSbooleanfalseWhether to proactively delay requests when approaching rate limitsfalse

NodeConfig

Basic Configuration for a MADSci Node.

Environment Prefix: NODE_

NameTypeDefaultDescriptionExample
NODE_STATUS_UPDATE_INTERVALnumber | NoneType2.0The interval in seconds at which the node should update its status.2.0
NODE_STATE_UPDATE_INTERVALnumber | NoneType2.0The interval in seconds at which the node should update its state.2.0
NODE_NAME | NODE_NAMEstring | NoneTypenullName for this node. If not set, defaults to the class name.null
NODE_ID | NODE_IDstring | NoneTypenullUnique ID for this node. If not set, a new ULID is generated.null
NODE_TYPE | NODE_TYPENodeType | NoneTypenullThe type of thing this node provides an interface for.null
NODE_MODULE_NAMEstring | NoneTypenullName of the node module implementation.null
NODE_MODULE_VERSIONstring | NoneTypenullVersion of the node module implementation.null
NODE_ENABLE_REGISTRY_RESOLUTIONbooleantrueWhen true, resolve node_id from the ID Registry at startup for stable identity across restarts.true
NODE_LAB_URLAnyUrl | NoneTypenullLab Manager URL for distributed registry coordination.null
NODE_REGISTRY_LOCK_TIMEOUTnumber60.0Seconds to retry registry lock acquisition on contention at startup. Should be at least 2x the lock TTL (30s) to survive ungraceful container restarts.60.0

RestNodeConfig

Default Configuration for a MADSci Node that communicates over REST.

Environment Prefix: NODE_

NameTypeDefaultDescriptionExample
NODE_STATUS_UPDATE_INTERVALnumber | NoneType2.0The interval in seconds at which the node should update its status.2.0
NODE_STATE_UPDATE_INTERVALnumber | NoneType2.0The interval in seconds at which the node should update its state.2.0
NODE_NAME | NODE_NAMEstring | NoneTypenullName for this node. If not set, defaults to the class name.null
NODE_ID | NODE_IDstring | NoneTypenullUnique ID for this node. If not set, a new ULID is generated.null
NODE_TYPE | NODE_TYPENodeType | NoneTypenullThe type of thing this node provides an interface for.null
NODE_MODULE_NAMEstring | NoneTypenullName of the node module implementation.null
NODE_MODULE_VERSIONstring | NoneTypenullVersion of the node module implementation.null
NODE_ENABLE_REGISTRY_RESOLUTIONbooleantrueWhen true, resolve node_id from the ID Registry at startup for stable identity across restarts.true
NODE_LAB_URLAnyUrl | NoneTypenullLab Manager URL for distributed registry coordination.null
NODE_REGISTRY_LOCK_TIMEOUTnumber60.0Seconds to retry registry lock acquisition on contention at startup. Should be at least 2x the lock TTL (30s) to survive ungraceful container restarts.60.0
NODE_URL | NODE_URLAnyUrl"http://127.0.0.1:2000/"The URL used to communicate with the node. This is the base URL for the REST API."http://127.0.0.1:2000/"
NODE_UVICORN_KWARGSobject{"limit_concurrency":10}Configuration for the Uvicorn server that runs the REST API. By default, sets limit_concurrency=10 to protect against connection exhaustion attacks.{"limit_concurrency":10}
NODE_ENABLE_RATE_LIMITINGbooleantrueEnable rate limiting middleware for the REST API.true
NODE_RATE_LIMIT_REQUESTSinteger100Maximum number of requests allowed per long time window (only used if enable_rate_limiting is True).100
NODE_RATE_LIMIT_WINDOWinteger60Long time window in seconds for rate limiting (only used if enable_rate_limiting is True).60
NODE_RATE_LIMIT_SHORT_REQUESTSinteger | NoneType50Maximum number of requests allowed per short time window for burst protection (only used if enable_rate_limiting is True). If None, short window limiting is disabled.50
NODE_RATE_LIMIT_SHORT_WINDOWinteger | NoneType1Short time window for burst protection in seconds (only used if enable_rate_limiting is True). If None, short window limiting is disabled.1
NODE_RATE_LIMIT_CLEANUP_INTERVALinteger300Interval in seconds between cleanup operations to prevent memory leaks (only used if enable_rate_limiting is True).300

PostgreSQLBackupSettings

PostgreSQL-specific backup settings.

Environment Prefix: POSTGRES_

NameTypeDefaultDescriptionExample
POSTGRES_BACKUP_DIRPath".madsci/backups"Directory for storing backups".madsci/backups"
POSTGRES_MAX_BACKUPSinteger10Maximum number of backups to retain10
POSTGRES_VALIDATE_INTEGRITYbooleantruePerform integrity validation after backuptrue
POSTGRES_COMPRESSIONbooleantrueEnable backup compressiontrue
DB_URL | DB_URLstring"postgresql://madsci:madsci@localhost:5432/resources"PostgreSQL connection URL"postgresql://madsci:madsci@localhost:5432/resources"
POSTGRES_BACKUP_FORMATstring"custom"pg_dump format: custom, plain, directory, tar"custom"

MongoDBBackupSettings

MongoDB-specific backup settings.

Environment Prefix: MONGODB_

NameTypeDefaultDescriptionExample
MONGODB_BACKUP_DIRPath".madsci/backups"Directory for storing backups".madsci/backups"
MONGODB_MAX_BACKUPSinteger10Maximum number of backups to retain10
MONGODB_VALIDATE_INTEGRITYbooleantruePerform integrity validation after backuptrue
MONGODB_COMPRESSIONbooleantrueEnable backup compressiontrue
MONGO_DB_URL | MONGO_DB_URLAnyUrl"mongodb://localhost:27017"MongoDB connection URL"mongodb://localhost:27017"
MONGODB_DATABASEstring | NoneTypenullDatabase name to backupnull
MONGODB_COLLECTIONSarray | NoneTypenullSpecific collections to backup (all if None)null

MongoDBMigrationSettings

Configuration settings for MongoDB migration operations.

Environment Prefix: MONGODB_MIGRATION_

NameTypeDefaultDescriptionExample
MONGO_DB_URL | MONGODB_URL | MONGO_URL | DATABASE_URL | DB_URLAnyUrl"mongodb://localhost:27017"MongoDB connection URL (e.g., mongodb://localhost:27017). Defaults to localhost MongoDB instance."mongodb://localhost:27017"
MONGODB_MIGRATION_DATABASEstring | NoneTypenullDatabase name to migrate (e.g., madsci_events, madsci_data)null
SCHEMA_FILE | MONGODB_SCHEMA_FILEstring | Path | NoneTypenullExplicit path to schema.json. If not provided, will auto-detect based on database name.null
MONGODB_MIGRATION_BACKUP_DIRstring | Path".madsci/backups/mongodb"Directory where database backups will be stored.".madsci/backups/mongodb"
MONGODB_MIGRATION_TARGET_VERSIONstring | NoneTypenullTarget version to migrate to (defaults to current MADSci version)null
MONGODB_MIGRATION_BACKUP_ONLYbooleanfalseOnly create a backup, do not run migrationfalse
MONGODB_MIGRATION_RESTORE_FROMstring | Path | NoneTypenullRestore from specified backup directory instead of migratingnull
MONGODB_MIGRATION_CHECK_VERSIONbooleanfalseOnly check version compatibility, do not migratefalse
MONGODB_MIGRATION_VALIDATE_SCHEMAbooleanfalseValidate current database schema against expected schemafalse

DatabaseMigrationSettings

Configuration settings for PostgreSQL database migration operations.

Environment Prefix: RESOURCES_MIGRATION_

NameTypeDefaultDescriptionExample
RESOURCES_MIGRATION_DB_URLstring | NoneTypenullPostgreSQL connection URL (e.g., postgresql://user:pass@localhost:5432/resources). If not provided, will try RESOURCES_DB_URL environment variable.null
RESOURCES_MIGRATION_TARGET_VERSIONstring | NoneTypenullTarget version to migrate to (defaults to current MADSci version)null
RESOURCES_MIGRATION_BACKUP_DIRstring | Path".madsci/backups/postgresql"Directory where database backups will be stored.".madsci/backups/postgresql"
RESOURCES_MIGRATION_BACKUP_ONLYbooleanfalseOnly create a backup, do not run migrationfalse
RESOURCES_MIGRATION_RESTORE_FROMstring | Path | NoneTypenullRestore from specified backup file instead of migratingnull
RESOURCES_MIGRATION_GENERATE_MIGRATIONstring | NoneTypenullGenerate a new migration file with the given messagenull