Create Jules Session
jules_create_sessionCreate a new session for Jules AI to execute a coding task on your repository. Provide a task prompt and repository source to start the session.
Instructions
Create a new coding session with Jules AI coding agent.
A session represents a unit of work where Jules executes a coding task on your repository.
Args:
prompt (string, required): The task description for Jules to execute
title (string, optional): Title for the session
sourceContext (object, required): Repository context with:
source (string): Resource name like 'sources/github-owner-repo'
githubRepoContext (object, optional): { startingBranch: string }
requirePlanApproval (boolean, optional): If true, plans need approval
automationMode (string, optional): 'AUTO_CREATE_PR' to auto-create PRs
response_format ('markdown' | 'json'): Output format
Returns: The created session with ID, state, and URL.
Examples:
"Add unit tests for auth module" with source "sources/github-myorg-myrepo"
Set requirePlanApproval=true to review plans before execution
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Optional title for the session | |
| prompt | Yes | The task description for Jules to execute | |
| sourceContext | Yes | The source repository and branch context | |
| automationMode | No | Automation mode: 'AUTO_CREATE_PR' to auto-create PRs when ready | |
| response_format | No | Output format: 'markdown' for human-readable or 'json' for structured data | markdown |
| requirePlanApproval | No | If true, plans require explicit approval before execution |