fable-agent/PHASES/phase-03-tool-orchestrator.md

657 B

Phase 3: Tool Orchestrator

Purpose: Reliable tool dispatch with retry, backoff, and validation. TS Module: src/tier1-foundation/tool-orchestrator.ts

What It Does

Executes tool calls with:

  • Exponential backoff (1s → 2s → 4s → 8s)
  • Configurable max retries (default: 3)
  • Timeout enforcement per tool call
  • Pluggable argument validators

Retry Config

{ "maxRetries": 3, "baseDelayMs": 1000, "backoffFactor": 2, "maxDelayMs": 30000 }

Key Rules

  • Register tools before execution
  • Tool handlers receive ToolCall objects and return any value
  • Failed tools go through retry → fallback → graceful degradation