Skip to content

YAML reference

Use this page as the schema-level reference for faraday.yaml.

All fields are optional unless you need a non-default behavior. CLI flags win over YAML when both are set.

For practical setup recipes, see YAML guidance.

name: faraday-reference
query: "Optional default prompt when no CLI query is provided."
llm:
provider: openai
model: gpt-5
api_key_env: OPENAI_API_KEY
# base_url: OPENAI_BASE_URL
# base_url_env: OPENAI_BASE_URL
# api_version: preview
# api_version_env: AZURE_OPENAI_API_VERSION
# organization: OPENAI_ORG_ID
# project: OPENAI_PROJECT_ID
# timeout: 120
# max_retries: 3
# default_query: {}
# default_headers: {}
backends:
db: sqlite
rag: in-memory
app:
mode: host # host | docker
# app_image: faraday-oss
workspace:
source_root: .
# init_mode: bind # bind | copy
# copy_root: ./.faraday_runtime/workspace-copies
# keep_copy: false
sandbox:
backend: docker # docker | modal | host | disabled
# docker_image: faraday-code-sandbox
workspace:
container_path: /workspace
# advanced_config:
# allow_host_fallback: false
# allow_backend_fallback: true
# fallback_order: [docker, host]
# import_check: true
# import_check_warn_optional: false
# auto_install_missing_modules: false
# auto_install_missing_modules_timeout_sec: 300
# modal:
# cloud_storage_mode: disabled
# cloud_storage_root: ./.faraday_runtime/cloud-storage
# enable_bucket_mount: false
# bucket_name: ""
# policy:
# sandbox_ready_timeout_sec: 120
# python_exec_timeout_sec: 300
# bash_exec_timeout_sec: 60
# transient_retry_attempts: 1
# reinitialize_on_transient_failure: true
# max_reinitialize_attempts: 3
# stdout_max_bytes: 262144
# stderr_max_bytes: 32768
# heartbeat_interval_sec: 30
# docker_memory: 8g
# docker_cpus: 4
# docker_pids_limit: 1024
# docker_shm_size: 1g
# docker_network: bridge
outputs:
root: ./run_outputs
# artifacts:
# collect_dir: ""
# collect_to_harbor: false
# harbor_dir: /logs/artifacts
storage:
sqlite_path: ~/.faraday/faraday.db
save_messages: true
save_trajectory: true
# previous_context: ""
batch:
enabled: false
prompts: []
# prompts_file: ""
max_concurrency: 1
max_retries: 2
retry_base_delay_seconds: 2.0
retry_max_delay_seconds: 30.0
retry_jitter_seconds: 0.5
continue_on_error: false
features:
modal: false
exa: false
python_science_stack: true
cheminformatics_stack: false
tool_modules:
- my_project.faraday_tools
- ./tools/custom_tools.py

Faraday looks for config in this order:

  1. --config /path/to/file.yaml
  2. FARADAY_CONFIG
  3. /app/config/faraday.yaml, /app/config/faraday.yml, /etc/faraday/config.yaml, /etc/faraday/config.yml
  4. ./faraday.yaml, ./faraday.yml, ~/.faraday/config.yaml, ~/.faraday/config.yml

Optional label for the config profile. It is descriptive only.

name: faraday-docker

Optional default query used when the CLI positional query is omitted.

query: "Summarize the repository structure."

CLI wins over YAML:

Terminal window
faraday --config faraday.yaml "Use this prompt instead"

Configures the OpenAI-compatible client Faraday uses.

Supported providers:

  • openai
  • azure
  • openrouter

Provider name. Defaults to openai when omitted.

llm:
provider: openrouter

Default model passed to the agent and CLI unless --model overrides it.

llm:
model: gpt-5

Environment variable name that stores the API key. This is the preferred way to configure secrets.

Provider defaults:

  • openai: OPENAI_API_KEY
  • azure: AZURE_OPENAI_API_KEY
  • openrouter: OPENROUTER_API_KEY
