Create and manage Google Jules AI coding sessions to automate tasks like code writing, bug fixing, testing, and PR creation on GitHub repos using the Jules API.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install jules-api或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install jules-api⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/jules-api/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: jules description: Create and manage Google Jules AI coding sessions via the Jules REST API. Start tasks, monitor progress, approve plans, send messages, list sources/repos, and retrieve session activities/artifacts. metadata: {"openclaw":{"requires":{"env":["JULES_API_KEY"],"bins":["curl"]},"primaryEnv":"JULES_API_KEY","emoji":"🤖","homepage":"https://jules.google/docs/api/reference/"}} ---
Interact with the Google Jules AI coding agent via its REST API. Jules can autonomously execute coding tasks on your GitHub repositories — writing code, fixing bugs, adding tests, and creating pull requests.
Base URL: https://jules.googleapis.com/v1alpha
Auth: Pass your API key via the x-goog-api-key header. Get one at jules.google.com/settings.
---
Discover which GitHub repos are connected to your Jules account:
curl -s -H "x-goog-api-key: $JULES_API_KEY" \
"https://jules.googleapis.com/v1alpha/sources?pageSize=30"
With pagination:
curl -s -H "x-goog-api-key: $JULES_API_KEY" \
"https://jules.googleapis.com/v1alpha/sources?pageSize=10&pageToken=PAGE_TOKEN"
Filter specific sources:
curl -s -H "x-goog-api-key: $JULES_API_KEY" \
"https://jules.googleapis.com/v1alpha/sources?filter=name%3Dsources%2Fgithub-owner-repo"
Get details and branches for a specific repo:
curl -s -H "x-goog-api-key: $JULES_API_KEY" \
"https://jules.googleapis.com/v1alpha/sources/SOURCE_ID"
Example: sources/github-myorg-myrepo — replace with your actual source ID from List Sources.
---
Create a new Jules session to execute a coding task on a repo:
curl -s -X POST \
-H "x-goog-api-key: $JULES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "TASK_DESCRIPTION",
"title": "OPTIONAL_TITLE",
"sourceContext": {
"source": "sources/github-OWNER-REPO",
"githubRepoContext": {
"startingBranch": "main"
}
},
"requirePlanApproval": true
}' \
"https://jules.googleapis.com/v1alpha/sessions"
| Parameter | Required | Description |
|---|---|---|
| prompt | Yes | The task description for Jules to execute |
| title | No | Optional title (auto-generated if omitted) |
| sourceContext.source | Yes | Source resource name (e.g. sources/github-owner-repo) |
| sourceContext.githubRepoContext.startingBranch | Yes | Branch to start from (e.g. main, develop) |
| requirePlanApproval | No | If true, plans need explicit approval before execution |
| automationMode | No | Set to AUTO_CREATE_PR to auto-create PRs when done |
curl -s -X POST \
-H "x-goog-api-key: $JULES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Add comprehensive unit tests for the auth module",
"sourceContext": {
"source": "sources/github-myorg-myrepo",
"githubRepoContext": { "startingBranch": "main" }
},
"automationMode": "AUTO_CREATE_PR"
}' \
"https://jules.googleapis.com/v1alpha/sessions"
---
List all your Jules sessions:
curl -s -H "x-goog-api-key: $JULES_API_KEY" \
"https://jules.googleapis.com/v1alpha/sessions?pageSize=10"
Paginate with pageToken:
curl -s -H "x-goog-api-key: $JULES_API_KEY" \
"https://jules.googleapis.com/v1alpha/sessions?pageSize=10&pageToken=NEXT_PAGE_TOKEN"
Retrieve a single session by ID (includes outputs like PRs if completed):
curl -s -H "x-goog-api-key: $JULES_API_KEY" \
"https://jules.googleapis.com/v1alpha/sessions/SESSION_ID"
| State | Meaning |
|---|---|
| QUEUED | Waiting to be processed |
| PLANNING | Jules is analyzing and creating a plan |
| AWAITING_PLAN_APPROVAL | Plan ready, waiting for user approval |
| AWAITING_USER_FEEDBACK | Jules needs additional input |
| IN_PROGRESS | Jules is actively working |
| PAUSED | Session is paused |
| COMPLETED | Task completed successfully |
| FAILED | Task failed to complete |
---
When a session is in AWAITING_PLAN_APPROVAL state, approve the plan:
curl -s -X POST \
-H "x-goog-api-key: $JULES_API_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
"https://jules.googleapis.com/v1alpha/sessions/SESSION_ID:approvePlan"
Send feedback, answer questions, or give additional instructions to an active session:
curl -s -X POST \
-H "x-goog-api-key: $JULES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "YOUR_MESSAGE_HERE"
}' \
"https://jules.googleapis.com/v1alpha/sessions/SESSION_ID:sendMessage"
Use this when session state is AWAITING_USER_FEEDBACK or to provide additional guidance during IN_PROGRESS.
---
Get all events/progress for a session:
curl -s -H "x-goog-api-key: $JULES_API_KEY" \
"https://jules.googleapis.com/v1alpha/sessions/SESSION_ID/activities?pageSize=50"
Get activities after a specific timestamp (for polling):
curl -s -H "x-goog-api-key: $JULES_API_KEY" \
"https://jules.googleapis.com/v1alpha/sessions/SESSION_ID/activities?createTime=2026-01-17T00:03:53Z"
Activities will contain exactly one of these event fields:
| Event | Description |
|---|---|
| planGenerated | Jules created a plan (contains plan.steps[]) |
| planApproved | A plan was approved |
| userMessaged | User sent a message |
| agentMessaged | Jules sent a message |
| progressUpdated | Status update during execution |
| sessionCompleted | Session finished successfully |
| sessionFailed | Session encountered an error (contains reason) |
Activities may include artifacts:
gitPatch (unified diff, base commit, suggested commit message)
command, output, exitCode
mimeType and base64 data
curl -s -H "x-goog-api-key: $JULES_API_KEY" \
"https://jules.googleapis.com/v1alpha/sessions/SESSION_ID/activities/ACTIVITY_ID"
---
curl -s -X DELETE \
-H "x-goog-api-key: $JULES_API_KEY" \
"https://jules.googleapis.com/v1alpha/sessions/SESSION_ID"
---
requirePlanApproval was set, approve the plan when state is AWAITING_PLAN_APPROVAL
AWAITING_USER_FEEDBACK, send a message with your response
COMPLETED, get the session to find the output PR URL
| Code | Meaning | |---|---| | 200 | Success | | 400 | Bad request (invalid parameters) | | 401 | Unauthorized (invalid/missing API key) | | 403 | Forbidden (insufficient permissions) | | 404 | Not found | | 429 | Rate limited | | 500 | Server error |
Error responses return:
{
"error": {
"code": 400,
"message": "Invalid session ID format",
"status": "INVALID_ARGUMENT"
}
}
JULES_API_KEY environment variable...
安装 Jules API 后,可以对 AI 说这些话来触发它
Help me get started with Jules API
Explains what Jules API does, walks through the setup, and runs a quick demo based on your current project
Use Jules API to create and manage Google Jules AI coding sessions to automate tasks...
Invokes Jules API with the right parameters and returns the result directly in the conversation
What can I do with Jules API in my developer & devops workflow?
Lists the top use cases for Jules API, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/jules-api/ 目录(个人级,所有项目可用),或 .claude/skills/jules-api/(项目级)。重启 AI 客户端后,用 /jules-api 主动调用,或让 AI 根据上下文自动发现并使用。
Jules API 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Jules API 可免费安装使用。请查阅仓库了解许可证信息。
Create and manage Google Jules AI coding sessions to automate tasks like code writing, bug fixing, testing, and PR creation on GitHub repos using the Jules API.
Jules API 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using Jules API
Identifies repetitive steps in your workflow and sets up Jules API to handle them automatically