google-jules

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.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "google-jules" with this command: npx skills add sanjaydotpro/google-jules/sanjaydotpro-google-jules-google-jules

Jules API Skill

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.


List Sources (Connected Repositories)

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 a Source

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 Session (Start a Coding Task)

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"

Parameters

ParameterRequiredDescription
promptYesThe task description for Jules to execute
titleNoOptional title (auto-generated if omitted)
sourceContext.sourceYesSource resource name (e.g. sources/github-owner-repo)
sourceContext.githubRepoContext.startingBranchYesBranch to start from (e.g. main, develop)
requirePlanApprovalNoIf true, plans need explicit approval before execution
automationModeNoSet to AUTO_CREATE_PR to auto-create PRs when done

Auto-approve + Auto-PR example

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 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"

Get a Session

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"

Session States

StateMeaning
QUEUEDWaiting to be processed
PLANNINGJules is analyzing and creating a plan
AWAITING_PLAN_APPROVALPlan ready, waiting for user approval
AWAITING_USER_FEEDBACKJules needs additional input
IN_PROGRESSJules is actively working
PAUSEDSession is paused
COMPLETEDTask completed successfully
FAILEDTask failed to complete

Approve a Plan

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 a Message

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.


List Activities (Monitor 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"

Activity Types

Activities will contain exactly one of these event fields:

EventDescription
planGeneratedJules created a plan (contains plan.steps[])
planApprovedA plan was approved
userMessagedUser sent a message
agentMessagedJules sent a message
progressUpdatedStatus update during execution
sessionCompletedSession finished successfully
sessionFailedSession encountered an error (contains reason)

Artifacts

Activities may include artifacts:

  • ChangeSet: Code changes with gitPatch (unified diff, base commit, suggested commit message)
  • BashOutput: Command output with command, output, exitCode
  • Media: Binary output with mimeType and base64 data

Get a Single Activity

curl -s -H "x-goog-api-key: $JULES_API_KEY" \
  "https://jules.googleapis.com/v1alpha/sessions/SESSION_ID/activities/ACTIVITY_ID"

Delete a Session

curl -s -X DELETE \
  -H "x-goog-api-key: $JULES_API_KEY" \
  "https://jules.googleapis.com/v1alpha/sessions/SESSION_ID"

Typical Workflow

  1. List sources to find the repo resource name
  2. Create a session with a prompt describing the task
  3. Poll the session (Get Session) to track state changes
  4. List activities to monitor progress and read Jules' messages
  5. If requirePlanApproval was set, approve the plan when state is AWAITING_PLAN_APPROVAL
  6. If state is AWAITING_USER_FEEDBACK, send a message with your response
  7. When COMPLETED, get the session to find the output PR URL

Error Handling

CodeMeaning
200Success
400Bad request (invalid parameters)
401Unauthorized (invalid/missing API key)
403Forbidden (insufficient permissions)
404Not found
429Rate limited
500Server error

Error responses return:

{
  "error": {
    "code": 400,
    "message": "Invalid session ID format",
    "status": "INVALID_ARGUMENT"
  }
}

Notes

  • Get your API key from jules.google.com/settings
  • Store it as the JULES_API_KEY environment variable
  • Sources (repos) are connected via the Jules web UI at jules.google — the API is read-only for sources
  • Session resource names follow the pattern sessions/{sessionId}
  • Activity resource names follow sessions/{sessionId}/activities/{activityId}
  • All list endpoints support pageSize (1-100) and pageToken for pagination

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

image-gen

Generate AI images from text prompts. Triggers on: "生成图片", "画一张", "AI图", "generate image", "配图", "create picture", "draw", "visualize", "generate an image".

Archived SourceRecently Updated
General

explainer

Create explainer videos with narration and AI-generated visuals. Triggers on: "解说视频", "explainer video", "explain this as a video", "tutorial video", "introduce X (video)", "解释一下XX(视频形式)".

Archived SourceRecently Updated
General

asr

Transcribe audio files to text using local speech recognition. Triggers on: "转录", "transcribe", "语音转文字", "ASR", "识别音频", "把这段音频转成文字".

Archived SourceRecently Updated