vercel-labs

github-tools: Give AI Agents Typed Access to GitHub

A TypeScript toolkit that turns GitHub API operations into typed tools for AI SDK agents. It adds task-focused presets, human approval for writes, and support for durable agent execution.

Stars
131
Forks
13
Stars, last 19 days
+1

Our take

Health score

70/100

How it is scored
Activity
85
Community
40
Issues
79
Pull requests
77

+1 stars in the last 19 days

  • Releases more often than 86% of the projects we track
  • Closes issues faster than 82% of the projects we track
  • Merges more pull requests than 81% of the projects we track

Overview

vercel-labs/github-tools is a TypeScript SDK that packages GitHub operations as tools for AI agents built with the Vercel AI SDK. It addresses the work involved in adapting GitHub API calls for agents, including defining tool inputs, limiting available actions, and handling results in a context-friendly way.

It suits teams building agents that inspect or change repositories, issues, pull requests, and CI workflows. Compared with using a general API client directly, the SDK provides presets for common tasks and approval controls for write operations. It also supports durable execution through Vercel Workflow and integrations with eve and Chat SDK.

Key Features

  • Exposes GitHub operations as typed AI SDK tools across repositories, pull requests, issues, discussions, CI, releases, and more.
  • Provides task-oriented presets, including code review, issue triage, security audit, and release management.
  • Requires human approval for write operations by default, with options for granular approval policies.
  • Supports durable, retryable agent workflows through the Vercel Workflow SDK.
  • Includes an agent helper that pairs GitHub tools with task-specific instructions.
  • Offers Vercel Connect support for minting short-lived GitHub tokens instead of storing a personal access token.

Use Cases

  • An engineering team can build a pull request reviewer that reads diffs, review threads, and CI results, while gating changes behind approval.
  • A support or repository maintainer can triage issues by searching, labeling, commenting, and assigning work through an agent.
  • A release manager can use an agent to inspect commits and workflow runs, then prepare or update releases with write approval enabled.
  • A developer building a GitHub bot can combine a focused preset with Chat SDK or an existing AI SDK application.

Getting Started

Install the SDK and its peer dependencies:

pnpm add @github-tools/sdk ai zod

See the README for token permissions, presets, approval configuration, and framework-specific setup. Documentation is also available at github-tools.com.

Considerations

  • The SDK requires a GitHub token with permissions appropriate to the operations and repositories an agent will access. Fine-grained tokens are recommended in the README.
  • Write tools can create or modify GitHub resources. Approval is enabled by default, but deployments should review any changes to that policy.
  • The core package has peer dependencies on ai and zod. Workflow, eve, and Connect integrations require additional packages, and some subpaths have specific AI SDK version requirements.
  • Durable execution does not make every write operation idempotent. The README identifies operations that may create repeated side effects if retried.

Found this useful?

Share it with someone who would like github-tools.