Getting Started
AI-callable GitHub tools for generateText, streamText, agent loops, and durable workflows with Vercel Workflow.

@github-tools/sdk wraps the GitHub REST API into AI-callable tool definitions that plug directly into the AI SDK.

Pass them to generateText, streamText, or any agent loop — the model decides which GitHub operations to call.

Explore the tools

The SDK ships 42 tools covering repositories, branches, pull requests, issues, commits, code search, gists, and workflows. Each tool wraps a GitHub API operation (mostly REST; line-level blame uses the GraphQL Commit.blame field) and is fully typed with Zod schemas.

Browse the full list in the Tools Catalog.

Compose tools with presets

Instead of wiring tools individually, use a preset to get a curated subset for a specific workflow:

PresetTools includedUse case
repo-explorerrepository metadata, branches, file content, code search, gists, workflowsknowledge retrieval, repo Q&A
code-reviewpull requests, commits, file diffs, review commentsPR copilots, change summaries
issue-triageissues, labels, comments, close/createsupport triage, backlog bots
ci-opsworkflows, runs, jobs, commits, repository contextCI monitoring, build ops
maintainerall tool familiesfull operator workflows

Learn more in Scope with Presets.

Use pre-built agents

For the highest level of abstraction, createGithubAgent returns a ready-to-use agent with tools, presets, and system instructions wired together:

review-agent.ts
import { createGithubAgent } from '@github-tools/sdk'

const reviewer = createGithubAgent({
  model: 'anthropic/claude-sonnet-4.6',
  preset: 'code-review',
  system: 'You review PRs for security issues. Cite file paths and line numbers.',
})

See Examples for more agent patterns.

Durable agents (long-running / crash-safe)

For chat apps and agents that must survive restarts and retries, use durable execution via the Vercel Workflow SDK. Import createDurableGithubAgent from @github-tools/sdk/workflow inside a function marked with "use workflow". Each GitHub tool already runs as a durable "use step", and the durable agent makes the LLM loop itself step-aware.

Read the full walkthrough in Durable workflows (Vercel Workflow), or see the examples/pr-review-agent/ starter for a complete PR review agent connected to GitHub via Chat SDK.

Agent Skills

Install the github-tools-agents skill with npx skills add https://github-tools.com, or use the copy-paste prompts embedded on Installation, Quick Start, and the other guide pages. Details: Agent Skills.

Three layers, one SDK

Tools

42 individual GitHub operations you wire into any AI SDK call — each callable as a durable workflow step.

Presets

Curated tool subsets for focused workflows like code review or issue triage.

Agents

Pre-configured agents with tools, presets, and system instructions ready to go.

Durable workflows

Vercel Workflow, DurableAgent, and crash-safe GitHub tool steps for production agents.

External references

Copyright © 2026