[System]
You are a helpful assistant that answers strictly in JSON. Here's the JSON schema you must adhere to:
<schema>
{"$defs":{"APISettings":{"description":"Settings for interacting with the Prefect API","properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The URL of the Prefect API. If not set, the client will attempt to infer it.","supported_environment_variables":["PREFECT_API_URL"],"title":"Url"},"auth_string":{"anyOf":[{"format":"password","type":"string","writeOnly":true},{"type":"null"}],"default":null,"description":"The auth string used for basic authentication with a self-hosted Prefect API. Should be kept secret.","supported_environment_variables":["PREFECT_API_AUTH_STRING"],"title":"Auth String"},"key":{"anyOf":[{"format":"password","type":"string","writeOnly":true},{"type":"null"}],"default":null,"description":"The API key used for authentication with the Prefect API. Should be kept secret.","supported_environment_variables":["PREFECT_API_KEY"],"title":"Key"},"tls_insecure_skip_verify":{"default":false,"description":"If `True`, disables SSL checking to allow insecure requests. Setting to False is recommended only during development. For example, when using self-signed certificates.","supported_environment_variables":["PREFECT_API_TLS_INSECURE_SKIP_VERIFY"],"title":"Tls Insecure Skip Verify","type":"boolean"},"ssl_cert_file":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"This configuration settings option specifies the path to an SSL certificate file.","supported_environment_variables":["PREFECT_API_SSL_CERT_FILE"],"title":"Ssl Cert File"},"enable_http2":{"default":false,"description":"If true, enable support for HTTP/2 for communicating with an API. If the API does not support HTTP/2, this will have no effect and connections will be made via HTTP/1.1.","supported_environment_variables":["PREFECT_API_ENABLE_HTTP2"],"title":"Enable Http2","type":"boolean"},"request_timeout":{"default":60.0,"description":"The default timeout for requests to the API","supported_environment_variables":["PREFECT_API_REQUEST_TIMEOUT"],"title":"Request Timeout","type":"number"}},"title":"APISettings","type":"object"},"CLISettings":{"description":"Settings for controlling CLI behavior","properties":{"colors":{"default":true,"description":"If True, use colors in CLI output. If `False`, output will not include colors codes.","supported_environment_variables":["PREFECT_CLI_COLORS"],"title":"Colors","type":"boolean"},"prompt":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"If `True`, use interactive prompts in CLI commands. If `False`, no interactive prompts will be used. If `None`, the value will be dynamically determined based on the presence of an interactive-enabled terminal.","supported_environment_variables":["PREFECT_CLI_PROMPT"],"title":"Prompt"},"wrap_lines":{"default":true,"description":"If `True`, wrap text by inserting new lines in long lines in CLI output. If `False`, output will not be wrapped.","supported_environment_variables":["PREFECT_CLI_WRAP_LINES"],"title":"Wrap Lines","type":"boolean"}},"title":"CLISettings","type":"object"},"ClientMetricsSettings":{"description":"Settings for controlling metrics reporting from the client","properties":{"enabled":{"default":false,"description":"Whether or not to enable Prometheus metrics in the client.","supported_environment_variables":["PREFECT_CLIENT_METRICS_ENABLED","PREFECT_CLIENT_ENABLE_METRICS"],"title":"Enabled","type":"boolean"},"port":{"default":4201,"description":"The port to expose the client Prometheus metrics on.","supported_environment_variables":["PREFECT_CLIENT_METRICS_PORT"],"title":"Port","type":"integer"}},"title":"ClientMetricsSettings","type":"object"},"ClientSettings":{"description":"Settings for controlling API client behavior","properties":{"max_retries":{"default":5,"description":"\n        The maximum number of retries to perform on failed HTTP requests.\n        Defaults to 5. Set to 0 to disable retries.\n        See `PREFECT_CLIENT_RETRY_EXTRA_CODES` for details on which HTTP status codes are\n        retried.\n        ","minimum":0,"supported_environment_variables":["PREFECT_CLIENT_MAX_RETRIES"],"title":"Max Retries","type":"integer"},"retry_jitter_factor":{"default":0.2,"description":"\n        A value greater than or equal to zero to control the amount of jitter added to retried\n        client requests. Higher values introduce larger amounts of jitter.\n        Set to 0 to disable jitter. See `clamped_poisson_interval` for details on the how jitter\n        can affect retry lengths.\n        ","minimum":0.0,"supported_environment_variables":["PREFECT_CLIENT_RETRY_JITTER_FACTOR"],"title":"Retry Jitter Factor","type":"number"},"retry_extra_codes":{"anyOf":[{"type":"string"},{"maximum":599,"minimum":100,"type":"integer"},{"items":{"maximum":599,"minimum":100,"type":"integer"},"type":"array","uniqueItems":true},{"type":"null"}],"description":"\n        A list of extra HTTP status codes to retry on. Defaults to an empty list.\n        429, 502 and 503 are always retried. Please note that not all routes are idempotent and retrying\n        may result in unexpected behavior.\n        ","examples":["404,429,503","429",[404,429,503]],"supported_environment_variables":["PREFECT_CLIENT_RETRY_EXTRA_CODES"],"title":"Retry Extra Codes"},"csrf_support_enabled":{"default":true,"description":"\n        Determines if CSRF token handling is active in the Prefect client for API\n        requests.\n\n        When enabled (`True`), the client automatically manages CSRF tokens by\n        retrieving, storing, and including them in applicable state-changing requests\n        ","supported_environment_variables":["PREFECT_CLIENT_CSRF_SUPPORT_ENABLED"],"title":"Csrf Support Enabled","type":"boolean"},"metrics":{"$ref":"#/$defs/ClientMetricsSettings","supported_environment_variables":[]}},"title":"ClientSettings","type":"object"},"CloudSettings":{"description":"Settings for interacting with Prefect Cloud","properties":{"api_url":{"default":"https://api.prefect.cloud/api","description":"API URL for Prefect Cloud. Used for authentication with Prefect Cloud.","supported_environment_variables":["PREFECT_CLOUD_API_URL"],"title":"Api Url","type":"string"},"enable_orchestration_telemetry":{"default":true,"description":"Whether or not to enable orchestration telemetry.","supported_environment_variables":["PREFECT_CLOUD_ENABLE_ORCHESTRATION_TELEMETRY"],"title":"Enable Orchestration Telemetry","type":"boolean"},"ui_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The URL of the Prefect Cloud UI. If not set, the client will attempt to infer it.","supported_environment_variables":["PREFECT_CLOUD_UI_URL"],"title":"Ui Url"}},"title":"CloudSettings","type":"object"},"DeploymentsSettings":{"description":"Settings for configuring deployments defaults","properties":{"default_work_pool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The default work pool to use when creating deployments.","supported_environment_variables":["PREFECT_DEPLOYMENTS_DEFAULT_WORK_POOL_NAME","PREFECT_DEFAULT_WORK_POOL_NAME"],"title":"Default Work Pool Name"},"default_docker_build_namespace":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The default Docker namespace to use when building images.","examples":["my-dockerhub-registry","4999999999999.dkr.ecr.us-east-2.amazonaws.com/my-ecr-repo"],"supported_environment_variables":["PREFECT_DEPLOYMENTS_DEFAULT_DOCKER_BUILD_NAMESPACE","PREFECT_DEFAULT_DOCKER_BUILD_NAMESPACE"],"title":"Default Docker Build Namespace"}},"title":"DeploymentsSettings","type":"object"},"ExperimentsSettings":{"description":"Settings for configuring experimental features","properties":{"warn":{"default":true,"description":"If `True`, warn on usage of experimental features.","supported_environment_variables":["PREFECT_EXPERIMENTS_WARN","PREFECT_EXPERIMENTAL_WARN"],"title":"Warn","type":"boolean"},"lineage_events_enabled":{"default":false,"description":"If `True`, enables emitting lineage events. Set to `False` to disable lineage event emission.","supported_environment_variables":["PREFECT_EXPERIMENTS_LINEAGE_EVENTS_ENABLED"],"title":"Lineage Events Enabled","type":"boolean"}},"title":"ExperimentsSettings","type":"object"},"FlowsSettings":{"description":"Settings for controlling flow behavior","properties":{"default_retries":{"default":0,"description":"This value sets the default number of retries for all flows.","minimum":0,"supported_environment_variables":["PREFECT_FLOWS_DEFAULT_RETRIES","PREFECT_FLOW_DEFAULT_RETRIES"],"title":"Default Retries","type":"integer"},"default_retry_delay_seconds":{"anyOf":[{"type":"integer"},{"type":"number"},{"items":{"type":"number"},"type":"array"}],"default":0,"description":"This value sets the default retry delay seconds for all flows.","supported_environment_variables":["PREFECT_FLOWS_DEFAULT_RETRY_DELAY_SECONDS","PREFECT_FLOW_DEFAULT_RETRY_DELAY_SECONDS"],"title":"Default Retry Delay Seconds"}},"title":"FlowsSettings","type":"object"},"InternalSettings":{"properties":{"logging_level":{"default":"ERROR","description":"The default logging level for Prefect's internal machinery loggers.","enum":["DEBUG","INFO","WARNING","ERROR","CRITICAL"],"supported_environment_variables":["PREFECT_INTERNAL_LOGGING_LEVEL","PREFECT_LOGGING_INTERNAL_LEVEL"],"title":"Logging Level","type":"string"}},"title":"InternalSettings","type":"object"},"LoggingSettings":{"description":"Settings for controlling logging behavior","properties":{"level":{"default":"INFO","description":"The default logging level for Prefect loggers.","enum":["DEBUG","INFO","WARNING","ERROR","CRITICAL"],"supported_environment_variables":["PREFECT_LOGGING_LEVEL"],"title":"Level","type":"string"},"config_path":{"description":"A path to a logging configuration file. Defaults to $PREFECT_HOME/logging.yml","format":"path","supported_environment_variables":["PREFECT_LOGGING_CONFIG_PATH","PREFECT_LOGGING_SETTINGS_PATH"],"title":"Config Path","type":"string"},"extra_loggers":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"description":"Additional loggers to attach to Prefect logging at runtime.","supported_environment_variables":["PREFECT_LOGGING_EXTRA_LOGGERS"],"title":"Extra Loggers"},"log_prints":{"default":false,"description":"If `True`, `print` statements in flows and tasks will be redirected to the Prefect logger for the given run.","supported_environment_variables":["PREFECT_LOGGING_LOG_PRINTS"],"title":"Log Prints","type":"boolean"},"colors":{"default":true,"description":"If `True`, use colors in CLI output. If `False`, output will not include colors codes.","supported_environment_variables":["PREFECT_LOGGING_COLORS"],"title":"Colors","type":"boolean"},"markup":{"default":false,"description":"\n        Whether to interpret strings wrapped in square brackets as a style.\n        This allows styles to be conveniently added to log messages, e.g.\n        `[red]This is a red message.[/red]`. However, the downside is, if enabled,\n        strings that contain square brackets may be inaccurately interpreted and\n        lead to incomplete output, e.g.\n        `[red]This is a red message.[/red]` may be interpreted as\n        `[red]This is a red message.[/red]`.\n        ","supported_environment_variables":["PREFECT_LOGGING_MARKUP"],"title":"Markup","type":"boolean"},"to_api":{"$ref":"#/$defs/LoggingToAPISettings","supported_environment_variables":[]}},"title":"LoggingSettings","type":"object"},"LoggingToAPISettings":{"description":"Settings for controlling logging to the API","properties":{"enabled":{"default":true,"description":"If `True`, logs will be sent to the API.","supported_environment_variables":["PREFECT_LOGGING_TO_API_ENABLED"],"title":"Enabled","type":"boolean"},"batch_interval":{"default":2.0,"description":"The number of seconds between batched writes of logs to the API.","supported_environment_variables":["PREFECT_LOGGING_TO_API_BATCH_INTERVAL"],"title":"Batch Interval","type":"number"},"batch_size":{"default":4000000,"description":"The number of logs to batch before sending to the API.","supported_environment_variables":["PREFECT_LOGGING_TO_API_BATCH_SIZE"],"title":"Batch Size","type":"integer"},"max_log_size":{"default":1000000,"description":"The maximum size in bytes for a single log.","supported_environment_variables":["PREFECT_LOGGING_TO_API_MAX_LOG_SIZE"],"title":"Max Log Size","type":"integer"},"when_missing_flow":{"default":"warn","description":"\n        Controls the behavior when loggers attempt to send logs to the API handler from outside of a flow.\n        \n        All logs sent to the API must be associated with a flow run. The API log handler can\n        only be used outside of a flow by manually providing a flow run identifier. Logs\n        that are not associated with a flow run will not be sent to the API. This setting can\n        be used to determine if a warning or error is displayed when the identifier is missing.\n\n        The following options are available:\n\n        - \"warn\": Log a warning message.\n        - \"error\": Raise an error.\n        - \"ignore\": Do not log a warning message or raise an error.\n        ","enum":["warn","error","ignore"],"supported_environment_variables":["PREFECT_LOGGING_TO_API_WHEN_MISSING_FLOW"],"title":"When Missing Flow","type":"string"}},"title":"LoggingToAPISettings","type":"object"},"ResultsSettings":{"description":"Settings for controlling result storage behavior","properties":{"default_serializer":{"default":"pickle","description":"The default serializer to use when not otherwise specified.","supported_environment_variables":["PREFECT_RESULTS_DEFAULT_SERIALIZER"],"title":"Default Serializer","type":"string"},"persist_by_default":{"default":false,"description":"The default setting for persisting results when not otherwise specified.","supported_environment_variables":["PREFECT_RESULTS_PERSIST_BY_DEFAULT"],"title":"Persist By Default","type":"boolean"},"default_storage_block":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The `block-type/block-document` slug of a block to use as the default result storage.","supported_environment_variables":["PREFECT_RESULTS_DEFAULT_STORAGE_BLOCK","PREFECT_DEFAULT_RESULT_STORAGE_BLOCK"],"title":"Default Storage Block"},"local_storage_path":{"description":"The default location for locally persisted results. Defaults to $PREFECT_HOME/storage.","format":"path","supported_environment_variables":["PREFECT_RESULTS_LOCAL_STORAGE_PATH","PREFECT_LOCAL_STORAGE_PATH"],"title":"Local Storage Path","type":"string"}},"title":"ResultsSettings","type":"object"},"RunnerServerSettings":{"description":"Settings for controlling runner server behavior","properties":{"enable":{"default":false,"description":"Whether or not to enable the runner's webserver.","supported_environment_variables":["PREFECT_RUNNER_SERVER_ENABLE"],"title":"Enable","type":"boolean"},"host":{"default":"localhost","description":"The host address the runner's webserver should bind to.","supported_environment_variables":["PREFECT_RUNNER_SERVER_HOST"],"title":"Host","type":"string"},"port":{"default":8080,"description":"The port the runner's webserver should bind to.","supported_environment_variables":["PREFECT_RUNNER_SERVER_PORT"],"title":"Port","type":"integer"},"log_level":{"default":"ERROR","description":"The log level of the runner's webserver.","enum":["DEBUG","INFO","WARNING","ERROR","CRITICAL"],"supported_environment_variables":["PREFECT_RUNNER_SERVER_LOG_LEVEL"],"title":"Log Level","type":"string"},"missed_polls_tolerance":{"default":2,"description":"Number of missed polls before a runner is considered unhealthy by its webserver.","supported_environment_variables":["PREFECT_RUNNER_SERVER_MISSED_POLLS_TOLERANCE"],"title":"Missed Polls Tolerance","type":"integer"}},"title":"RunnerServerSettings","type":"object"},"RunnerSettings":{"description":"Settings for controlling runner behavior","properties":{"process_limit":{"default":5,"description":"Maximum number of processes a runner will execute in parallel.","supported_environment_variables":["PREFECT_RUNNER_PROCESS_LIMIT"],"title":"Process Limit","type":"integer"},"poll_frequency":{"default":10,"description":"Number of seconds a runner should wait between queries for scheduled work.","supported_environment_variables":["PREFECT_RUNNER_POLL_FREQUENCY"],"title":"Poll Frequency","type":"integer"},"heartbeat_frequency":{"anyOf":[{"minimum":30,"type":"integer"},{"type":"null"}],"default":null,"description":"Number of seconds a runner should wait between heartbeats for flow runs.","supported_environment_variables":["PREFECT_RUNNER_HEARTBEAT_FREQUENCY"],"title":"Heartbeat Frequency"},"server":{"$ref":"#/$defs/RunnerServerSettings","supported_environment_variables":[]}},"title":"RunnerSettings","type":"object"},"SQLAlchemyConnectArgsSettings":{"description":"Settings for controlling SQLAlchemy connection behavior; note that these settings only take effect when\nusing a PostgreSQL database.","properties":{"application_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Controls the application_name field for connections opened from the connection pool when using a PostgreSQL database with the Prefect backend.","supported_environment_variables":["PREFECT_SERVER_DATABASE_SQLALCHEMY_CONNECT_ARGS_APPLICATION_NAME"],"title":"Application Name"},"statement_cache_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Controls statement cache size for PostgreSQL connections. Setting this to 0 is required when using PgBouncer in transaction mode. Defaults to None.","supported_environment_variables":["PREFECT_SERVER_DATABASE_SQLALCHEMY_CONNECT_ARGS_STATEMENT_CACHE_SIZE"],"title":"Statement Cache Size"},"prepared_statement_cache_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Controls the size of the statement cache for PostgreSQL connections. When set to 0, statement caching is disabled. Defaults to None to use SQLAlchemy's default behavior.","supported_environment_variables":["PREFECT_SERVER_DATABASE_SQLALCHEMY_CONNECT_ARGS_PREPARED_STATEMENT_CACHE_SIZE"],"title":"Prepared Statement Cache Size"},"tls":{"$ref":"#/$defs/SQLAlchemyTLSSettings","description":"Settings for controlling SQLAlchemy mTLS behavior","supported_environment_variables":[]}},"title":"SQLAlchemyConnectArgsSettings","type":"object"},"SQLAlchemySettings":{"description":"Settings for controlling SQLAlchemy behavior; note that these settings only take effect when\nusing a PostgreSQL database.","properties":{"connect_args":{"$ref":"#/$defs/SQLAlchemyConnectArgsSettings","description":"Settings for controlling SQLAlchemy connection behavior","supported_environment_variables":[]},"pool_size":{"default":5,"description":"Controls connection pool size of database connection pools from the Prefect backend.","supported_environment_variables":["PREFECT_SERVER_DATABASE_SQLALCHEMY_POOL_SIZE","PREFECT_SQLALCHEMY_POOL_SIZE"],"title":"Pool Size","type":"integer"},"pool_recycle":{"default":3600,"description":"This setting causes the pool to recycle connections after the given number of seconds has passed; set it to -1 to avoid recycling entirely.","supported_environment_variables":["PREFECT_SERVER_DATABASE_SQLALCHEMY_POOL_RECYCLE"],"title":"Pool Recycle","type":"integer"},"pool_timeout":{"anyOf":[{"type":"number"},{"type":"null"}],"default":30.0,"description":"Number of seconds to wait before giving up on getting a connection from the pool. Defaults to 30 seconds.","supported_environment_variables":["PREFECT_SERVER_DATABASE_SQLALCHEMY_POOL_TIMEOUT"],"title":"Pool Timeout"},"max_overflow":{"default":10,"description":"Controls maximum overflow of the connection pool. To prevent overflow, set to -1.","supported_environment_variables":["PREFECT_SERVER_DATABASE_SQLALCHEMY_MAX_OVERFLOW","PREFECT_SQLALCHEMY_MAX_OVERFLOW"],"title":"Max Overflow","type":"integer"}},"title":"SQLAlchemySettings","type":"object"},"SQLAlchemyTLSSettings":{"description":"Settings for controlling SQLAlchemy mTLS context when\nusing a PostgreSQL database.","properties":{"enabled":{"default":false,"description":"Controls whether connected to mTLS enabled PostgreSQL when using a PostgreSQL database with the Prefect backend.","supported_environment_variables":["PREFECT_SERVER_DATABASE_SQLALCHEMY_CONNECT_ARGS_TLS_ENABLED"],"title":"Enabled","type":"boolean"},"ca_file":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"This configuration settings option specifies the path to PostgreSQL client certificate authority file.","supported_environment_variables":["PREFECT_SERVER_DATABASE_SQLALCHEMY_CONNECT_ARGS_TLS_CA_FILE"],"title":"Ca File"},"cert_file":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"This configuration settings option specifies the path to PostgreSQL client certificate file.","supported_environment_variables":["PREFECT_SERVER_DATABASE_SQLALCHEMY_CONNECT_ARGS_TLS_CERT_FILE"],"title":"Cert File"},"key_file":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"This configuration settings option specifies the path to PostgreSQL client key file.","supported_environment_variables":["PREFECT_SERVER_DATABASE_SQLALCHEMY_CONNECT_ARGS_TLS_KEY_FILE"],"title":"Key File"},"check_hostname":{"default":true,"description":"This configuration settings option specifies whether to verify PostgreSQL server hostname.","supported_environment_variables":["PREFECT_SERVER_DATABASE_SQLALCHEMY_CONNECT_ARGS_TLS_CHECK_HOSTNAME"],"title":"Check Hostname","type":"boolean"}},"title":"SQLAlchemyTLSSettings","type":"object"},"ServerAPISettings":{"description":"Settings for controlling API server behavior","properties":{"auth_string":{"anyOf":[{"format":"password","type":"string","writeOnly":true},{"type":"null"}],"default":null,"description":"A string to use for basic authentication with the API in the form 'user:password'.","supported_environment_variables":["PREFECT_SERVER_API_AUTH_STRING"],"title":"Auth String"},"host":{"default":"127.0.0.1","description":"The API's host address (defaults to `127.0.0.1`).","supported_environment_variables":["PREFECT_SERVER_API_HOST"],"title":"Host","type":"string"},"port":{"default":4200,"description":"The API's port address (defaults to `4200`).","supported_environment_variables":["PREFECT_SERVER_API_PORT"],"title":"Port","type":"integer"},"base_path":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The base URL path to serve the API under.","examples":["/v2/api"],"supported_environment_variables":["PREFECT_SERVER_API_BASE_PATH"],"title":"Base Path"},"default_limit":{"default":200,"description":"The default limit applied to queries that can return multiple objects, such as `POST /flow_runs/filter`.","supported_environment_variables":["PREFECT_SERVER_API_DEFAULT_LIMIT","PREFECT_API_DEFAULT_LIMIT"],"title":"Default Limit","type":"integer"},"keepalive_timeout":{"default":5,"description":"\n        The API's keep alive timeout (defaults to `5`).\n        Refer to https://www.uvicorn.org/settings/#timeouts for details.\n\n        When the API is hosted behind a load balancer, you may want to set this to a value\n        greater than the load balancer's idle timeout.\n\n        Note this setting only applies when calling `prefect server start`; if hosting the\n        API with another tool you will need to configure this there instead.\n        ","supported_environment_variables":["PREFECT_SERVER_API_KEEPALIVE_TIMEOUT"],"title":"Keepalive Timeout","type":"integer"},"csrf_protection_enabled":{"default":false,"description":"\n        Controls the activation of CSRF protection for the Prefect server API.\n\n        When enabled (`True`), the server enforces CSRF validation checks on incoming\n        state-changing requests (POST, PUT, PATCH, DELETE), requiring a valid CSRF\n        token to be included in the request headers or body. This adds a layer of\n        security by preventing unauthorized or malicious sites from making requests on\n        behalf of authenticated users.\n\n        It is recommended to enable this setting in production environments where the\n        API is exposed to web clients to safeguard against CSRF attacks.\n\n        Note: Enabling this setting requires corresponding support in the client for\n        CSRF token management. See PREFECT_CLIENT_CSRF_SUPPORT_ENABLED for more.\n        ","supported_environment_variables":["PREFECT_SERVER_API_CSRF_PROTECTION_ENABLED","PREFECT_SERVER_CSRF_PROTECTION_ENABLED"],"title":"Csrf Protection Enabled","type":"boolean"},"csrf_token_expiration":{"default":"PT1H","description":"\n        Specifies the duration for which a CSRF token remains valid after being issued\n        by the server.\n\n        The default expiration time is set to 1 hour, which offers a reasonable\n        compromise. Adjust this setting based on your specific security requirements\n        and usage patterns.\n        ","format":"duration","supported_environment_variables":["PREFECT_SERVER_API_CSRF_TOKEN_EXPIRATION","PREFECT_SERVER_CSRF_TOKEN_EXPIRATION"],"title":"Csrf Token Expiration","type":"string"},"cors_allowed_origins":{"default":"*","description":"\n        A comma-separated list of origins that are authorized to make cross-origin requests to the API.\n\n        By default, this is set to `*`, which allows requests from all origins.\n        ","supported_environment_variables":["PREFECT_SERVER_API_CORS_ALLOWED_ORIGINS","PREFECT_SERVER_CORS_ALLOWED_ORIGINS"],"title":"Cors Allowed Origins","type":"string"},"cors_allowed_methods":{"default":"*","description":"\n        A comma-separated list of methods that are authorized to make cross-origin requests to the API.\n\n        By default, this is set to `*`, which allows requests from all methods.\n        ","supported_environment_variables":["PREFECT_SERVER_API_CORS_ALLOWED_METHODS","PREFECT_SERVER_CORS_ALLOWED_METHODS"],"title":"Cors Allowed Methods","type":"string"},"cors_allowed_headers":{"default":"*","description":"\n        A comma-separated list of headers that are authorized to make cross-origin requests to the API.\n\n        By default, this is set to `*`, which allows requests from all headers.\n        ","supported_environment_variables":["PREFECT_SERVER_API_CORS_ALLOWED_HEADERS","PREFECT_SERVER_CORS_ALLOWED_HEADERS"],"title":"Cors Allowed Headers","type":"string"}},"title":"ServerAPISettings","type":"object"},"ServerDatabaseSettings":{"description":"Settings for controlling server database behavior","properties":{"sqlalchemy":{"$ref":"#/$defs/SQLAlchemySettings","description":"Settings for controlling SQLAlchemy behavior","supported_environment_variables":[]},"connection_url":{"anyOf":[{"format":"password","type":"string","writeOnly":true},{"type":"null"}],"default":null,"description":"\n        A database connection URL in a SQLAlchemy-compatible\n        format. Prefect currently supports SQLite and Postgres. Note that all\n        Prefect database engines must use an async driver - for SQLite, use\n        `sqlite+aiosqlite` and for Postgres use `postgresql+asyncpg`.\n\n        SQLite in-memory databases can be used by providing the url\n        `sqlite+aiosqlite:///file::memory:?cache=shared&uri=true&check_same_thread=false`,\n        which will allow the database to be accessed by multiple threads. Note\n        that in-memory databases can not be accessed from multiple processes and\n        should only be used for simple tests.\n        ","supported_environment_variables":["PREFECT_SERVER_DATABASE_CONNECTION_URL","PREFECT_API_DATABASE_CONNECTION_URL"],"title":"Connection Url"},"driver":{"anyOf":[{"enum":["postgresql+asyncpg","sqlite+aiosqlite"],"type":"string"},{"type":"null"}],"default":null,"description":"The database driver to use when connecting to the database. If not set, the driver will be inferred from the connection URL.","supported_environment_variables":["PREFECT_SERVER_DATABASE_DRIVER","PREFECT_API_DATABASE_DRIVER"],"title":"Driver"},"host":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The database server host.","supported_environment_variables":["PREFECT_SERVER_DATABASE_HOST","PREFECT_API_DATABASE_HOST"],"title":"Host"},"port":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"The database server port.","supported_environment_variables":["PREFECT_SERVER_DATABASE_PORT","PREFECT_API_DATABASE_PORT"],"title":"Port"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The user to use when connecting to the database.","supported_environment_variables":["PREFECT_SERVER_DATABASE_USER","PREFECT_API_DATABASE_USER"],"title":"User"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The name of the Prefect database on the remote server, or the path to the database file for SQLite.","supported_environment_variables":["PREFECT_SERVER_DATABASE_NAME","PREFECT_API_DATABASE_NAME"],"title":"Name"},"password":{"anyOf":[{"format":"password","type":"string","writeOnly":true},{"type":"null"}],"default":null,"description":"The password to use when connecting to the database. Should be kept secret.","supported_environment_variables":["PREFECT_SERVER_DATABASE_PASSWORD","PREFECT_API_DATABASE_PASSWORD"],"title":"Password"},"echo":{"default":false,"description":"If `True`, SQLAlchemy will log all SQL issued to the database. Defaults to `False`.","supported_environment_variables":["PREFECT_SERVER_DATABASE_ECHO","PREFECT_API_DATABASE_ECHO"],"title":"Echo","type":"boolean"},"migrate_on_start":{"default":true,"description":"If `True`, the database will be migrated on application startup.","supported_environment_variables":["PREFECT_SERVER_DATABASE_MIGRATE_ON_START","PREFECT_API_DATABASE_MIGRATE_ON_START"],"title":"Migrate On Start","type":"boolean"},"timeout":{"anyOf":[{"type":"number"},{"type":"null"}],"default":10.0,"description":"A statement timeout, in seconds, applied to all database interactions made by the Prefect backend. Defaults to 10 seconds.","supported_environment_variables":["PREFECT_SERVER_DATABASE_TIMEOUT","PREFECT_API_DATABASE_TIMEOUT"],"title":"Timeout"},"connection_timeout":{"anyOf":[{"type":"number"},{"type":"null"}],"default":5.0,"description":"A connection timeout, in seconds, applied to database connections. Defaults to `5`.","supported_environment_variables":["PREFECT_SERVER_DATABASE_CONNECTION_TIMEOUT","PREFECT_API_DATABASE_CONNECTION_TIMEOUT"],"title":"Connection Timeout"}},"title":"ServerDatabaseSettings","type":"object"},"ServerDeploymentsSettings":{"properties":{"concurrency_slot_wait_seconds":{"default":30.0,"description":"The number of seconds to wait before retrying when a deployment flow run cannot secure a concurrency slot from the server.","minimum":0.0,"supported_environment_variables":["PREFECT_SERVER_DEPLOYMENTS_CONCURRENCY_SLOT_WAIT_SECONDS","PREFECT_DEPLOYMENT_CONCURRENCY_SLOT_WAIT_SECONDS"],"title":"Concurrency Slot Wait Seconds","type":"number"}},"title":"ServerDeploymentsSettings","type":"object"},"ServerEphemeralSettings":{"description":"Settings for controlling ephemeral server behavior","properties":{"enabled":{"default":false,"description":"\n        Controls whether or not a subprocess server can be started when no API URL is provided.\n        ","supported_environment_variables":["PREFECT_SERVER_EPHEMERAL_ENABLED","PREFECT_SERVER_ALLOW_EPHEMERAL_MODE"],"title":"Enabled","type":"boolean"},"startup_timeout_seconds":{"default":20,"description":"\n        The number of seconds to wait for the server to start when ephemeral mode is enabled.\n        Defaults to `20`.\n        ","supported_environment_variables":["PREFECT_SERVER_EPHEMERAL_STARTUP_TIMEOUT_SECONDS"],"title":"Startup Timeout Seconds","type":"integer"}},"title":"ServerEphemeralSettings","type":"object"},"ServerEventsSettings":{"description":"Settings for controlling behavior of the events subsystem","properties":{"stream_out_enabled":{"default":true,"description":"Whether or not to stream events out to the API via websockets.","supported_environment_variables":["PREFECT_SERVER_EVENTS_STREAM_OUT_ENABLED","PREFECT_API_EVENTS_STREAM_OUT_ENABLED"],"title":"Stream Out Enabled","type":"boolean"},"related_resource_cache_ttl":{"default":"PT5M","description":"The number of seconds to cache related resources for in the API.","format":"duration","supported_environment_variables":["PREFECT_SERVER_EVENTS_RELATED_RESOURCE_CACHE_TTL","PREFECT_API_EVENTS_RELATED_RESOURCE_CACHE_TTL"],"title":"Related Resource Cache Ttl","type":"string"},"maximum_labels_per_resource":{"default":500,"description":"The maximum number of labels a resource may have.","supported_environment_variables":["PREFECT_SERVER_EVENTS_MAXIMUM_LABELS_PER_RESOURCE","PREFECT_EVENTS_MAXIMUM_LABELS_PER_RESOURCE"],"title":"Maximum Labels Per Resource","type":"integer"},"maximum_related_resources":{"default":100,"description":"The maximum number of related resources an Event may have.","supported_environment_variables":["PREFECT_SERVER_EVENTS_MAXIMUM_RELATED_RESOURCES","PREFECT_EVENTS_MAXIMUM_RELATED_RESOURCES"],"title":"Maximum Related Resources","type":"integer"},"maximum_size_bytes":{"default":1500000,"description":"The maximum size of an Event when serialized to JSON","supported_environment_variables":["PREFECT_SERVER_EVENTS_MAXIMUM_SIZE_BYTES","PREFECT_EVENTS_MAXIMUM_SIZE_BYTES"],"title":"Maximum Size Bytes","type":"integer"},"expired_bucket_buffer":{"default":"PT1M","description":"The amount of time to retain expired automation buckets","format":"duration","supported_environment_variables":["PREFECT_SERVER_EVENTS_EXPIRED_BUCKET_BUFFER","PREFECT_EVENTS_EXPIRED_BUCKET_BUFFER"],"title":"Expired Bucket Buffer","type":"string"},"proactive_granularity":{"default":"PT5S","description":"How frequently proactive automations are evaluated","format":"duration","supported_environment_variables":["PREFECT_SERVER_EVENTS_PROACTIVE_GRANULARITY","PREFECT_EVENTS_PROACTIVE_GRANULARITY"],"title":"Proactive Granularity","type":"string"},"retention_period":{"default":"P7D","description":"The amount of time to retain events in the database.","format":"duration","supported_environment_variables":["PREFECT_SERVER_EVENTS_RETENTION_PERIOD","PREFECT_EVENTS_RETENTION_PERIOD"],"title":"Retention Period","type":"string"},"maximum_websocket_backfill":{"default":"PT15M","description":"The maximum range to look back for backfilling events for a websocket subscriber.","format":"duration","supported_environment_variables":["PREFECT_SERVER_EVENTS_MAXIMUM_WEBSOCKET_BACKFILL","PREFECT_EVENTS_MAXIMUM_WEBSOCKET_BACKFILL"],"title":"Maximum Websocket Backfill","type":"string"},"websocket_backfill_page_size":{"default":250,"description":"The page size for the queries to backfill events for websocket subscribers.","exclusiveMinimum":0,"supported_environment_variables":["PREFECT_SERVER_EVENTS_WEBSOCKET_BACKFILL_PAGE_SIZE","PREFECT_EVENTS_WEBSOCKET_BACKFILL_PAGE_SIZE"],"title":"Websocket Backfill Page Size","type":"integer"},"messaging_broker":{"default":"prefect.server.utilities.messaging.memory","description":"Which message broker implementation to use for the messaging system, should point to a module that exports a Publisher and Consumer class.","supported_environment_variables":["PREFECT_SERVER_EVENTS_MESSAGING_BROKER","PREFECT_MESSAGING_BROKER"],"title":"Messaging Broker","type":"string"},"messaging_cache":{"default":"prefect.server.utilities.messaging.memory","description":"Which cache implementation to use for the events system. Should point to a module that exports a Cache class.","supported_environment_variables":["PREFECT_SERVER_EVENTS_MESSAGING_CACHE","PREFECT_MESSAGING_CACHE"],"title":"Messaging Cache","type":"string"},"maximum_event_name_length":{"default":1024,"description":"The maximum length of an event name.","exclusiveMinimum":0,"supported_environment_variables":["PREFECT_SERVER_EVENTS_MAXIMUM_EVENT_NAME_LENGTH"],"title":"Maximum Event Name Length","type":"integer"}},"title":"ServerEventsSettings","type":"object"},"ServerFlowRunGraphSettings":{"description":"Settings for controlling behavior of the flow run graph","properties":{"max_nodes":{"default":10000,"description":"The maximum size of a flow run graph on the v2 API","supported_environment_variables":["PREFECT_SERVER_FLOW_RUN_GRAPH_MAX_NODES","PREFECT_API_MAX_FLOW_RUN_GRAPH_NODES"],"title":"Max Nodes","type":"integer"},"max_artifacts":{"default":10000,"description":"The maximum number of artifacts to show on a flow run graph on the v2 API","supported_environment_variables":["PREFECT_SERVER_FLOW_RUN_GRAPH_MAX_ARTIFACTS","PREFECT_API_MAX_FLOW_RUN_GRAPH_ARTIFACTS"],"title":"Max Artifacts","type":"integer"}},"title":"ServerFlowRunGraphSettings","type":"object"},"ServerLogsSettings":{"description":"Settings for controlling behavior of the logs subsystem","properties":{"stream_out_enabled":{"default":false,"description":"Whether or not to stream logs out to the API via websockets.","supported_environment_variables":["PREFECT_SERVER_LOGS_STREAM_OUT_ENABLED"],"title":"Stream Out Enabled","type":"boolean"},"stream_publishing_enabled":{"default":false,"description":"Whether or not to publish logs to the streaming system.","supported_environment_variables":["PREFECT_SERVER_LOGS_STREAM_PUBLISHING_ENABLED"],"title":"Stream Publishing Enabled","type":"boolean"}},"title":"ServerLogsSettings","type":"object"},"ServerServicesCancellationCleanupSettings":{"description":"Settings for controlling the cancellation cleanup service","properties":{"enabled":{"default":true,"description":"Whether or not to start the cancellation cleanup service in the server application.","supported_environment_variables":["PREFECT_SERVER_SERVICES_CANCELLATION_CLEANUP_ENABLED","PREFECT_API_SERVICES_CANCELLATION_CLEANUP_ENABLED"],"title":"Enabled","type":"boolean"},"loop_seconds":{"default":20,"description":"The cancellation cleanup service will look for non-terminal tasks and subflows this often. Defaults to `20`.","supported_environment_variables":["PREFECT_SERVER_SERVICES_CANCELLATION_CLEANUP_LOOP_SECONDS","PREFECT_API_SERVICES_CANCELLATION_CLEANUP_LOOP_SECONDS"],"title":"Loop Seconds","type":"number"}},"title":"ServerServicesCancellationCleanupSettings","type":"object"},"ServerServicesEventLoggerSettings":{"description":"Settings for controlling the event logger service","properties":{"enabled":{"default":false,"description":"Whether or not to start the event logger service in the server application.","supported_environment_variables":["PREFECT_SERVER_SERVICES_EVENT_LOGGER_ENABLED","PREFECT_API_SERVICES_EVENT_LOGGER_ENABLED"],"title":"Enabled","type":"boolean"}},"title":"ServerServicesEventLoggerSettings","type":"object"},"ServerServicesEventPersisterSettings":{"description":"Settings for controlling the event persister service","properties":{"enabled":{"default":true,"description":"Whether or not to start the event persister service in the server application.","supported_environment_variables":["PREFECT_SERVER_SERVICES_EVENT_PERSISTER_ENABLED","PREFECT_API_SERVICES_EVENT_PERSISTER_ENABLED"],"title":"Enabled","type":"boolean"},"batch_size":{"default":20,"description":"The number of events the event persister will attempt to insert in one batch.","exclusiveMinimum":0,"supported_environment_variables":["PREFECT_SERVER_SERVICES_EVENT_PERSISTER_BATCH_SIZE","PREFECT_API_SERVICES_EVENT_PERSISTER_BATCH_SIZE"],"title":"Batch Size","type":"integer"},"flush_interval":{"default":5,"description":"The maximum number of seconds between flushes of the event persister.","exclusiveMinimum":0.0,"supported_environment_variables":["PREFECT_SERVER_SERVICES_EVENT_PERSISTER_FLUSH_INTERVAL","PREFECT_API_SERVICES_EVENT_PERSISTER_FLUSH_INTERVAL"],"title":"Flush Interval","type":"number"},"batch_size_delete":{"default":10000,"description":"The number of expired events and event resources the event persister will attempt to delete in one batch.","exclusiveMinimum":0,"supported_environment_variables":["PREFECT_SERVER_SERVICES_EVENT_PERSISTER_BATCH_SIZE_DELETE"],"title":"Batch Size Delete","type":"integer"}},"title":"ServerServicesEventPersisterSettings","type":"object"},"ServerServicesForemanSettings":{"description":"Settings for controlling the foreman service","properties":{"enabled":{"default":true,"description":"Whether or not to start the foreman service in the server application.","supported_environment_variables":["PREFECT_SERVER_SERVICES_FOREMAN_ENABLED","PREFECT_API_SERVICES_FOREMAN_ENABLED"],"title":"Enabled","type":"boolean"},"loop_seconds":{"default":15,"description":"The foreman service will check for offline workers this often. Defaults to `15`.","supported_environment_variables":["PREFECT_SERVER_SERVICES_FOREMAN_LOOP_SECONDS","PREFECT_API_SERVICES_FOREMAN_LOOP_SECONDS"],"title":"Loop Seconds","type":"number"},"inactivity_heartbeat_multiple":{"default":3,"description":"\n        The number of heartbeats that must be missed before a worker is marked as offline. Defaults to `3`.\n        ","supported_environment_variables":["PREFECT_SERVER_SERVICES_FOREMAN_INACTIVITY_HEARTBEAT_MULTIPLE","PREFECT_API_SERVICES_FOREMAN_INACTIVITY_HEARTBEAT_MULTIPLE"],"title":"Inactivity Heartbeat Multiple","type":"integer"},"fallback_heartbeat_interval_seconds":{"default":30,"description":"\n        The number of seconds to use for online/offline evaluation if a worker's heartbeat\n        interval is not set. Defaults to `30`.\n        ","supported_environment_variables":["PREFECT_SERVER_SERVICES_FOREMAN_FALLBACK_HEARTBEAT_INTERVAL_SECONDS","PREFECT_API_SERVICES_FOREMAN_FALLBACK_HEARTBEAT_INTERVAL_SECONDS"],"title":"Fallback Heartbeat Interval Seconds","type":"integer"},"deployment_last_polled_timeout_seconds":{"default":60,"description":"\n        The number of seconds before a deployment is marked as not ready if it has not been\n        polled. Defaults to `60`.\n        ","supported_environment_variables":["PREFECT_SERVER_SERVICES_FOREMAN_DEPLOYMENT_LAST_POLLED_TIMEOUT_SECONDS","PREFECT_API_SERVICES_FOREMAN_DEPLOYMENT_LAST_POLLED_TIMEOUT_SECONDS"],"title":"Deployment Last Polled Timeout Seconds","type":"integer"},"work_queue_last_polled_timeout_seconds":{"default":60,"description":"\n        The number of seconds before a work queue is marked as not ready if it has not been\n        polled. Defaults to `60`.\n        ","supported_environment_variables":["PREFECT_SERVER_SERVICES_FOREMAN_WORK_QUEUE_LAST_POLLED_TIMEOUT_SECONDS","PREFECT_API_SERVICES_FOREMAN_WORK_QUEUE_LAST_POLLED_TIMEOUT_SECONDS"],"title":"Work Queue Last Polled Timeout Seconds","type":"integer"}},"title":"ServerServicesForemanSettings","type":"object"},"ServerServicesLateRunsSettings":{"description":"Settings for controlling the late runs service","properties":{"enabled":{"default":true,"description":"Whether or not to start the late runs service in the server application.","supported_environment_variables":["PREFECT_SERVER_SERVICES_LATE_RUNS_ENABLED","PREFECT_API_SERVICES_LATE_RUNS_ENABLED"],"title":"Enabled","type":"boolean"},"loop_seconds":{"default":5,"description":"\n        The late runs service will look for runs to mark as late this often. Defaults to `5`.\n        ","supported_environment_variables":["PREFECT_SERVER_SERVICES_LATE_RUNS_LOOP_SECONDS","PREFECT_API_SERVICES_LATE_RUNS_LOOP_SECONDS"],"title":"Loop Seconds","type":"number"},"after_seconds":{"default":"PT15S","description":"\n        The late runs service will mark runs as late after they have exceeded their scheduled start time by this many seconds. Defaults to `5` seconds.\n        ","format":"duration","supported_environment_variables":["PREFECT_SERVER_SERVICES_LATE_RUNS_AFTER_SECONDS","PREFECT_API_SERVICES_LATE_RUNS_AFTER_SECONDS"],"title":"After Seconds","type":"string"}},"title":"ServerServicesLateRunsSettings","type":"object"},"ServerServicesPauseExpirationsSettings":{"description":"Settings for controlling the pause expiration service","properties":{"enabled":{"default":true,"description":"\n        Whether or not to start the paused flow run expiration service in the server\n        application. If disabled, paused flows that have timed out will remain in a Paused state\n        until a resume attempt.\n        ","supported_environment_variables":["PREFECT_SERVER_SERVICES_PAUSE_EXPIRATIONS_ENABLED","PREFECT_API_SERVICES_PAUSE_EXPIRATIONS_ENABLED"],"title":"Enabled","type":"boolean"},"loop_seconds":{"default":5,"description":"\n        The pause expiration service will look for runs to mark as failed this often. Defaults to `5`.\n        ","supported_environment_variables":["PREFECT_SERVER_SERVICES_PAUSE_EXPIRATIONS_LOOP_SECONDS","PREFECT_API_SERVICES_PAUSE_EXPIRATIONS_LOOP_SECONDS"],"title":"Loop Seconds","type":"number"}},"title":"ServerServicesPauseExpirationsSettings","type":"object"},"ServerServicesSchedulerSettings":{"description":"Settings for controlling the scheduler service","properties":{"enabled":{"default":true,"description":"Whether or not to start the scheduler service in the server application.","supported_environment_variables":["PREFECT_SERVER_SERVICES_SCHEDULER_ENABLED","PREFECT_API_SERVICES_SCHEDULER_ENABLED"],"title":"Enabled","type":"boolean"},"loop_seconds":{"default":60,"description":"\n        The scheduler loop interval, in seconds. This determines\n        how often the scheduler will attempt to schedule new flow runs, but has no\n        impact on how quickly either flow runs or task runs are actually executed.\n        Defaults to `60`.\n        ","supported_environment_variables":["PREFECT_SERVER_SERVICES_SCHEDULER_LOOP_SECONDS","PREFECT_API_SERVICES_SCHEDULER_LOOP_SECONDS"],"title":"Loop Seconds","type":"number"},"deployment_batch_size":{"default":100,"description":"\n        The number of deployments the scheduler will attempt to\n        schedule in a single batch. If there are more deployments than the batch\n        size, the scheduler immediately attempts to schedule the next batch; it\n        does not sleep for `scheduler_loop_seconds` until it has visited every\n        deployment once. Defaults to `100`.\n        ","supported_environment_variables":["PREFECT_SERVER_SERVICES_SCHEDULER_DEPLOYMENT_BATCH_SIZE","PREFECT_API_SERVICES_SCHEDULER_DEPLOYMENT_BATCH_SIZE"],"title":"Deployment Batch Size","type":"integer"},"max_runs":{"default":100,"description":"\n        The scheduler will attempt to schedule up to this many\n        auto-scheduled runs in the future. Note that runs may have fewer than\n        this many scheduled runs, depending on the value of\n        `scheduler_max_scheduled_time`.  Defaults to `100`.\n        ","supported_environment_variables":["PREFECT_SERVER_SERVICES_SCHEDULER_MAX_RUNS","PREFECT_API_SERVICES_SCHEDULER_MAX_RUNS"],"title":"Max Runs","type":"integer"},"min_runs":{"default":3,"description":"\n        The scheduler will attempt to schedule at least this many\n        auto-scheduled runs in the future. Note that runs may have more than\n        this many scheduled runs, depending on the value of\n        `scheduler_min_scheduled_time`.  Defaults to `3`.\n        ","supported_environment_variables":["PREFECT_SERVER_SERVICES_SCHEDULER_MIN_RUNS","PREFECT_API_SERVICES_SCHEDULER_MIN_RUNS"],"title":"Min Runs","type":"integer"},"max_scheduled_time":{"default":"P100D","description":"\n        The scheduler will create new runs up to this far in the\n        future. Note that this setting will take precedence over\n        `scheduler_max_runs`: if a flow runs once a month and\n        `scheduler_max_scheduled_time` is three months, then only three runs will be\n        scheduled. Defaults to 100 days (`8640000` seconds).\n        ","format":"duration","supported_environment_variables":["PREFECT_SERVER_SERVICES_SCHEDULER_MAX_SCHEDULED_TIME","PREFECT_API_SERVICES_SCHEDULER_MAX_SCHEDULED_TIME"],"title":"Max Scheduled Time","type":"string"},"min_scheduled_time":{"default":"PT1H","description":"\n        The scheduler will create new runs at least this far in the\n        future. Note that this setting will take precedence over `scheduler_min_runs`:\n        if a flow runs every hour and `scheduler_min_scheduled_time` is three hours,\n        then three runs will be scheduled even if `scheduler_min_runs` is 1. Defaults to\n        ","format":"duration","supported_environment_variables":["PREFECT_SERVER_SERVICES_SCHEDULER_MIN_SCHEDULED_TIME","PREFECT_API_SERVICES_SCHEDULER_MIN_SCHEDULED_TIME"],"title":"Min Scheduled Time","type":"string"},"insert_batch_size":{"default":500,"description":"\n        The number of runs the scheduler will attempt to insert in a single batch.\n        Defaults to `500`.\n        ","supported_environment_variables":["PREFECT_SERVER_SERVICES_SCHEDULER_INSERT_BATCH_SIZE","PREFECT_API_SERVICES_SCHEDULER_INSERT_BATCH_SIZE"],"title":"Insert Batch Size","type":"integer"},"recent_deployments_loop_seconds":{"default":5,"description":"\n        The number of seconds the recent deployments scheduler will wait between checking for recently updated deployments. Defaults to `5`.\n        ","supported_environment_variables":["PREFECT_SERVER_SERVICES_SCHEDULER_RECENT_DEPLOYMENTS_LOOP_SECONDS"],"title":"Recent Deployments Loop Seconds","type":"number"}},"title":"ServerServicesSchedulerSettings","type":"object"},"ServerServicesSettings":{"description":"Settings for controlling server services","properties":{"cancellation_cleanup":{"$ref":"#/$defs/ServerServicesCancellationCleanupSettings","supported_environment_variables":[]},"event_persister":{"$ref":"#/$defs/ServerServicesEventPersisterSettings","supported_environment_variables":[]},"event_logger":{"$ref":"#/$defs/ServerServicesEventLoggerSettings","supported_environment_variables":[]},"foreman":{"$ref":"#/$defs/ServerServicesForemanSettings","supported_environment_variables":[]},"late_runs":{"$ref":"#/$defs/ServerServicesLateRunsSettings","supported_environment_variables":[]},"scheduler":{"$ref":"#/$defs/ServerServicesSchedulerSettings","supported_environment_variables":[]},"pause_expirations":{"$ref":"#/$defs/ServerServicesPauseExpirationsSettings","supported_environment_variables":[]},"task_run_recorder":{"$ref":"#/$defs/ServerServicesTaskRunRecorderSettings","supported_environment_variables":[]},"triggers":{"$ref":"#/$defs/ServerServicesTriggersSettings","supported_environment_variables":[]}},"title":"ServerServicesSettings","type":"object"},"ServerServicesTaskRunRecorderSettings":{"description":"Settings for controlling the task run recorder service","properties":{"enabled":{"default":true,"description":"Whether or not to start the task run recorder service in the server application.","supported_environment_variables":["PREFECT_SERVER_SERVICES_TASK_RUN_RECORDER_ENABLED","PREFECT_API_SERVICES_TASK_RUN_RECORDER_ENABLED"],"title":"Enabled","type":"boolean"}},"title":"ServerServicesTaskRunRecorderSettings","type":"object"},"ServerServicesTriggersSettings":{"description":"Settings for controlling the triggers service","properties":{"enabled":{"default":true,"description":"Whether or not to start the triggers service in the server application.","supported_environment_variables":["PREFECT_SERVER_SERVICES_TRIGGERS_ENABLED","PREFECT_API_SERVICES_TRIGGERS_ENABLED"],"title":"Enabled","type":"boolean"},"pg_notify_reconnect_interval_seconds":{"default":10,"description":"\n        The number of seconds to wait before reconnecting to the PostgreSQL NOTIFY/LISTEN \n        connection after an error. Only used when using PostgreSQL as the database.\n        Defaults to `10`.\n        ","supported_environment_variables":["PREFECT_SERVER_SERVICES_TRIGGERS_PG_NOTIFY_RECONNECT_INTERVAL_SECONDS"],"title":"Pg Notify Reconnect Interval Seconds","type":"integer"},"pg_notify_heartbeat_interval_seconds":{"default":5,"description":"\n        The number of seconds between heartbeat checks for the PostgreSQL NOTIFY/LISTEN \n        connection to ensure it's still alive. Only used when using PostgreSQL as the database.\n        Defaults to `5`.\n        ","supported_environment_variables":["PREFECT_SERVER_SERVICES_TRIGGERS_PG_NOTIFY_HEARTBEAT_INTERVAL_SECONDS"],"title":"Pg Notify Heartbeat Interval Seconds","type":"integer"}},"title":"ServerServicesTriggersSettings","type":"object"},"ServerSettings":{"description":"Settings for controlling server behavior","properties":{"logging_level":{"default":"WARNING","description":"The default logging level for the Prefect API server.","enum":["DEBUG","INFO","WARNING","ERROR","CRITICAL"],"supported_environment_variables":["PREFECT_SERVER_LOGGING_LEVEL","PREFECT_LOGGING_SERVER_LEVEL"],"title":"Logging Level","type":"string"},"analytics_enabled":{"default":true,"description":"\n        When enabled, Prefect sends anonymous data (e.g. count of flow runs, package version)\n        on server startup to help us improve our product.\n        ","supported_environment_variables":["PREFECT_SERVER_ANALYTICS_ENABLED"],"title":"Analytics Enabled","type":"boolean"},"metrics_enabled":{"default":false,"description":"Whether or not to enable Prometheus metrics in the API.","supported_environment_variables":["PREFECT_SERVER_METRICS_ENABLED","PREFECT_API_ENABLE_METRICS"],"title":"Metrics Enabled","type":"boolean"},"log_retryable_errors":{"default":false,"description":"If `True`, log retryable errors in the API and it's services.","supported_environment_variables":["PREFECT_SERVER_LOG_RETRYABLE_ERRORS","PREFECT_API_LOG_RETRYABLE_ERRORS"],"title":"Log Retryable Errors","type":"boolean"},"register_blocks_on_start":{"default":true,"description":"If set, any block types that have been imported will be registered with the backend on application startup. If not set, block types must be manually registered.","supported_environment_variables":["PREFECT_SERVER_REGISTER_BLOCKS_ON_START","PREFECT_API_BLOCKS_REGISTER_ON_START"],"title":"Register Blocks On Start","type":"boolean"},"memoize_block_auto_registration":{"default":true,"description":"Controls whether or not block auto-registration on start","supported_environment_variables":["PREFECT_SERVER_MEMOIZE_BLOCK_AUTO_REGISTRATION","PREFECT_MEMOIZE_BLOCK_AUTO_REGISTRATION"],"title":"Memoize Block Auto Registration","type":"boolean"},"memo_store_path":{"description":"Path to the memo store file. Defaults to $PREFECT_HOME/memo_store.toml","format":"path","supported_environment_variables":["PREFECT_SERVER_MEMO_STORE_PATH","PREFECT_MEMO_STORE_PATH"],"title":"Memo Store Path","type":"string"},"deployment_schedule_max_scheduled_runs":{"default":50,"description":"The maximum number of scheduled runs to create for a deployment.","supported_environment_variables":["PREFECT_SERVER_DEPLOYMENT_SCHEDULE_MAX_SCHEDULED_RUNS","PREFECT_DEPLOYMENT_SCHEDULE_MAX_SCHEDULED_RUNS"],"title":"Deployment Schedule Max Scheduled Runs","type":"integer"},"api":{"$ref":"#/$defs/ServerAPISettings","supported_environment_variables":[]},"database":{"$ref":"#/$defs/ServerDatabaseSettings","supported_environment_variables":[]},"deployments":{"$ref":"#/$defs/ServerDeploymentsSettings","description":"Settings for controlling server deployments behavior","supported_environment_variables":[]},"ephemeral":{"$ref":"#/$defs/ServerEphemeralSettings","supported_environment_variables":[]},"events":{"$ref":"#/$defs/ServerEventsSettings","description":"Settings for controlling server events behavior","supported_environment_variables":[]},"flow_run_graph":{"$ref":"#/$defs/ServerFlowRunGraphSettings","description":"Settings for controlling flow run graph behavior","supported_environment_variables":[]},"logs":{"$ref":"#/$defs/ServerLogsSettings","description":"Settings for controlling server logs behavior","supported_environment_variables":[]},"services":{"$ref":"#/$defs/ServerServicesSettings","description":"Settings for controlling server services behavior","supported_environment_variables":[]},"tasks":{"$ref":"#/$defs/ServerTasksSettings","description":"Settings for controlling server tasks behavior","supported_environment_variables":[]},"ui":{"$ref":"#/$defs/ServerUISettings","description":"Settings for controlling server UI behavior","supported_environment_variables":[]}},"title":"ServerSettings","type":"object"},"ServerTasksSchedulingSettings":{"description":"Settings for controlling server-side behavior related to task scheduling","properties":{"max_scheduled_queue_size":{"default":1000,"description":"The maximum number of scheduled tasks to queue for submission.","supported_environment_variables":["PREFECT_SERVER_TASKS_SCHEDULING_MAX_SCHEDULED_QUEUE_SIZE","PREFECT_TASK_SCHEDULING_MAX_SCHEDULED_QUEUE_SIZE"],"title":"Max Scheduled Queue Size","type":"integer"},"max_retry_queue_size":{"default":100,"description":"The maximum number of retries to queue for submission.","supported_environment_variables":["PREFECT_SERVER_TASKS_SCHEDULING_MAX_RETRY_QUEUE_SIZE","PREFECT_TASK_SCHEDULING_MAX_RETRY_QUEUE_SIZE"],"title":"Max Retry Queue Size","type":"integer"},"pending_task_timeout":{"default":"PT0S","description":"How long before a PENDING task are made available to another task worker.","format":"duration","supported_environment_variables":["PREFECT_SERVER_TASKS_SCHEDULING_PENDING_TASK_TIMEOUT","PREFECT_TASK_SCHEDULING_PENDING_TASK_TIMEOUT"],"title":"Pending Task Timeout","type":"string"}},"title":"ServerTasksSchedulingSettings","type":"object"},"ServerTasksSettings":{"description":"Settings for controlling server-side behavior related to tasks","properties":{"tag_concurrency_slot_wait_seconds":{"default":30,"description":"The number of seconds to wait before retrying when a task run cannot secure a concurrency slot from the server.","minimum":0,"supported_environment_variables":["PREFECT_SERVER_TASKS_TAG_CONCURRENCY_SLOT_WAIT_SECONDS","PREFECT_TASK_RUN_TAG_CONCURRENCY_SLOT_WAIT_SECONDS"],"title":"Tag Concurrency Slot Wait Seconds","type":"number"},"max_cache_key_length":{"default":2000,"description":"The maximum number of characters allowed for a task run cache key.","supported_environment_variables":["PREFECT_SERVER_TASKS_MAX_CACHE_KEY_LENGTH","PREFECT_API_TASK_CACHE_KEY_MAX_LENGTH"],"title":"Max Cache Key Length","type":"integer"},"scheduling":{"$ref":"#/$defs/ServerTasksSchedulingSettings","supported_environment_variables":[]}},"title":"ServerTasksSettings","type":"object"},"ServerUISettings":{"properties":{"enabled":{"default":true,"description":"Whether or not to serve the Prefect UI.","supported_environment_variables":["PREFECT_SERVER_UI_ENABLED","PREFECT_UI_ENABLED"],"title":"Enabled","type":"boolean"},"api_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The connection url for communication from the UI to the API. Defaults to `PREFECT_API_URL` if set. Otherwise, the default URL is generated from `PREFECT_SERVER_API_HOST` and `PREFECT_SERVER_API_PORT`.","supported_environment_variables":["PREFECT_SERVER_UI_API_URL","PREFECT_UI_API_URL"],"title":"Api Url"},"serve_base":{"default":"/","description":"The base URL path to serve the Prefect UI from.","supported_environment_variables":["PREFECT_SERVER_UI_SERVE_BASE","PREFECT_UI_SERVE_BASE"],"title":"Serve Base","type":"string"},"static_directory":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The directory to serve static files from. This should be used when running into permissions issues when attempting to serve the UI from the default directory (for example when running in a Docker container).","supported_environment_variables":["PREFECT_SERVER_UI_STATIC_DIRECTORY","PREFECT_UI_STATIC_DIRECTORY"],"title":"Static Directory"}},"title":"ServerUISettings","type":"object"},"TasksRunnerSettings":{"properties":{"thread_pool_max_workers":{"anyOf":[{"exclusiveMinimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"The maximum number of workers for ThreadPoolTaskRunner.","supported_environment_variables":["PREFECT_TASKS_RUNNER_THREAD_POOL_MAX_WORKERS","PREFECT_TASK_RUNNER_THREAD_POOL_MAX_WORKERS"],"title":"Thread Pool Max Workers"}},"title":"TasksRunnerSettings","type":"object"},"TasksSchedulingSettings":{"properties":{"default_storage_block":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The `block-type/block-document` slug of a block to use as the default storage for autonomous tasks.","supported_environment_variables":["PREFECT_TASKS_SCHEDULING_DEFAULT_STORAGE_BLOCK","PREFECT_TASK_SCHEDULING_DEFAULT_STORAGE_BLOCK"],"title":"Default Storage Block"},"delete_failed_submissions":{"default":true,"description":"Whether or not to delete failed task submissions from the database.","supported_environment_variables":["PREFECT_TASKS_SCHEDULING_DELETE_FAILED_SUBMISSIONS","PREFECT_TASK_SCHEDULING_DELETE_FAILED_SUBMISSIONS"],"title":"Delete Failed Submissions","type":"boolean"}},"title":"TasksSchedulingSettings","type":"object"},"TasksSettings":{"properties":{"refresh_cache":{"default":false,"description":"If `True`, enables a refresh of cached results: re-executing the task will refresh the cached results.","supported_environment_variables":["PREFECT_TASKS_REFRESH_CACHE"],"title":"Refresh Cache","type":"boolean"},"default_no_cache":{"default":false,"description":"If `True`, sets the default cache policy on all tasks to `NO_CACHE`.","supported_environment_variables":["PREFECT_TASKS_DEFAULT_NO_CACHE"],"title":"Default No Cache","type":"boolean"},"disable_caching":{"default":false,"description":"If `True`, disables caching on all tasks regardless of cache policy.","supported_environment_variables":["PREFECT_TASKS_DISABLE_CACHING"],"title":"Disable Caching","type":"boolean"},"default_retries":{"default":0,"description":"This value sets the default number of retries for all tasks.","minimum":0,"supported_environment_variables":["PREFECT_TASKS_DEFAULT_RETRIES","PREFECT_TASK_DEFAULT_RETRIES"],"title":"Default Retries","type":"integer"},"default_retry_delay_seconds":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"items":{"type":"number"},"type":"array"},{"type":"null"}],"default":0,"description":"This value sets the default retry delay seconds for all tasks.","supported_environment_variables":["PREFECT_TASKS_DEFAULT_RETRY_DELAY_SECONDS","PREFECT_TASK_DEFAULT_RETRY_DELAY_SECONDS"],"title":"Default Retry Delay Seconds"},"default_persist_result":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"If `True`, results will be persisted by default for all tasks. Set to `False` to disable persistence by default. Note that setting to `False` will override the behavior set by a parent flow or task.","supported_environment_variables":["PREFECT_TASKS_DEFAULT_PERSIST_RESULT"],"title":"Default Persist Result"},"runner":{"$ref":"#/$defs/TasksRunnerSettings","description":"Settings for controlling task runner behavior","supported_environment_variables":[]},"scheduling":{"$ref":"#/$defs/TasksSchedulingSettings","description":"Settings for controlling client-side task scheduling behavior","supported_environment_variables":[]}},"title":"TasksSettings","type":"object"},"TestingSettings":{"properties":{"test_mode":{"default":false,"description":"If `True`, places the API in test mode. This may modify behavior to facilitate testing.","supported_environment_variables":["PREFECT_TESTING_TEST_MODE","PREFECT_TEST_MODE"],"title":"Test Mode","type":"boolean"},"unit_test_mode":{"default":false,"description":"This setting only exists to facilitate unit testing. If `True`, code is executing in a unit test context. Defaults to `False`.","supported_environment_variables":["PREFECT_TESTING_UNIT_TEST_MODE","PREFECT_UNIT_TEST_MODE"],"title":"Unit Test Mode","type":"boolean"},"unit_test_loop_debug":{"default":true,"description":"If `True` turns on debug mode for the unit testing event loop.","supported_environment_variables":["PREFECT_TESTING_UNIT_TEST_LOOP_DEBUG","PREFECT_UNIT_TEST_LOOP_DEBUG"],"title":"Unit Test Loop Debug","type":"boolean"},"test_setting":{"anyOf":[{},{"type":"null"}],"default":"FOO","description":"This setting only exists to facilitate unit testing. If in test mode, this setting will return its value. Otherwise, it returns `None`.","supported_environment_variables":["PREFECT_TESTING_TEST_SETTING","PREFECT_TEST_SETTING"],"title":"Test Setting"}},"title":"TestingSettings","type":"object"},"WorkerSettings":{"properties":{"heartbeat_seconds":{"default":30,"description":"Number of seconds a worker should wait between sending a heartbeat.","supported_environment_variables":["PREFECT_WORKER_HEARTBEAT_SECONDS"],"title":"Heartbeat Seconds","type":"number"},"query_seconds":{"default":10,"description":"Number of seconds a worker should wait between queries for scheduled work.","supported_environment_variables":["PREFECT_WORKER_QUERY_SECONDS"],"title":"Query Seconds","type":"number"},"prefetch_seconds":{"default":10,"description":"The number of seconds into the future a worker should query for scheduled work.","supported_environment_variables":["PREFECT_WORKER_PREFETCH_SECONDS"],"title":"Prefetch Seconds","type":"number"},"webserver":{"$ref":"#/$defs/WorkerWebserverSettings","description":"Settings for a worker's webserver","supported_environment_variables":[]}},"title":"WorkerSettings","type":"object"},"WorkerWebserverSettings":{"properties":{"host":{"default":"0.0.0.0","description":"The host address the worker's webserver should bind to.","supported_environment_variables":["PREFECT_WORKER_WEBSERVER_HOST"],"title":"Host","type":"string"},"port":{"default":8080,"description":"The port the worker's webserver should bind to.","supported_environment_variables":["PREFECT_WORKER_WEBSERVER_PORT"],"title":"Port","type":"integer"}},"title":"WorkerWebserverSettings","type":"object"}},"description":"Settings for Prefect using Pydantic settings.\n\nSee https://docs.pydantic.dev/latest/concepts/pydantic_settings","properties":{"home":{"default":"~/.prefect","description":"The path to the Prefect home directory. Defaults to ~/.prefect","format":"path","supported_environment_variables":["PREFECT_HOME"],"title":"Home","type":"string"},"profiles_path":{"description":"The path to a profiles configuration file. Supports $PREFECT_HOME templating. Defaults to $PREFECT_HOME/profiles.toml.","format":"path","supported_environment_variables":["PREFECT_PROFILES_PATH"],"title":"Profiles Path","type":"string"},"debug_mode":{"default":false,"description":"If True, enables debug mode which may provide additional logging and debugging features.","supported_environment_variables":["PREFECT_DEBUG_MODE"],"title":"Debug Mode","type":"boolean"},"api":{"$ref":"#/$defs/APISettings","supported_environment_variables":[]},"cli":{"$ref":"#/$defs/CLISettings","supported_environment_variables":[]},"client":{"$ref":"#/$defs/ClientSettings","supported_environment_variables":[]},"cloud":{"$ref":"#/$defs/CloudSettings","supported_environment_variables":[]},"deployments":{"$ref":"#/$defs/DeploymentsSettings","supported_environment_variables":[]},"experiments":{"$ref":"#/$defs/ExperimentsSettings","description":"Settings for controlling experimental features","supported_environment_variables":[]},"flows":{"$ref":"#/$defs/FlowsSettings","supported_environment_variables":[]},"internal":{"$ref":"#/$defs/InternalSettings","description":"Settings for internal Prefect machinery","supported_environment_variables":[]},"logging":{"$ref":"#/$defs/LoggingSettings","supported_environment_variables":[]},"results":{"$ref":"#/$defs/ResultsSettings","supported_environment_variables":[]},"runner":{"$ref":"#/$defs/RunnerSettings","supported_environment_variables":[]},"server":{"$ref":"#/$defs/ServerSettings","supported_environment_variables":[]},"tasks":{"$ref":"#/$defs/TasksSettings","description":"Settings for controlling task behavior","supported_environment_variables":[]},"testing":{"$ref":"#/$defs/TestingSettings","description":"Settings used during testing","supported_environment_variables":[]},"worker":{"$ref":"#/$defs/WorkerSettings","description":"Settings for controlling worker behavior","supported_environment_variables":[]},"ui_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The URL of the Prefect UI. If not set, the client will attempt to infer it.","supported_environment_variables":["PREFECT_UI_URL"],"title":"Ui Url"},"silence_api_url_misconfiguration":{"default":false,"description":"\n        If `True`, disable the warning when a user accidentally misconfigure its `PREFECT_API_URL`\n        Sometimes when a user manually set `PREFECT_API_URL` to a custom url,reverse-proxy for example,\n        we would like to silence this warning so we will set it to `FALSE`.\n        ","supported_environment_variables":["PREFECT_SILENCE_API_URL_MISCONFIGURATION"],"title":"Silence Api Url Misconfiguration","type":"boolean"}},"title":"Prefect Settings","type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/PrefectHQ/prefect/schemas/settings.schema.json"}
</schema>

[User] Provide a JSON object that satisfies the schema "Prefect Settings". Here are the required top‑level fields: none (all optional). Return only the valid JSON object.

Settings for interacting with the Prefect API

The URL of the Prefect API. If not set, the client will attempt to infer it.

Url

The auth string used for basic authentication with a self-hosted Prefect API. Should be kept secret.

Auth String

The API key used for authentication with the Prefect API. Should be kept secret.

Key

If `True`, disables SSL checking to allow insecure requests. Setting to False is recommended only during development. For example, when using self-signed certificates.

Tls Insecure Skip Verify

This configuration settings option specifies the path to an SSL certificate file.

Ssl Cert File

If true, enable support for HTTP/2 for communicating with an API. If the API does not support HTTP/2, this will have no effect and connections will be made via HTTP/1.1.

Enable Http2

The default timeout for requests to the API

Request Timeout

APISettings

Settings for controlling CLI behavior

If True, use colors in CLI output. If `False`, output will not include colors codes.

Colors

If `True`, use interactive prompts in CLI commands. If `False`, no interactive prompts will be used. If `None`, the value will be dynamically determined based on the presence of an interactive-enabled terminal.

Prompt

If `True`, wrap text by inserting new lines in long lines in CLI output. If `False`, output will not be wrapped.

Wrap Lines

CLISettings

Settings for controlling metrics reporting from the client

Whether or not to enable Prometheus metrics in the client.

Enabled

The port to expose the client Prometheus metrics on.

Port

ClientMetricsSettings

Settings for controlling API client behavior

        The maximum number of retries to perform on failed HTTP requests.
        Defaults to 5. Set to 0 to disable retries.
        See `PREFECT_CLIENT_RETRY_EXTRA_CODES` for details on which HTTP status codes are
        retried.

Max Retries

        A value greater than or equal to zero to control the amount of jitter added to retried
        client requests. Higher values introduce larger amounts of jitter.
        Set to 0 to disable jitter. See `clamped_poisson_interval` for details on the how jitter
        can affect retry lengths.

Retry Jitter Factor

        A list of extra HTTP status codes to retry on. Defaults to an empty list.
        429, 502 and 503 are always retried. Please note that not all routes are idempotent and retrying
        may result in unexpected behavior.

Retry Extra Codes

        Determines if CSRF token handling is active in the Prefect client for API
        requests.

        When enabled (`True`), the client automatically manages CSRF tokens by
        retrieving, storing, and including them in applicable state-changing requests

Csrf Support Enabled

ClientSettings

Settings for interacting with Prefect Cloud

API URL for Prefect Cloud. Used for authentication with Prefect Cloud.

Api Url

Whether or not to enable orchestration telemetry.

Enable Orchestration Telemetry

The URL of the Prefect Cloud UI. If not set, the client will attempt to infer it.

Ui Url

CloudSettings

Settings for configuring deployments defaults

The default work pool to use when creating deployments.

Default Work Pool Name

The default Docker namespace to use when building images.

Default Docker Build Namespace

DeploymentsSettings

Settings for configuring experimental features

If `True`, warn on usage of experimental features.

Warn

If `True`, enables emitting lineage events. Set to `False` to disable lineage event emission.

Lineage Events Enabled

ExperimentsSettings

Settings for controlling flow behavior

This value sets the default number of retries for all flows.

Default Retries

This value sets the default retry delay seconds for all flows.

Default Retry Delay Seconds

FlowsSettings

The default logging level for Prefect's internal machinery loggers.

Logging Level

InternalSettings

Settings for controlling logging behavior

The default logging level for Prefect loggers.

Level

A path to a logging configuration file. Defaults to $PREFECT_HOME/logging.yml

Config Path

Additional loggers to attach to Prefect logging at runtime.

Extra Loggers

If `True`, `print` statements in flows and tasks will be redirected to the Prefect logger for the given run.

Log Prints

If `True`, use colors in CLI output. If `False`, output will not include colors codes.

Colors

        Whether to interpret strings wrapped in square brackets as a style.
        This allows styles to be conveniently added to log messages, e.g.
        `[red]This is a red message.[/red]`. However, the downside is, if enabled,
        strings that contain square brackets may be inaccurately interpreted and
        lead to incomplete output, e.g.
        `[red]This is a red message.[/red]` may be interpreted as
        `[red]This is a red message.[/red]`.

Markup

LoggingSettings

Settings for controlling logging to the API

If `True`, logs will be sent to the API.

Enabled

The number of seconds between batched writes of logs to the API.

Batch Interval

The number of logs to batch before sending to the API.

Batch Size

The maximum size in bytes for a single log.

Max Log Size

        Controls the behavior when loggers attempt to send logs to the API handler from outside of a flow.

        All logs sent to the API must be associated with a flow run. The API log handler can
        only be used outside of a flow by manually providing a flow run identifier. Logs
        that are not associated with a flow run will not be sent to the API. This setting can
        be used to determine if a warning or error is displayed when the identifier is missing.

        The following options are available:

        - "warn": Log a warning message.
        - "error": Raise an error.
        - "ignore": Do not log a warning message or raise an error.

When Missing Flow

LoggingToAPISettings

Settings for controlling result storage behavior

The default serializer to use when not otherwise specified.

Default Serializer

The default setting for persisting results when not otherwise specified.

Persist By Default

The `block-type/block-document` slug of a block to use as the default result storage.

Default Storage Block

The default location for locally persisted results. Defaults to $PREFECT_HOME/storage.

Local Storage Path

ResultsSettings

Settings for controlling runner server behavior

Whether or not to enable the runner's webserver.

Enable

The host address the runner's webserver should bind to.

Host

The port the runner's webserver should bind to.

Port

The log level of the runner's webserver.

Log Level

Number of missed polls before a runner is considered unhealthy by its webserver.

Missed Polls Tolerance

RunnerServerSettings

Settings for controlling runner behavior

Maximum number of processes a runner will execute in parallel.

Process Limit

Number of seconds a runner should wait between queries for scheduled work.

Poll Frequency

Number of seconds a runner should wait between heartbeats for flow runs.

Heartbeat Frequency

RunnerSettings

Settings for controlling SQLAlchemy connection behavior; note that these settings only take effect when
using a PostgreSQL database.

Controls the application_name field for connections opened from the connection pool when using a PostgreSQL database with the Prefect backend.

Application Name

Controls statement cache size for PostgreSQL connections. Setting this to 0 is required when using PgBouncer in transaction mode. Defaults to None.

Statement Cache Size

Controls the size of the statement cache for PostgreSQL connections. When set to 0, statement caching is disabled. Defaults to None to use SQLAlchemy's default behavior.

Prepared Statement Cache Size

Settings for controlling SQLAlchemy mTLS behavior

SQLAlchemyConnectArgsSettings

Settings for controlling SQLAlchemy behavior; note that these settings only take effect when
using a PostgreSQL database.

Settings for controlling SQLAlchemy connection behavior

Controls connection pool size of database connection pools from the Prefect backend.

Pool Size

This setting causes the pool to recycle connections after the given number of seconds has passed; set it to -1 to avoid recycling entirely.

Pool Recycle

Number of seconds to wait before giving up on getting a connection from the pool. Defaults to 30 seconds.

Pool Timeout

Controls maximum overflow of the connection pool. To prevent overflow, set to -1.

Max Overflow

SQLAlchemySettings

Settings for controlling SQLAlchemy mTLS context when
using a PostgreSQL database.

Controls whether connected to mTLS enabled PostgreSQL when using a PostgreSQL database with the Prefect backend.

Enabled

This configuration settings option specifies the path to PostgreSQL client certificate authority file.

Ca File

This configuration settings option specifies the path to PostgreSQL client certificate file.

Cert File

This configuration settings option specifies the path to PostgreSQL client key file.

Key File

This configuration settings option specifies whether to verify PostgreSQL server hostname.

Check Hostname

SQLAlchemyTLSSettings

Settings for controlling API server behavior

A string to use for basic authentication with the API in the form 'user:password'.

Auth String

The API's host address (defaults to `127.0.0.1`).

Host

The API's port address (defaults to `4200`).

Port

The base URL path to serve the API under.

Base Path

The default limit applied to queries that can return multiple objects, such as `POST /flow_runs/filter`.

Default Limit

        The API's keep alive timeout (defaults to `5`).
        Refer to https://www.uvicorn.org/settings/#timeouts for details.

        When the API is hosted behind a load balancer, you may want to set this to a value
        greater than the load balancer's idle timeout.

        Note this setting only applies when calling `prefect server start`; if hosting the
        API with another tool you will need to configure this there instead.

Keepalive Timeout

        Controls the activation of CSRF protection for the Prefect server API.

        When enabled (`True`), the server enforces CSRF validation checks on incoming
        state-changing requests (POST, PUT, PATCH, DELETE), requiring a valid CSRF
        token to be included in the request headers or body. This adds a layer of
        security by preventing unauthorized or malicious sites from making requests on
        behalf of authenticated users.

        It is recommended to enable this setting in production environments where the
        API is exposed to web clients to safeguard against CSRF attacks.

        Note: Enabling this setting requires corresponding support in the client for
        CSRF token management. See PREFECT_CLIENT_CSRF_SUPPORT_ENABLED for more.

Csrf Protection Enabled

        Specifies the duration for which a CSRF token remains valid after being issued
        by the server.

        The default expiration time is set to 1 hour, which offers a reasonable
        compromise. Adjust this setting based on your specific security requirements
        and usage patterns.

Csrf Token Expiration

        A comma-separated list of origins that are authorized to make cross-origin requests to the API.

        By default, this is set to `*`, which allows requests from all origins.

Cors Allowed Origins

        A comma-separated list of methods that are authorized to make cross-origin requests to the API.

        By default, this is set to `*`, which allows requests from all methods.

Cors Allowed Methods

        A comma-separated list of headers that are authorized to make cross-origin requests to the API.

        By default, this is set to `*`, which allows requests from all headers.

Cors Allowed Headers

ServerAPISettings

Settings for controlling server database behavior

Settings for controlling SQLAlchemy behavior

        A database connection URL in a SQLAlchemy-compatible
        format. Prefect currently supports SQLite and Postgres. Note that all
        Prefect database engines must use an async driver - for SQLite, use
        `sqlite+aiosqlite` and for Postgres use `postgresql+asyncpg`.

        SQLite in-memory databases can be used by providing the url
        `sqlite+aiosqlite:///file::memory:?cache=shared&uri=true&check_same_thread=false`,
        which will allow the database to be accessed by multiple threads. Note
        that in-memory databases can not be accessed from multiple processes and
        should only be used for simple tests.

Connection Url

The database driver to use when connecting to the database. If not set, the driver will be inferred from the connection URL.

Driver

The database server host.

Host

The database server port.

Port

The user to use when connecting to the database.

User

The name of the Prefect database on the remote server, or the path to the database file for SQLite.

Name

The password to use when connecting to the database. Should be kept secret.

Password

If `True`, SQLAlchemy will log all SQL issued to the database. Defaults to `False`.

Echo

If `True`, the database will be migrated on application startup.

Migrate On Start

A statement timeout, in seconds, applied to all database interactions made by the Prefect backend. Defaults to 10 seconds.

Timeout

A connection timeout, in seconds, applied to database connections. Defaults to `5`.

Connection Timeout

ServerDatabaseSettings

The number of seconds to wait before retrying when a deployment flow run cannot secure a concurrency slot from the server.

Concurrency Slot Wait Seconds

ServerDeploymentsSettings

Settings for controlling ephemeral server behavior

Controls whether or not a subprocess server can be started when no API URL is provided.

Enabled

        The number of seconds to wait for the server to start when ephemeral mode is enabled.
        Defaults to `20`.

Startup Timeout Seconds

ServerEphemeralSettings

Settings for controlling behavior of the events subsystem

Whether or not to stream events out to the API via websockets.

Stream Out Enabled

The number of seconds to cache related resources for in the API.

Related Resource Cache Ttl

The maximum number of labels a resource may have.

Maximum Labels Per Resource

The maximum number of related resources an Event may have.

Maximum Related Resources

The maximum size of an Event when serialized to JSON

Maximum Size Bytes

The amount of time to retain expired automation buckets

Expired Bucket Buffer

How frequently proactive automations are evaluated

Proactive Granularity

The amount of time to retain events in the database.

Retention Period

The maximum range to look back for backfilling events for a websocket subscriber.

Maximum Websocket Backfill

The page size for the queries to backfill events for websocket subscribers.

Websocket Backfill Page Size

Which message broker implementation to use for the messaging system, should point to a module that exports a Publisher and Consumer class.

Messaging Broker

Which cache implementation to use for the events system. Should point to a module that exports a Cache class.

Messaging Cache

The maximum length of an event name.

Maximum Event Name Length

ServerEventsSettings

Settings for controlling behavior of the flow run graph

The maximum size of a flow run graph on the v2 API

Max Nodes

The maximum number of artifacts to show on a flow run graph on the v2 API

Max Artifacts

ServerFlowRunGraphSettings

Settings for controlling behavior of the logs subsystem

Whether or not to stream logs out to the API via websockets.

Stream Out Enabled

Whether or not to publish logs to the streaming system.

Stream Publishing Enabled

ServerLogsSettings

Settings for controlling the cancellation cleanup service

Whether or not to start the cancellation cleanup service in the server application.

Enabled

The cancellation cleanup service will look for non-terminal tasks and subflows this often. Defaults to `20`.

Loop Seconds

ServerServicesCancellationCleanupSettings

Settings for controlling the event logger service

Whether or not to start the event logger service in the server application.

Enabled

ServerServicesEventLoggerSettings

Settings for controlling the event persister service

Whether or not to start the event persister service in the server application.

Enabled

The number of events the event persister will attempt to insert in one batch.

Batch Size

The maximum number of seconds between flushes of the event persister.

Flush Interval

The number of expired events and event resources the event persister will attempt to delete in one batch.

Batch Size Delete

ServerServicesEventPersisterSettings

Settings for controlling the foreman service

Whether or not to start the foreman service in the server application.

Enabled

The foreman service will check for offline workers this often. Defaults to `15`.

Loop Seconds

The number of heartbeats that must be missed before a worker is marked as offline. Defaults to `3`.

Inactivity Heartbeat Multiple

        The number of seconds to use for online/offline evaluation if a worker's heartbeat
        interval is not set. Defaults to `30`.

Fallback Heartbeat Interval Seconds

        The number of seconds before a deployment is marked as not ready if it has not been
        polled. Defaults to `60`.

Deployment Last Polled Timeout Seconds

        The number of seconds before a work queue is marked as not ready if it has not been
        polled. Defaults to `60`.

Work Queue Last Polled Timeout Seconds

ServerServicesForemanSettings

Settings for controlling the late runs service

Whether or not to start the late runs service in the server application.

Enabled

The late runs service will look for runs to mark as late this often. Defaults to `5`.

Loop Seconds

The late runs service will mark runs as late after they have exceeded their scheduled start time by this many seconds. Defaults to `5` seconds.

After Seconds

ServerServicesLateRunsSettings

Settings for controlling the pause expiration service

        Whether or not to start the paused flow run expiration service in the server
        application. If disabled, paused flows that have timed out will remain in a Paused state
        until a resume attempt.

Enabled

The pause expiration service will look for runs to mark as failed this often. Defaults to `5`.

Loop Seconds

ServerServicesPauseExpirationsSettings

Settings for controlling the scheduler service

Whether or not to start the scheduler service in the server application.

Enabled

        The scheduler loop interval, in seconds. This determines
        how often the scheduler will attempt to schedule new flow runs, but has no
        impact on how quickly either flow runs or task runs are actually executed.
        Defaults to `60`.

Loop Seconds

        The number of deployments the scheduler will attempt to
        schedule in a single batch. If there are more deployments than the batch
        size, the scheduler immediately attempts to schedule the next batch; it
        does not sleep for `scheduler_loop_seconds` until it has visited every
        deployment once. Defaults to `100`.

Deployment Batch Size

        The scheduler will attempt to schedule up to this many
        auto-scheduled runs in the future. Note that runs may have fewer than
        this many scheduled runs, depending on the value of
        `scheduler_max_scheduled_time`.  Defaults to `100`.

Max Runs

        The scheduler will attempt to schedule at least this many
        auto-scheduled runs in the future. Note that runs may have more than
        this many scheduled runs, depending on the value of
        `scheduler_min_scheduled_time`.  Defaults to `3`.

Min Runs

        The scheduler will create new runs up to this far in the
        future. Note that this setting will take precedence over
        `scheduler_max_runs`: if a flow runs once a month and
        `scheduler_max_scheduled_time` is three months, then only three runs will be
        scheduled. Defaults to 100 days (`8640000` seconds).

Max Scheduled Time

        The scheduler will create new runs at least this far in the
        future. Note that this setting will take precedence over `scheduler_min_runs`:
        if a flow runs every hour and `scheduler_min_scheduled_time` is three hours,
        then three runs will be scheduled even if `scheduler_min_runs` is 1. Defaults to

Min Scheduled Time

        The number of runs the scheduler will attempt to insert in a single batch.
        Defaults to `500`.

Insert Batch Size

The number of seconds the recent deployments scheduler will wait between checking for recently updated deployments. Defaults to `5`.

Recent Deployments Loop Seconds

ServerServicesSchedulerSettings

Settings for controlling server services

ServerServicesSettings

Settings for controlling the task run recorder service

Whether or not to start the task run recorder service in the server application.

Enabled

ServerServicesTaskRunRecorderSettings

Settings for controlling the triggers service

Whether or not to start the triggers service in the server application.

Enabled

        The number of seconds to wait before reconnecting to the PostgreSQL NOTIFY/LISTEN
        connection after an error. Only used when using PostgreSQL as the database.
        Defaults to `10`.

Pg Notify Reconnect Interval Seconds

        The number of seconds between heartbeat checks for the PostgreSQL NOTIFY/LISTEN
        connection to ensure it's still alive. Only used when using PostgreSQL as the database.
        Defaults to `5`.

Pg Notify Heartbeat Interval Seconds

ServerServicesTriggersSettings

Settings for controlling server behavior

The default logging level for the Prefect API server.

Logging Level

        When enabled, Prefect sends anonymous data (e.g. count of flow runs, package version)
        on server startup to help us improve our product.

Analytics Enabled

Whether or not to enable Prometheus metrics in the API.

Metrics Enabled

If `True`, log retryable errors in the API and it's services.

Log Retryable Errors

If set, any block types that have been imported will be registered with the backend on application startup. If not set, block types must be manually registered.

Register Blocks On Start

Controls whether or not block auto-registration on start

Memoize Block Auto Registration

Path to the memo store file. Defaults to $PREFECT_HOME/memo_store.toml

Memo Store Path

The maximum number of scheduled runs to create for a deployment.

Deployment Schedule Max Scheduled Runs

Settings for controlling server deployments behavior

Settings for controlling server events behavior

Settings for controlling flow run graph behavior

Settings for controlling server logs behavior

Settings for controlling server services behavior

Settings for controlling server tasks behavior

Settings for controlling server UI behavior

ServerSettings

Settings for controlling server-side behavior related to task scheduling

The maximum number of scheduled tasks to queue for submission.

Max Scheduled Queue Size

The maximum number of retries to queue for submission.

Max Retry Queue Size

How long before a PENDING task are made available to another task worker.

Pending Task Timeout

ServerTasksSchedulingSettings

Settings for controlling server-side behavior related to tasks

The number of seconds to wait before retrying when a task run cannot secure a concurrency slot from the server.

Tag Concurrency Slot Wait Seconds

The maximum number of characters allowed for a task run cache key.

Max Cache Key Length

ServerTasksSettings

Whether or not to serve the Prefect UI.

Enabled

The connection url for communication from the UI to the API. Defaults to `PREFECT_API_URL` if set. Otherwise, the default URL is generated from `PREFECT_SERVER_API_HOST` and `PREFECT_SERVER_API_PORT`.

Api Url

The base URL path to serve the Prefect UI from.

Serve Base

The directory to serve static files from. This should be used when running into permissions issues when attempting to serve the UI from the default directory (for example when running in a Docker container).

Static Directory

ServerUISettings

The maximum number of workers for ThreadPoolTaskRunner.

Thread Pool Max Workers

TasksRunnerSettings

The `block-type/block-document` slug of a block to use as the default storage for autonomous tasks.

Default Storage Block

Whether or not to delete failed task submissions from the database.

Delete Failed Submissions

TasksSchedulingSettings

If `True`, enables a refresh of cached results: re-executing the task will refresh the cached results.

Refresh Cache

If `True`, sets the default cache policy on all tasks to `NO_CACHE`.

Default No Cache

If `True`, disables caching on all tasks regardless of cache policy.

Disable Caching

This value sets the default number of retries for all tasks.

Default Retries

This value sets the default retry delay seconds for all tasks.

Default Retry Delay Seconds

If `True`, results will be persisted by default for all tasks. Set to `False` to disable persistence by default. Note that setting to `False` will override the behavior set by a parent flow or task.

Default Persist Result

Settings for controlling task runner behavior

Settings for controlling client-side task scheduling behavior

TasksSettings

If `True`, places the API in test mode. This may modify behavior to facilitate testing.

Test Mode

This setting only exists to facilitate unit testing. If `True`, code is executing in a unit test context. Defaults to `False`.

Unit Test Mode

If `True` turns on debug mode for the unit testing event loop.

Unit Test Loop Debug

This setting only exists to facilitate unit testing. If in test mode, this setting will return its value. Otherwise, it returns `None`.

Test Setting

TestingSettings

Number of seconds a worker should wait between sending a heartbeat.

Heartbeat Seconds

Number of seconds a worker should wait between queries for scheduled work.

Query Seconds

The number of seconds into the future a worker should query for scheduled work.

Prefetch Seconds

Settings for a worker's webserver

WorkerSettings

The host address the worker's webserver should bind to.

Host

The port the worker's webserver should bind to.

Port

WorkerWebserverSettings

Settings for Prefect using Pydantic settings.

See https://docs.pydantic.dev/latest/concepts/pydantic_settings

The path to the Prefect home directory. Defaults to ~/.prefect

Home

The path to a profiles configuration file. Supports $PREFECT_HOME templating. Defaults to $PREFECT_HOME/profiles.toml.

Profiles Path

If True, enables debug mode which may provide additional logging and debugging features.

Debug Mode

Settings for controlling experimental features

Settings for internal Prefect machinery

Settings for controlling task behavior

Settings used during testing

Settings for controlling worker behavior

The URL of the Prefect UI. If not set, the client will attempt to infer it.

Ui Url

        If `True`, disable the warning when a user accidentally misconfigure its `PREFECT_API_URL`
        Sometimes when a user manually set `PREFECT_API_URL` to a custom url,reverse-proxy for example,
        we would like to silence this warning so we will set it to `FALSE`.

Silence Api Url Misconfiguration

Prefect Settings

Provide a JSON object that satisfies the schema "Prefect Settings". Here are the required top‑level fields: none (all optional). Return only the valid JSON object.