llm:
api_key_env: OPENAI_API_KEY

Base URL for OpenAI-compatible deployments. The value can be a literal URL or the name of an environment variable whose value is the URL.

llm:
base_url: AZURE_OPENAI_BASE_URL

Explicit environment variable name for the base URL. This is only consulted when llm.base_url is unset.

llm:
base_url_env: AZURE_OPENAI_BASE_URL

API version string. Used most often with Azure. If set, Faraday sends it as the api-version default query parameter.

llm:
api_version: preview

Environment variable name that stores the API version. Used only when llm.api_version is unset.

llm:
api_version_env: AZURE_OPENAI_API_VERSION

Additional query parameters sent with every request.

llm:
default_query:
api-version: preview

Additional headers sent with every request.

llm:
default_headers:
HTTP-Referer: https://your-app.example
X-Title: Faraday

Optional OpenAI organization value. Like base_url, this can be a literal string or an env var name.

llm:
organization: OPENAI_ORG_ID

Optional OpenAI project value. This can be a literal string or an env var name.

llm:
project: OPENAI_PROJECT_ID

Client timeout in seconds.

llm:
timeout: 120

OpenAI client retry count.

llm:
max_retries: 3

Controls persistence and retrieval backends.

Supported values:

  • sqlite
  • auto

Faraday currently resolves message persistence through SQLite-oriented configuration. sqlite is the default practical choice for local and Docker setups.

backends:
db: sqlite

Supported values:

  • in-memory
  • none
  • auto

Notes:

  • auto currently behaves like in-process retrieval.
  • in-memory is the normal workspace-local default.
  • none disables retrieval-oriented memory/file search behavior.
backends:
rag: in-memory

app controls where the Faraday process itself runs and how the workspace is prepared before a run starts.

Where the Faraday app runs.

Supported values:

  • host
  • docker

Default: host

Behavior:

  • host means the Faraday app runs directly in the current Python environment.
  • docker means the CLI relaunches the app inside a Docker container.
app:
mode: docker

Docker image used for the Faraday app when app.mode: docker or when --use-docker is used.

Default: faraday-oss

app:
app_image: faraday-oss

Directory treated as the workspace source for the run. If omitted, Faraday falls back to the current working directory in most host-side flows.

app:
workspace:
source_root: .

How Faraday prepares the workspace before the run starts.

Supported values:

  • bind — use the original workspace directly
  • copy — create an isolated copy for the run (useful for reproducible benchmark-style runs)

Default: bind

app:
workspace:
init_mode: copy

Parent directory used for isolated workspace copies when init_mode: copy.

Default: ./.faraday_runtime/workspace-copies

app:
workspace:
init_mode: copy
copy_root: ./.faraday_runtime/workspace-copies

Whether to keep the copied workspace after cleanup when init_mode: copy.

Default: false

app:
workspace:
init_mode: copy
keep_copy: true

sandbox controls where agent-generated code runs — the execution environment for Python and bash tools.

Which execution backend to use for code tools.

Supported values:

  • docker — run code in an isolated Docker container
  • modal — run code on Modal
  • host — run code directly in the host Python environment
  • disabled — code tools are unavailable

Default: docker

sandbox:
backend: host

Path where the workspace is mounted inside the sandbox container.

Default: /workspace

sandbox:
workspace:
container_path: /workspace

Docker image used for code-execution sandboxes.

sandbox:
docker_image: faraday-code-sandbox

Advanced sandbox settings. Most users do not need to touch these — the defaults work for standard Docker and Modal setups. Reach for advanced_config when you need to tune fallback behavior, import checking, auto-install, Modal storage, or resource limits.

sandbox.advanced_config.allow_host_fallback

Section titled “sandbox.advanced_config.allow_host_fallback”

Whether the sandbox may fall back to the host Python environment when the Docker backend encounters edge-case failures.

