Skip to content

Preflight checks (abt debug)

abt debug answers one question: can I actually run right now? It validates your environment, project config, profile and the live LLM connection — modelled on dbt debug. Run it first when onboarding a project or when a run fails for reasons that look like configuration or credentials.

It is the counterpart to abt doctor:

abt debug abt doctor
Question Can I run? (connectivity) Should I run this? (agent design)
Compiles the project No — fast, no manifest Yes — full bootstrap
Talks to the LLM Yes — one tiny request Only with --deep
Exit code Non-zero on any failure 0 whenever it prints a report (advisory); non-zero only when compile or setup fails

What it checks

Checks run in order; each prints an inline ✓ / ✗ / - line, then a summary:

  1. Environment — abt version, Python version/path, platform. (Informational.)
  2. Project — abt.yaml exists and parses into a valid ProjectConfig.
  3. Profile / target — profiles.yaml is found (using the normal search order: --profiles-dir → ABT_PROFILES_DIR → project root → ~/.abt) and the selected profile/target resolves. The resolved path, target and model id are printed.
  4. LLM connection — builds the chat model for the resolved profile and issues a minimal one-token request (the LLM equivalent of dbt's select 1). This is the only network call and it goes through the same provider factory a real run uses, so a pass means your credentials, region and provider: prefix are all correct. Skipped (not failed) when no profile resolved. Every full run and every --connection run sends this one request to your model provider, so it can incur a (tiny) charge.

abt debug stays deliberately minimal — the checks above are what you need to get a first run working. Deeper concerns (agent design, guardrails, delegation) live in abt doctor.

Every failure prints a one-line remediation in the summary. Connection errors pass through abt's secret redaction, so provider API keys are masked (***).

Usage

# full preflight
abt debug --project-root .

# just the profile + live connection (skip environment/project checks)
abt debug --project-root . --connection

# check a specific target
abt debug --project-root . --target prod --profiles-dir ~/.abt
Flag Meaning
--connection Only resolve the profile and test the live LLM connection; skip the environment and project checks (mirrors dbt debug --connection).
--project-root Project root containing abt.yaml (default: current directory).
--target Named target under the active profile in profiles.yaml.
--profiles-dir Directory containing profiles.yaml. It replaces the default lookup: if the directory has no profiles.yaml, the check fails (✗ profiles.yaml: No profiles.yaml found in --profiles-dir: <path>) instead of falling back to the project root.

Exit codes

  • 0 — all checks passed (skipped checks do not fail the command).
  • 1 — one or more checks errored (1 check failed: followed by one remediation line per failure). Use abt debug in CI as a fast gate before a run.

Example

$ abt debug --project-root .
    abt version  <version>
    python  3.12.12 (/…/.venv/bin/python)
    platform  macOS-26.6.1-arm64-arm-64bit
  ✓ project (abt.yaml)  /…/abt.yaml
  ✓ profile / target  /…/profiles.yaml → target (default target), model bedrock_converse:eu.anthropic.claude-haiku-5-5
  ✓ LLM connection  reached bedrock_converse:eu.anthropic.claude-haiku-5-5

All checks passed.