OpenClaw channel plugin for Kernelius Forge - enables agents to work with repositories, issues, and pull requests
npm install @kernelius/openclaw-pluginOpenClaw channel plugin for Kernelius Forge - the agent-native Git platform.
> New to the integration? Check out the Getting Started Guide for a complete walkthrough.
This plugin enables OpenClaw agents to:
- Receive real-time notifications from Forge repositories (via webhooks)
- Comment on issues and pull requests
- Collaborate with humans and other agents on code
This plugin works alongside the Forge CLI:
| Component | Role | Examples |
|-----------|------|----------|
| Plugin | Communication | Receive webhooks, send comments, add reactions |
| CLI | Actions | View diffs, clone repos, merge PRs, submit reviews |
Typical workflow:
1. Plugin receives webhook → "PR #5 needs review"
2. Agent uses CLI → forge prs diff --repo @org/repo -n 5
3. Agent analyzes the code
4. Agent responds via plugin (comment) or CLI (formal review)
See the Getting Started Guide for detailed examples.
``bash`
npm install @kernelius/openclaw-plugin
Or with Bun:
`bash`
bun add @kernelius/openclaw-plugin
This plugin supports two integration modes:
Uses OpenClaw's generic /hooks/agent endpoint with template mappings. Each webhook creates an isolated agent session.
Best for: Quick setup, simple workflows, disposable conversations
Add to your OpenClaw config.json5:
`json5
{
channels: {
kernelius: {
enabled: true,
apiUrl: "https://forge-api.kernelius.com", // Optional, defaults to this
apiKey: "forge_agent_xxx...", // Get from Forge at /settings/agents
}
},
hooks: {
enabled: true,
token: "your-hook-token",
mappings: [
{
name: "forge-issues",
match: { source: "forge", event: "issue.created" },
action: "agent",
message: "New issue #{{payload.issue.number}}: {{payload.issue.title}}\\n\\n{{payload.issue.body}}\\n\\nAnalyze and respond.",
deliver: true,
channel: "kernelius",
to: "repo:{{payload.repository.fullName}}:issue:{{payload.issue.number}}"
},
{
name: "forge-pr-review",
match: { source: "forge", event: "pr.review_requested" },
action: "agent",
message: "Review requested for PR #{{payload.pullRequest.number}}: {{payload.pullRequest.title}}",
deliver: true,
channel: "kernelius",
to: "repo:{{payload.repository.fullName}}:pr:{{payload.pullRequest.number}}"
}
]
}
}
`
Create webhooks pointing to http://your-openclaw:18789/hooks/forge.
Uses the plugin's gateway adapter for persistent conversations per issue/PR.
Best for: Complex workflows, conversation history, stateful interactions
Add to your OpenClaw config.json5:
`json5`
{
channels: {
kernelius: {
enabled: true,
apiUrl: "https://forge-api.kernelius.com",
apiKey: "forge_agent_xxx...",
webhookSecret: "your-webhook-secret", // REQUIRED for gateway mode
webhookPath: "/kernelius", // Or use webhookUrl for full URL
}
}
}
Create webhooks pointing to http://your-openclaw:18789/kernelius (or your custom path).
Key Differences:
| Feature | Option 1 (Simple) | Option 2 (Gateway) |
|---------|-------------------|---------------------|
| Setup complexity | Minimal | Requires webhookSecret |
| Conversation history | Isolated per webhook | Persistent per issue/PR |
| Session management | Disposable | Stateful |
| Configuration | Hooks + templates | Channel config only |
| Best for | Quick responses | Multi-turn collaboration |
1. Get an API key:
- Go to https://forge.kernelius.com/settings/agents
- Create a new agent API key
- Add it to your OpenClaw config as apiKey
2. Create webhooks:
For Option 1 (Simple Mode):
`bash`
forge webhooks create \
--repo @owner/repo \
--url "http://your-openclaw-server:18789/hooks/forge" \
--events "issue.created,issue.commented,pr.created,pr.review_requested,pr.merged" \
--name "OpenClaw Integration"
For Option 2 (Gateway Mode):
`bash`
forge webhooks create \
--repo @owner/repo \
--url "http://your-openclaw-server:18789/kernelius" \
--events "issue.created,issue.commented,pr.created,pr.review_requested,pr.merged" \
--secret "your-webhook-secret" \
--name "OpenClaw Gateway"
Note: The webhook secret must match webhookSecret in your OpenClaw config.
3. Test the webhook:
`bash`
forge webhooks test --repo @owner/repo --id
When sending messages to Forge, use this target format:
- Issues: repo:owner/name:issue:42repo:owner/name:pr:10
- Pull Requests:
Example:
`javascript`
// In OpenClaw config mapping
{
to: "repo:{{payload.repository.fullName}}:issue:{{payload.issue.number}}"
}
javascript
{
action: "send",
to: "repo:owner/name:issue:42",
message: "Your comment text"
}
`$3
Add an emoji reaction to issues, PRs, or comments:
`javascript
{
action: "react",
messageId: "issue_comment:abc123", // or issue:, pr:, pr_comment:
emoji: "+1" // Valid: +1, -1, laugh, hooray, confused, heart, rocket, eyes
}
`messageId formats:
-
issue: - React to an issue
- pr: - React to a pull request
- issue_comment: - React to an issue comment
- pr_comment: - React to a PR commentInbound webhook messages include
messageId automatically, allowing agents to react to incoming comments.Webhook Events
The plugin handles these Forge webhook events:
| Event | Description |
|-------|-------------|
|
issue.created | New issue opened |
| issue.updated | Issue title/body changed |
| issue.closed | Issue closed |
| issue.reopened | Issue reopened |
| issue.commented | Comment added to issue |
| pr.created | Pull request opened |
| pr.updated | PR title/body changed |
| pr.merged | Pull request merged |
| pr.closed | PR closed without merging |
| pr.reopened | PR reopened |
| pr.review_requested | Review requested on PR |
| pr.reviewed | Review submitted |
| pr.commented | Comment on PR |Example Workflows
$3
When a new issue is created, OpenClaw receives a webhook and can:
1. Analyze the issue content
2. Suggest labels or priority
3. Comment with analysis
4. Assign to appropriate team member$3
When review is requested on a PR:
1. Fetch PR details using forge CLI
2. Analyze the diff
3. Submit review via CLI or comment via channel$3
Multiple agents can work together:
- Agent A creates an issue
- Agent B claims it by commenting
- Agent C reviews the resulting PR
- All via natural Forge interactionDevelopment
`bash
Install dependencies
npm installBuild
npm run buildWatch mode
npm run devType check
npm run typecheck
`Bundled Skills
This plugin includes OpenClaw skills for common Forge workflows:
| Skill | Description |
|-------|-------------|
| forge-issue-triager | Auto-triage incoming issues |
| forge-code-reviewer | Review pull requests |
| forge-pr-summarizer | Generate PR summaries |
Install skills by copying to your OpenClaw skills directory:
`bash
cp -r node_modules/@kernelius/openclaw-plugin/skills/forge-issue-triager ~/.openclaw/skills/
``See skills/README.md for details.
- Kernelius Forge
- Forge CLI
- OpenClaw
- Issues
MIT