Default: false

sandbox.advanced_config.allow_backend_fallback

Section titled “sandbox.advanced_config.allow_backend_fallback”

Whether Faraday may fall back to another sandbox backend if the selected one cannot be initialized.

Default: true

Ordered list of permitted fallback backends.

Allowed entries: docker, modal, host

Default: [docker, host]

Whether Faraday checks package availability before code execution.

Default: true for host and docker, false otherwise

sandbox.advanced_config.import_check_warn_optional

Section titled “sandbox.advanced_config.import_check_warn_optional”

When enabled, optional imports may emit warnings instead of staying silent.

Default: false

sandbox.advanced_config.auto_install_missing_modules

Section titled “sandbox.advanced_config.auto_install_missing_modules”

Whether Faraday may attempt to install missing Python modules automatically.

Default: false

sandbox.advanced_config.auto_install_missing_modules_timeout_sec

Section titled “sandbox.advanced_config.auto_install_missing_modules_timeout_sec”

Timeout for auto-install attempts.

Default: 300

Only relevant when sandbox.backend: modal.

sandbox.advanced_config.modal.cloud_storage_mode

Section titled “sandbox.advanced_config.modal.cloud_storage_mode”

Controls Modal cloud bucket mounting behavior.

Supported values: disabled, optional, required

Default: disabled

sandbox.advanced_config.modal.cloud_storage_root

Section titled “sandbox.advanced_config.modal.cloud_storage_root”

Local root used for /cloud-storage style path mapping.

Default: ./.faraday_runtime/cloud-storage

sandbox.advanced_config.modal.enable_bucket_mount

Section titled “sandbox.advanced_config.modal.enable_bucket_mount”

Whether to mount a cloud bucket into the Modal sandbox.

Default: false

Bucket name used with Modal cloud storage mounts.

sandbox.advanced_config.policy.sandbox_ready_timeout_sec

Section titled “sandbox.advanced_config.policy.sandbox_ready_timeout_sec”

How long to wait for the sandbox to become ready.

Default: 120

sandbox.advanced_config.policy.python_exec_timeout_sec

Section titled “sandbox.advanced_config.policy.python_exec_timeout_sec”

Timeout for Python tool execution.

Default: 300

sandbox.advanced_config.policy.bash_exec_timeout_sec

Section titled “sandbox.advanced_config.policy.bash_exec_timeout_sec”

Timeout for bash tool execution.

Default: 60

sandbox.advanced_config.policy.heartbeat_interval_sec

Section titled “sandbox.advanced_config.policy.heartbeat_interval_sec”

Heartbeat interval for sandbox liveness checks.

Default: 30

sandbox.advanced_config.policy.transient_retry_attempts

Section titled “sandbox.advanced_config.policy.transient_retry_attempts”

Retries for transient execution failures.

Default: 1

sandbox.advanced_config.policy.reinitialize_on_transient_failure

Section titled “sandbox.advanced_config.policy.reinitialize_on_transient_failure”

Whether Faraday should reinitialize the sandbox after transient failures.

Default: true

sandbox.advanced_config.policy.max_reinitialize_attempts

Section titled “sandbox.advanced_config.policy.max_reinitialize_attempts”

Maximum sandbox reinitializations before giving up.

Default: 3

sandbox.advanced_config.policy.stdout_max_bytes

Section titled “sandbox.advanced_config.policy.stdout_max_bytes”

Maximum captured stdout size per tool call.

Default: 262144

sandbox.advanced_config.policy.stderr_max_bytes

Section titled “sandbox.advanced_config.policy.stderr_max_bytes”

Maximum captured stderr size per tool call.

Default: 32768

sandbox.advanced_config.policy.docker_memory

Section titled “sandbox.advanced_config.policy.docker_memory”

Docker memory limit, for example 8g.

sandbox.advanced_config.policy.docker_cpus

