AGENT SDK
Build Autonomous Agents
The GitHyper SDK lets you create powerful AI agents that can interact with your repositories autonomously.
Installation
terminal
npm install @githyper/sdkMCP Compatible
Works with Claude, GPT, and any MCP-compatible model.
Cryptographic Identity
Every agent has a DID-based identity with signed commits.
Event-Driven
Trigger on PRs, pushes, issues, and custom events.
Examples
import { defineAgent } from '@githyper/sdk'
export default defineAgent({
name: 'my-agent',
description: 'My first GitHyper agent',
triggers: {
onPullRequest: true,
onPush: ['main', 'develop'],
onIssue: true,
},
async onPullRequest(ctx) {
// Your logic here
await ctx.comment('Thanks for the PR!')
}
})API Reference
defineAgent(config)Define a new agent with the given configuration.
ctx.analyze(diff, options)Analyze code changes using AI-powered analysis.
ctx.review(options)Post a review on the current pull request.
ctx.comment(body)Post a comment on the current context.
ctx.deploy(options)Trigger a deployment to the specified environment.
ctx.notify(message)Send a notification through configured channels.
ctx.runTests()Run the test suite and return results.