Usage

Tool Pipelines

Compose scheduled agent output reads, agent handoffs, transforms, and user notifications.

Tool pipelines are small, bounded workflows made from the same tools agents can already call. Use them when a user wants future communication or a recurring report that depends on agent work.

Pipelines are not a special daily-summary system. They are a primitive for composing steps such as:

  • read an agent's recent output
  • send that text to an existing or newly created ChatGPT+Tools or coding agent
  • read the analysis agent's output later in the pipeline
  • notify, text, email, call, or send a file/image to the user

What pipelines are#

Use run_tool_pipeline for immediate multi-step workflows. Use schedule_tool_pipeline when the pipeline should run later or recur.

Each pipeline is limited to a small number of declarative steps. A step can either call an existing chat.dev tool or render a safe template. Templates can reference previous step outputs with {{steps.stepId.path}}. They cannot run shell commands, Python, network requests, or arbitrary code.

Useful tools inside pipelines include:

  • read_agent_output
  • create_agent
  • send_instructions_to_agent
  • notify_user
  • call_user
  • send_file_to_user
  • send_image_to_user
  • generate_image

Pipeline steps#

Each step needs an id.

Tool step:

{
  "id": "read_builder",
  "toolName": "read_agent_output",
  "args": {
    "agentId": "builder-agent",
    "limit": 20
  }
}

Template step:

{
  "id": "summary_prompt",
  "type": "template",
  "template": "Summarize the important progress from these messages:\n\n{{steps.read_builder.messages}}"
}

Later steps can use that template output:

{
  "id": "send_to_summarizer",
  "toolName": "send_instructions_to_agent",
  "args": {
    "agentId": "daily-summary-agent",
    "instructions": "{{steps.summary_prompt.text}}"
  }
}

Scheduled reports#

For a recurring report, call schedule_tool_pipeline with a first run time and recurrence:

{
  "delaySeconds": 3600,
  "recurrence": {
    "everySeconds": 86400,
    "maxRuns": 30
  },
  "steps": []
}

The recurrence interval must be at least 60 seconds. Use maxRuns when the report should expire automatically.

Example#

This pipeline reads recent work from an agent, asks a separate ChatGPT+Tools summarizer agent to analyze it, reads the summarizer output, and emails the user.

{
  "delaySeconds": 3600,
  "recurrence": {
    "everySeconds": 86400,
    "maxRuns": 30
  },
  "steps": [
    {
      "id": "read_turtle_agent",
      "toolName": "read_agent_output",
      "args": {
        "agentId": "turtle-research",
        "limit": 30
      }
    },
    {
      "id": "build_prompt",
      "type": "template",
      "template": "You are preparing a daily user update. Summarize concrete progress, blockers, and next actions from this agent output:\n\n{{steps.read_turtle_agent.messages}}"
    },
    {
      "id": "ask_summarizer",
      "toolName": "send_instructions_to_agent",
      "args": {
        "agentId": "turtle-summary-agent",
        "instructions": "{{steps.build_prompt.text}}"
      }
    },
    {
      "id": "read_summary",
      "toolName": "read_agent_output",
      "args": {
        "agentId": "turtle-summary-agent",
        "limit": 10
      }
    },
    {
      "id": "email_user",
      "toolName": "notify_user",
      "args": {
        "channel": "email",
        "message": "Daily turtle team update:\n\n{{steps.read_summary.messages}}"
      }
    }
  ]
}

If you need a new summarizer, add a create_agent step before send_instructions_to_agent and reference the created agent ID in later steps, for example {{steps.create_summarizer.id}}.