Skip to main content
A tool node fetches a raw PR diff from the GitHub API, then an agent summarizes the changes. Demonstrates how to chain an HTTP tool node with a downstream agent node using a real external API.

What it demonstrates

  • tool node with tool: http for external API calls
  • Template interpolation in HTTP headers ({{ env.GITHUB_TOKEN }})
  • Chaining a tool node to an agent node via an edge
  • Passing fetched data through the workflow context to a downstream agent

Prerequisites

Set a GitHub personal access token with repo:read scope:

Run it

To point at a different PR, edit the url in workflow.yaml to match your repository and PR number:

Workflow

docs/cookbook/pr-summarizer/workflow.yaml

Graph

Next steps

Tool Nodes

Full HTTP and Python tool node documentation.

Blind Code Review

Multi-turn refinement: write, review, revise.