@github-tools/sdk is a typed tool layer that gives an AI agent GitHub access. The catalog is large on purpose — so you can build almost any GitHub agent — and presets (or manager + sub-agents for multi-role products) keep that catalog out of the context window. Mount it as an eve extension in one file for a complete, durable GitHub agent, or drop it into any AI SDK app.
The GitHub REST API isn't an agent tool layer on its own: an agent still needs a schema it can fill reliably, a safety gate before it merges a PR, output shaped to fit a context window, and a way to survive a crash mid-task. @github-tools/sdk does all four: presets scope what an agent can touch, human approval gates every write by default, outputs are shaped and truncated for token economy, and every tool runs as a durable workflow step.
Explore GitHub tools for this project
Why not the GitHub MCP server, gh CLI, or raw Octokit?
They all reach the GitHub API, but none of them were built as an agent's tool layer. Wiring GitHub into an agent by hand (or through a generic tool bridge) means an input schema the model can fill reliably, output shaping so raw payloads don't blow up the context window, a safety gate before the model merges a PR, and a way to survive a crash mid-task. Multiply that by every operation the agent needs.
@github-tools/sdk | GitHub MCP server | gh CLI | Raw Octokit | |
|---|---|---|---|---|
| Integration | Native AI SDK tool() objects | MCP wire protocol via a separate process | Shell-out from the agent | Hand-written per call |
| Human approval | Built in, on by default | Host-dependent, inconsistent | None | You build it |
| Durable / retryable | Every call is a "use step" | No | No | No |
| Scoped by task | Presets (10 built-in) | Full server surface, or manual filtering | Full CLI surface | You build it |
| Token-efficient output | Shaped and truncated by design | Raw API responses | Raw text, needs parsing | Raw API responses |
| Native eve / Workflow / Chat SDK | Yes | No | No | No |
Concretely, the SDK gives you:
- Typed inputs: every tool ships a Zod schema with described fields, so models fill arguments correctly.
- Shaped outputs: responses are trimmed and truncated to what the model needs, not raw REST payloads.
- Write safety by default: all 24 write tools require human approval unless you opt out.
- Scoped capability: presets expose only the tools a workflow needs.
- Durable by design: every tool runs as a
"use step"boundary, so calls are retryable workflow steps under Vercel Workflow.
A GitHub agent in 3 files
The fastest path from zero to a working GitHub agent is eve, Vercel's filesystem-first agent framework. One extension file registers every tool the agent needs:
You are a GitHub code-review assistant.
import { defineAgent } from 'eve'
export default defineAgent({
model: 'anthropic/claude-sonnet-5',
})
import githubExtension from '@github-tools/eve-extension'
export default githubExtension({
preset: 'code-review',
})
Run npx eve dev and you have a GitHub agent with durable human-in-the-loop approval on every write. Full walkthrough: Build a GitHub agent with the eve extension. For several roles in one product, see Manager agent with scoped sub-agents.
Works with your framework
The same tools plug into every major agent runtime. Pick the entry point that matches your stack:
| Framework | Import | Best for |
|---|---|---|
| eve extension | @github-tools/eve-extension | Filesystem-first agents in 3 files, durable approval (once, predicates) |
| AI SDK | @github-tools/sdk | generateText, streamText, ToolLoopAgent: scripts, chat backends, existing AI SDK apps |
| Vercel Workflow | @github-tools/sdk/workflow | Crash-safe, retryable agents that survive restarts and timeouts |
| Chat SDK | @github-tools/sdk + chat | GitHub, Slack, and Discord bots with durable multi-turn sessions |
The direct @github-tools/sdk/eve import is deprecated in favor of the eve extension above.
Explore the tools
The SDK covers repositories, branches, pull requests, issues, reactions, discussions, notifications, commits, releases, checks and statuses, code search, gists, and workflows: 75 tools in total. Each tool wraps a GitHub API operation (mostly REST; line-level blame and the discussion tools use GraphQL) 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:
| Preset | Tools included | Use case |
|---|---|---|
repo-explorer | repository metadata, branches, file content, repo tree, code search, gists, workflows, checks/statuses, releases | knowledge retrieval, repo Q&A |
code-review | pull requests, commits, compare diff, file diffs, checks/statuses, review comments, reviewer requests | PR copilots, change summaries |
issue-triage | issues, labels, comments, assignees, close/create | support triage, backlog bots |
ci-ops | workflows, runs, jobs, checks/statuses, commits, repository context | CI monitoring, build ops |
security-audit | read-only exploration, PR/CI visibility, plus issue creation to report findings | vulnerability scanning, risk reporting |
release-manager | releases, compare diff, commits, workflow runs, pull requests | changelog generation, release cutting |
discussion-moderator | discussions plus light issue context | forum / Q&A bots |
notification-inbox | notifications plus get issue/PR | inbox triage (Notifications PAT) |
pr-author | branches, file edits, create/update PRs | open focused PRs |
maintainer | all tool families | full operator workflows |
Presets compose as arrays: preset: ['code-review', 'issue-triage']. Multi-role products often work better as a manager with preset-scoped sub-agents. Learn more in Scope with Presets.
Safety is not an afterthought
Every write operation (merging a PR, pushing a file, closing an issue) is gated behind approval by default. You choose the policy:
createGithubTools({
requireApproval: {
mergePullRequest: true, // always ask
addIssueComment: false, // never ask
},
})
On the eve extension, approval goes further with 'once' (approve once per session) and input-dependent predicates. Combine with least-privilege token scopes for defense in depth. Details: Control Write Safety.
Why github-tools
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.