Skip to main content

Root Layout

When you run chainbot init, it creates this canonical layout:
The root directory defaults to ~/.chainbot. Set CHAINBOT_CONFIG_DIR to use a different path.

Loading Order

Manifests are loaded in this fixed order:
  1. chainbot.toml (root config)
  2. workflows/<workflow_id>/config.toml
  3. triggers/<trigger_id>/config.toml
  4. plugins/<plugin_id>/config.toml

Root Config: chainbot.toml

The root config defines paths, runtime defaults, secret references, and storage mode.
All path overrides must stay within <root> and use root-relative paths.

Workflow Packages

Canonical entrypoint: workflows/<workflow_id>/config.toml The directory name must match workflow.id exactly. Workflows define a DAG of nodes, runtime defaults, and optional subflow calls.

Trigger Packages

Canonical entrypoint: triggers/<trigger_id>/config.toml The directory name must match trigger_id exactly. Triggers bind an event source to a workflow and do not contain DAG or node definitions. Builtin trigger example:
Builtin sources include manual, market_tick, and cron.

Plugin Packages

Canonical entrypoint: plugins/<plugin_id>/config.toml The directory name must match plugin_id exactly. Plugins declare an entrypoint, capabilities, and an executable path.

Package Constraints

  • All relative paths within a package resolve from the package root.
  • Workflow IDs, trigger IDs, and plugin IDs must be globally unique within a workspace.
  • Triggers must reference an existing workflow_id.
  • A workflow can run without any triggers via chainbot run.
  • The legacy plugins/manifests/ shared layout is not created by chainbot init and is not part of the stable bootstrap contract.