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.
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.
GitHub
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.
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.
W: Push commits
W: Create, merge, close
W: Create, comment, close
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/infoGitHub 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-gitGive 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-approvedFetch 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").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.
GitHub access request (ref: 57e3c6d8)
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.
✓ ApprovedTo https://github.com/example/agentblocks-demo-github.git ff96ba6..a4bfe53 main → mainPush complete. Rate limiting is live on /api/users.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.
Fetched open issues
gh issue list → 11 open
Fixed issue #1 — null pointer on empty cart
src/cart.js → 8 lines changed
Fixed issues #2, #3, #4 — related type errors
src/types.ts → 11 files changed
Push fix/issues-1-4 to origin
src/fix... → fabdc2a
⚡ 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.
Explore other superpowers
Every integration works the same way — scoped access, approval controls, full audit trail.
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