Other Integrations & Plugin API
Connect OpenClaw to any external tool using the REST API, webhooks, or the Python plugin system. Build custom tools or install community packs.
Quick Start in 3 Steps
- Start the API server:
openclaw start --api - Send your first request:
curl -X POST http://localhost:8080/api/run -H "Content-Type: application/json" -d '{"task": "Hello world"}' - Process the result: Pipe the JSON response to your app or webhook endpoint
ngrok http 8080Prerequisites
- OpenClaw v1.0.0 or later installed and running
- For REST API: OpenClaw started with
openclaw start --api - For Python plugins: Python 3.9+ and basic Python knowledge
- For webhooks: a publicly accessible server URL (or ngrok for local dev)
REST API
When running openclaw start --api, a REST API is available at http://localhost:8080:
# Run a task via API
curl -X POST http://localhost:8080/api/run \
-H "Content-Type: application/json" \
-d '{"task": "Summarize this text", "provider": "openai"}'
# Check job status
curl http://localhost:8080/api/status/JOB_ID
# List all jobs
curl http://localhost:8080/api/jobsWebhooks
Configure webhooks to POST job results to any URL when a task completes:
# config.yaml
webhooks:
on_complete:
url: https://your-app.com/hooks/openclaw
method: POST
headers:
Authorization: "Bearer YOUR_WEBHOOK_SECRET"
payload_template: |
{
"job_id": "{{ job.id }}",
"status": "{{ job.status }}",
"result": "{{ job.result }}"
}Python Tool Plugin API
Create custom tools in Python that the agent can invoke:
from openclaw.tools import tool, ToolResult
@tool(name="weather", description="Get current weather for a city")
def get_weather(city: str) -> ToolResult:
"""Fetch weather data for the specified city."""
import requests
resp = requests.get(f"https://wttr.in/{city}?format=3")
return ToolResult(success=True, data=resp.text)
# Register the plugin
openclaw install ./my_weather_tool.py
# Test it
openclaw run "What's the weather in London?" --enable-tools weatherCommunity Packs
| Pack | Tools | Install |
|---|---|---|
| browser | Web search, page fetch, screenshot | openclaw install browser |
| database | SQLite, PostgreSQL queries | openclaw install database |
| git | Commit, diff, branch management | openclaw install git |
| Send/read via SMTP/IMAP | openclaw install email | |
| filesystem | Read, write, list, delete files | openclaw install filesystem |
Community packs are third-party. Review the source code before installing. Always use allowed_tools in config to limit what tools the agent can access.
Slack Integration
Post AI-generated messages and reports directly to Slack channels using the Incoming Webhooks feature or the Slack community pack:
# Install the Slack pack
openclaw install slack
openclaw config set slack.webhook_url "https://hooks.slack.com/services/T.../B.../..."
# Post an AI-generated message to Slack
openclaw run "Summarize today's deployment and any issues" | \
openclaw slack post --channel "#deployments"
# Or use direct webhook (no pack required)
SUMMARY=$(openclaw run "Summarize the last 10 git commits")
curl -s -X POST "$SLACK_WEBHOOK_URL" \
-H 'Content-type: application/json' \
--data "{\"text\": \"$SUMMARY\"}"Notion and Confluence Integration
Populate Notion databases or Confluence pages with AI-generated content:
# Install Notion pack
openclaw install notion
openclaw config set notion.api_key "secret_..."
openclaw config set notion.database_id "YOUR_DATABASE_ID"
# Create a new Notion page from meeting notes
openclaw run "Convert these meeting notes into a structured Notion page with sections: Summary, Decisions, Action Items, Next Meeting" \
--file meeting-notes.txt \
--output notion-page.json
openclaw notion create-page --from notion-page.jsonGitHub Integration
Combine OpenClaw with the GitHub CLI for AI-powered repository management:
# Auto-generate PR descriptions
git diff main...HEAD | \
openclaw run "Write a GitHub pull request description with: Summary, Changes Made, Testing Done, Breaking Changes." | \
gh pr create --body-file -
# Triage open issues
gh issue list --json title,body,number | \
openclaw run "Classify each issue as: bug / feature / docs. Add priority: high / medium / low. Output JSON." | \
jq -r '.[] | "Issue #\(.number): \(.label) (\(.priority))"'
# Generate commit messages
git diff --staged | openclaw run "Write a conventional commit message for these changes (type: feat/fix/docs/refactor)."Try It Yourself
These examples show how to connect OpenClaw to common developer tools using the REST API and webhooks.
Example 1: Call the REST API from any language
# Trigger a task via curl (useful from CI/CD, scripts, or other services)
curl -X POST https://your-openclaw-instance/api/run \
-H "Authorization: Bearer $OPENCLAW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"task": "Summarise this week'"'"'s git commits in one paragraph", "model": "gpt-4o-mini"}'
# Response:
# {"status": "completed", "output": "This week the team shipped...", "tokens_used": 312}Example 2: Trigger OpenClaw from a GitHub Actions workflow
# .github/workflows/ai-review.yml
name: AI Code Review
on: [pull_request]
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- run: pip install openclaw
- name: Review PR diff
env:
OPENCLAW_API_KEY: ${{ secrets.OPENCLAW_API_KEY }}
run: |
git diff origin/${{ github.base_ref }}...HEAD > diff.patch
openclaw run "Review this PR diff: flag bugs, security issues, missing tests. Be concise." \
--file diff.patch --format markdown > review.md
cat review.mdExample 3: Webhook — trigger a task from any external service
# Configure a webhook receiver in openclaw config.yaml:
# webhook:
# enabled: true
# port: 8080
# secret: "${WEBHOOK_SECRET}"
# Then send a POST from Zapier, Make.com, Stripe, or any service:
curl -X POST http://localhost:8080/webhook \
-H "X-Signature: $WEBHOOK_SECRET" \
-H "Content-Type: application/json" \
-d '{"task": "New Stripe payment received. Update the monthly revenue spreadsheet."}'What's Next
- Discord Integration — add OpenClaw to your Discord server
- Telegram Integration — control OpenClaw from mobile via Telegram
- Community Resources — find more community packs and integrations
- AI Pipelines — chain integrations into multi-step workflows