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

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_DEFINITIONstring | Path"data.manager.yaml"Path to the data manager definition file to use."data.manager.yaml"
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_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 | NoneType"http://localhost:8001"The URL of the Event Manager server."http://localhost:8001"
EVENT_MANAGER_DEFINITIONstring | Path"event.manager.yaml"Path to the event manager definition file to use."event.manager.yaml"
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
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

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_DEFINITION | WORKCELL_DEFINITION | MANAGER_DEFINITIONstring | Path"workcell.manager.yaml"Path to the workcell definition file to use."workcell.manager.yaml"
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
WORKCELLS_DIRECTORY | WORKCELLS_DIRECTORYstring | Path | NoneType"~/.madsci/workcells"Directory used to store workcell-related files in. Defaults to ~/.madsci/workcells. Workcell-related filess 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_INTERVALnumber1200.0The interval at which the workcell resets disconnected nodes, in seconds.1200.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_DEFINITIONstring | Path"experiment.manager.yaml"Path to the experiment manager definition file to use."experiment.manager.yaml"
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
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_DEFINITIONstring | Path"resource.manager.yaml"Path to the resource manager definition file to use."resource.manager.yaml"
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_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_DEFINITIONstring | Path"lab.manager.yaml"Path to the lab definition file to use."lab.manager.yaml"
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_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_DEFINITIONstring | Path"location.manager.yaml"Path to the location manager definition file to use."location.manager.yaml"
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_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"

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

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/mongodb/backups"Directory where database backups will be stored. Relative to CWD unless absolute is provided.".madsci/mongodb/backups"
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/postgresql/backups"Directory where database backups will be stored. Relative to the current working directory unless absolute.".madsci/postgresql/backups"
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