Overview
Tool Name
Purpose
The delegate_work tool orchestrates sophisticated work delegation across specialized data agents. Use it to assign tasks with retries and timeouts, launch deep analytical workflows, execute predefined programs, and repeat instructions across multiple items while preserving progress, status, and results.Functions Available
_delegate_work: Assign a task to a target data agent with optional retries, timeouts, and callback wiring.deep_analysis: Run a guided multi-step analysis with optional human-in-the-loop checkpoints.run_program: Execute a predefined program such as mapping research or DBT model build.repeat: Iterate the same instruction across a list of items with per-item controls.
Key Features
Targeted Delegation
Route well-scoped tasks to the right specialist agent and capture structured results.
Deep Analysis
Drive multi-step investigations with optional interactive checkpoints.
Program Execution
Launch opinionated programs for mapping, research, and DBT model building.
Batch Operations
Repeat instructions across up to 20 items with per-item retry and timeout.
Reliability Controls
Built-in retry, timeout, and progress reporting for resilient automation.
Input Parameters for Each Function
_delegate_work
| Name | Definition | Format |
|---|---|---|
| target_bot | Data Agent id or name to receive the task. | String (required) |
| prompt | Clear task description and instructions. | String (required) |
| timeout_seconds | Max seconds to wait for completion. Default 300. | Integer |
| max_retries | Number of automatic retries on transient failure. | Integer |
deep_analysis
| Name | Definition | Format |
|---|---|---|
| question | Business or technical question to analyze. | String (required) |
| model | Model hint, for example o4-mini or gpt-4. | String |
| interactive_mode | Enable human prompts at checkpoints. | Boolean |
| max_step | Highest step to execute, 1 to 5. | Integer |
| stop_at | Named step to stop after: business_terms, research, generation, execution, formatting. | String |
| verbosity | Output verbosity: minimal, standard, debug. | String |
| show_full_output | Return complete workflow output. Default true. | Boolean |
| resume_task | Task id to resume a paused run. | String |
| user_answers | Answers to pending prompts when resuming. | String |
| output_file | File path to save full results as JSON. | String |
run_program
| Name | Definition | Format |
|---|---|---|
| program_id | Program to run: mapping_research_and_proposal, create_mappings_project, create_mappings_project_from_json, dbt_model_build. | String (required) |
| project_id | Project id for the program. | String |
| todo_id | Todo id for mapping research. | String |
| root_folder | Root folder for generated assets. | String |
| g_sheet_id | Google Sheet id for configuration. | String |
| json_config_path | Path to JSON configuration file. | String |
| dbt_profile | DBT profile name for model build. | String |
| dbt_project | DBT project name for model build. | String |
| target_schema | Target schema for DBT models. | String |
| requirements_table_name | Full path to requirements table for DBT. | String |
repeat
| Name | Definition | Format |
|---|---|---|
| instruction | Base instruction to apply to every item. | String (required) |
| items | Array of up to 20 parameter objects. | Array (required) |
| timeout_seconds | Max seconds per item. | Integer |
| max_retries | Retry attempts per item. | Integer |
Use Cases
- Cross-agent project orchestration Delegate profiling to a data agent, documentation to a writer agent, and ticketing to a PM agent, then roll up results.
- Interactive business analysis
Use
deep_analysiswithinteractive_modeto validate assumptions and decisions with stakeholders. - Programmatic DBT workflows
Run
dbt_model_buildviarun_programand persist outputs for review. - High-volume batch tasks
Apply the same instruction to many datasets with
repeat, capturing per-item outcomes. - Research and mapping initiatives
Launch
mapping_research_and_proposaland generate a project skeleton with linked artifacts.
Workflow/How It Works
- Plan the delegation: define scope, success criteria, and the right target agent or program.
- Invoke
_delegate_work,deep_analysis,run_program, orrepeatwith appropriate controls. - Monitor progress through step outputs and status messages.
- Resolve prompts in interactive mode when decisions are required.
- Capture results, artifacts, and logs for audit and follow-up actions.
Integration Relevance
- make_baby_bot to create and manage specialist data agents used as targets.
- project_manager_tools to track delegated work as tasks and milestones.
- data_connector_tools to power data retrieval inside delegated analyses.
- dbt_action to coordinate model builds from
run_program. - google_drive_tools and file_manager_tools to persist configurations and outputs.
- slack_tools to notify owners when delegated tasks complete or fail.
Configuration Details
- Ensure target agents are online and authorized for the requested operations.
- Match program_id and required configs exactly when using
run_program. - Choose
interactive_modeonly when a human can respond to prompts in a timely manner. - Calibrate timeouts and retries to expected task durations and external dependency behavior.
- Store any generated files in a consistent location for downstream indexing or sharing.
Limitations or Notes
- Success depends on target agent’s availability and capability.
- Interactive runs may pause indefinitely without user input.
repeataccepts at most 20 items to protect resources.- Some programs require external credentials or configuration files.
- Model choice in
deep_analysisinfluences quality and cost. - Network or API outages can cause timeouts even with retries.
Output
- Delegation responses with final status, data payloads, and any generated artifact references.
- Deep analysis reports including step logs, findings, and recommendations.
- Program outputs such as created projects, file paths, or DBT build summaries.
- Batch results for
repeat, one entry per item with success or failure details. - Interactive prompts when human input is needed, plus resume tokens for later continuation.
- Error messages with retry counts and hints for remediation.

