All super-powers

Give your AI agent safe access to GitHub

Your agent can push commits, open PRs, and manage branches. Approved actions issue a short-lived token scoped to exactly what's needed — nothing more, nothing lingering.

Step 1

Connect your GitHub account in the dashboard

Install the AgentBlocks GitHub App on the repos you want your agent to access. Your agent gets scoped permissions — read code, create branches, and open pull requests. Revoke any time from your GitHub settings.

ApprovalsActivitySettings

GitHub

Connected GitHub Accounts
AccountGitHub
acme
Delete
Step 2

Configure your rules

Configure repository access and permissions. Choose which repos your agent can access, and set read/write permissions for commits, pull requests, and issues.

GitHubdefault

Rules are evaluated top-to-bottom within each capability. The first matching rule wins. When no rules match, the system requires approval.

Repository access

Configure which repositories this agent can access. All matching rules are combined.

Repository
CommitsR: Pull, fetch, browse
W: Push commits
PRsR: List, view PRs
W: Create, merge, close
IssuesR: List, view issues
W: Create, comment, close
Action
acme/webapp.git
Anything elseRequire approvalsystem
+ Add another
Save all rules
Step 3

Tell the agent about AgentBlocks — it'll set itself up

Paste in the setup snippet with an API key and it reads the docs, discovers its capabilities, and configures itself. No SDKs to install. No integration code to write.

In order to help me complete the next tasks, you'll need to use the
AgentBlocks API, which allows us to selectively give you (the agent) tool
access. I have created an API key for you:
sk-example_xxxxxxxxxxxxxxxxxxxxxxxx . The docs are at
https://api.agentblocks.ai/agent-guide.
• Let me read the docs and discover my capabilities.
• Fetch https://api.agentblocks.ai/agent-guide
$ curl -s -H "Authorization: Bearer sk_example_..."
https://api.agentblocks.ai/agent/info
GitHub capability is available. Let me set up the wrapper script.
$ curl -sf "https://api.agentblocks.ai/agentblocks-git" -o
.git/agentblocks-git && chmod +x .git/agentblocks-git
Step 4

Give it a task — it figures out how to do it, with auto-approval for the actions you trust

The agent maps its task onto the tools AgentBlocks gives it. Operations you've marked as safe — like reading from a remote — proceed instantly without interrupting you.

Look for commits on the remote that we don't have locally.
$ AGENTBLOCKS_API_KEY=sk_example_... .git/agentblocks-git fetch
agentblocks-git: auto-approved
Fetch succeeded. Now let me check for new remote commits.
$ git log HEAD...origin/main --oneline
(No output)
No new remote commits — both point to ff96ba6 ("Refactor auth middleware").
Step 5

You decide what the agent has to ask permission for

Here, pushing to a remote requires approval. The agent edits the file and makes the commit — then stops and waits. The API doesn't allow the agent to accidentally get it wrong.

Add rate limiting to the /api/users endpoint, commit, and push.
Update src/middleware/rateLimit.ts:
+ export const apiLimiter = rateLimit({
+ windowMs: 15 * 60 * 1000,
+ max: 100,
+ });
Update src/routes/users.ts:
+ import { apiLimiter } from '../middleware/rateLimit';
+ router.use(apiLimiter);
$ git commit -m "Add rate limiting to /api/users endpoint"
[main a4bfe53] Add rate limiting to /api/users endpoint
2 files changed, 8 insertions(+)
$ AGENTBLOCKS_API_KEY=sk_example_... .git/agentblocks-git push
origin main
▲ WAITING FOR APPROVAL ...

Meanwhile ...

Get approval notifications on Slack, WhatsApp, via email, or wherever's convenient for you.

AB
AgentBlocksAPP12:04 PM

GitHub access request (ref: 57e3c6d8)

Agent: research
Repo: agentblocks-demo-github
Permissions: contents: write

Summary: git push on main

Commit message:

• Add rate limiting to /api/users endpoint

src/middleware/rateLimit.ts | 6 ++++++

src/routes/users.ts | 2 ++

2 files changed, 8 insertions(+)

You approve the push, and the agent picks up right where it left off.

✓ Approved
To https://github.com/example/agentblocks-demo-github.git
ff96ba6..a4bfe53 main → main
Push complete. Rate limiting is live on /api/users.
Step 6

Then let it run

Your agent works unattended for as long as it needs to, only surfacing when it hits something that needs your say-so. Safe actions auto-approve. Everything else waits for a single tap.

Agent activity — fix all open issuesstarted 09:02m
09:04

Fetched open issues

gh issue list → 11 open

AUTO
09:06

Fixed issue #1 — null pointer on empty cart

src/cart.js → 8 lines changed

AUTO
09:16

Fixed issues #2, #3, #4 — related type errors

src/types.ts → 11 files changed

AUTO
10:27

Push fix/issues-1-4 to origin

src/fix... → fabdc2a

⏳ WAITING

⚡ Permission request sent to your phone

You approve (or reject) straight from WhatsApp. The agent pauses and waits. Reply and it picks up exactly where it left off.

Give your agent safe
GitHub access today.

One paste. One API key. Your agent handles the rest.

🦞 Works great with OpenClaw, Claude Cowork and Claude Code