Skip to main content
Use afk.debugger.Debugger to run agents in a structured debug mode without changing your core runtime architecture.

Quick start

You can also enable debug mode directly on the runner:

Attach to a run handle

Redaction behavior

When redact_secrets=True, payload keys containing any of these markers are masked:
  • api_key
  • token
  • secret
  • authorization
  • password

Verbosity modes

  • basic: lightweight metadata and step markers.
  • detailed: includes payload previews and step metadata.
  • trace: highest detail for deep diagnostics.

Background tool scenario (coding + build + docs)

Flow:
  1. Agent writes code.
  2. Agent calls build_project and receives tool_deferred.
  3. Agent continues with write_docs or other tasks.
  4. Runner emits tool_background_resolved when build completes.
  5. Agent uses resolved build output in a later step to finalize/fix.

External worker completion

For out-of-process execution, an external worker can complete a ticket by writing background state into memory:
The runner poller detects this update, emits tool_background_resolved or tool_background_failed, and injects a synthetic tool message for the next step.