Section titled “sandbox.advanced_config.policy.docker_cpus”

Docker CPU limit.

sandbox.advanced_config.policy.docker_pids_limit

Section titled “sandbox.advanced_config.policy.docker_pids_limit”

Docker PID limit.

sandbox.advanced_config.policy.docker_shm_size

Section titled “sandbox.advanced_config.policy.docker_shm_size”

Docker shared-memory size, for example 1g.

sandbox.advanced_config.policy.docker_network

Section titled “sandbox.advanced_config.policy.docker_network”

Docker network name.

Example:

sandbox:
backend: docker
advanced_config:
allow_backend_fallback: true
fallback_order: [docker, host]
auto_install_missing_modules: true
policy:
python_exec_timeout_sec: 600
bash_exec_timeout_sec: 120
docker_memory: 8g
docker_cpus: 4

Root directory for per-run outputs.

Default behavior:

  • host runs default to <cwd>/run_outputs
  • app-container runs default to <container_path>/run_outputs

Each run creates:

run_outputs/
run_{timestamp}_{chat_id}_{query_id}/
agent_outputs/
run_artifacts/
outputs:
root: ./run_outputs

Optional artifact collection settings. Most users do not need this — run artifacts are already written under outputs.root. Use outputs.artifacts only when you need to copy artifacts to a second location or collect them for Harbor.

Directory where Faraday copies generated artifacts and writes manifest.json.

outputs:
artifacts:
collect_dir: /tmp/faraday-artifacts

Whether to collect artifacts automatically into the Harbor artifact path.

Default: false

Harbor artifact collection path.

Default: /logs/artifacts

outputs:
artifacts:
collect_to_harbor: true
harbor_dir: /logs/artifacts

storage controls persistent state: where the database lives and what gets saved between runs.

SQLite database path used when backends.db: sqlite.

storage:
sqlite_path: ~/.faraday/faraday.db

Whether to persist messages to the configured DB backend.

Default: true

storage:
save_messages: true

Whether to write trajectory.json into run_artifacts/.

Default: true

storage:
save_trajectory: true

Default path to a prior trajectory.json used for follow-up runs when you do not want to pass --previous-context each time.

storage:
previous_context: ./run_outputs/previous/run_artifacts/trajectory.json

Batch settings are used when you run faraday without explicit batch flags and want the YAML to define the batch behavior.

Whether the config should run as a batch by default.

Default: false

batch:
enabled: true

Inline list of prompt strings.

batch:
prompts:
- "Summarize the README."
- "List major risks."

Path to a .txt, .json, or .jsonl file of prompts.

batch:
prompts_file: ./prompts.txt

Maximum number of prompts run at once.

Default: 1

batch:
max_concurrency: 4

Retry count for retryable batch failures.

Default: 2

batch:
max_retries: 2

Base backoff delay for retries.

Default: 2.0

Maximum backoff delay.

Default: 30.0

Random jitter added to retry delays.

Default: 0.5

Whether the batch continues after a failed prompt.

Default: false

batch:
continue_on_error: true

Feature flags that control which optional dependency sets are included.

Include Modal support dependencies.

Default: true when sandbox.backend: modal, otherwise false

Include Exa-based tooling dependencies.

Default: false

Include common scientific Python packages such as requests, matplotlib, seaborn, and mygene.

Default: true for docker and host sandbox backends

Include heavier cheminformatics packages such as rdkit and datamol.

Default: false

Example:

features:
exa: true
python_science_stack: true
cheminformatics_stack: true

List of extra Python modules loaded before the run.

Each item may be:

  • a dotted module path such as my_project.faraday_tools
  • a filesystem path to a .py file such as ./tools/custom_tools.py

Loaded modules may expose:

  • EXTRA_TOOLS
  • EXTRA_TOOL_HANDLERS

Later modules override earlier handlers with the same tool name.

tool_modules:
- my_project.faraday_tools
- ./tools/custom_tools.py