Types Reference
This page documents all data types used in the Jules REST API.
Core Resources
Section titled “Core Resources”Session
Section titled “Session”A session represents a unit of work where Jules executes a coding task.
Session
A session is a contiguous amount of work within the same context.
name string Output only. The full resource name (e.g., 'sessions/{session}').
id string Output only. The session ID.
prompt required string The task description for Jules to execute.
title string Optional title. If not provided, the system generates one.
state SessionState Output only. Current state of the session.
url string Output only. URL to view the session in the Jules web app.
The source repository and branch context.
requirePlanApproval boolean Input only. If true, plans require explicit approval.
automationMode AutomationMode Input only. Automation mode for the session.
outputs SessionOutput [] Output only. Results of the session (e.g., pull requests).
createTime string (google-datetime) Output only. When the session was created.
updateTime string (google-datetime) Output only. When the session was last updated.
SessionState
Section titled “SessionState”Enum representing the current state of a session:
| Value | Description |
|---|---|
STATE_UNSPECIFIED | State is unspecified |
QUEUED | Session is waiting to be processed |
PLANNING | Jules is creating a plan |
AWAITING_PLAN_APPROVAL | Plan is ready for user approval |
AWAITING_USER_FEEDBACK | Jules needs user input |
IN_PROGRESS | Jules is actively working |
PAUSED | Session is paused |
FAILED | Session failed |
COMPLETED | Session completed successfully |
AutomationMode
Section titled “AutomationMode”Enum for session automation settings:
| Value | Description |
|---|---|
AUTOMATION_MODE_UNSPECIFIED | No automation (default) |
AUTO_CREATE_PR | Automatically create a pull request when code changes are ready |
Activity
Section titled “Activity”An activity represents a single event within a session.
Activity
An activity is a single unit of work within a session.
name string The full resource name (e.g., 'sessions/{session}/activities/{activity}').
id string Output only. The activity ID.
originator string The entity that created this activity ('user', 'agent', or 'system').
description string Output only. A description of this activity.
createTime string (google-datetime) Output only. When the activity was created.
artifacts Artifact [] Output only. Artifacts produced by this activity.
planGenerated PlanGenerated A plan was generated.
planApproved PlanApproved A plan was approved.
userMessaged UserMessaged The user posted a message.
agentMessaged AgentMessaged Jules posted a message.
progressUpdated ProgressUpdated A progress update occurred.
sessionCompleted SessionCompleted The session completed.
sessionFailed SessionFailed The session failed.
Source
Section titled “Source”A source represents a connected repository.
Source
An input source of data for a session.
name string The full resource name (e.g., 'sources/{source}').
id string Output only. The source ID.
githubRepo GitHubRepo GitHub repository details.
Plan
A sequence of steps that Jules will take to complete the task.
id string Output only. Unique ID for this plan within a session.
steps PlanStep [] Output only. The steps in the plan.
createTime string (google-datetime) Output only. When the plan was created.
PlanStep
Section titled “PlanStep”PlanStep
A single step in a plan.
id string Output only. Unique ID for this step within a plan.
index integer (int32) Output only. 0-based index in the plan.
title string Output only. The title of the step.
description string Output only. Detailed description of the step.
Artifacts
Section titled “Artifacts”Artifact
Section titled “Artifact”Artifact
A single unit of data produced by an activity.
changeSet ChangeSet Code changes produced.
bashOutput BashOutput Command output produced.
media Media Media file produced (e.g., image, video).
ChangeSet
Section titled “ChangeSet”ChangeSet
A set of changes to be applied to a source.
source string The source this change set applies to. Format: sources/{source}
gitPatch GitPatch The patch in Git format.
GitPatch
Section titled “GitPatch”GitPatch
A patch in Git format.
baseCommitId string The commit ID the patch should be applied to.
unidiffPatch string The patch in unified diff format.
suggestedCommitMessage string A suggested commit message for the patch.
BashOutput
Section titled “BashOutput”BashOutput
Output from a bash command.
command string The bash command that was executed.
output string Combined stdout and stderr output.
exitCode integer (int32) The exit code of the command.
Media
A media file output.
mimeType string The MIME type of the media (e.g., 'image/png').
data string (byte) Base64-encoded media data.
GitHub Types
Section titled “GitHub Types”GitHubRepo
Section titled “GitHubRepo”GitHubRepo
A GitHub repository.
owner string The repository owner (user or organization).
repo string The repository name.
isPrivate boolean Whether the repository is private.
defaultBranch GitHubBranch The default branch.
branches GitHubBranch [] List of active branches.
GitHubBranch
Section titled “GitHubBranch”GitHubBranch
A GitHub branch.
displayName string The branch name.
GitHubRepoContext
Section titled “GitHubRepoContext”GitHubRepoContext
Context for using a GitHub repo in a session.
startingBranch required string The branch to start the session from.
Context Types
Section titled “Context Types”SourceContext
Section titled “SourceContext”SourceContext
Context for how to use a source in a session.
source required string The source resource name. Format: sources/{source}
githubRepoContext GitHubRepoContext Context for GitHub repositories.
Output Types
Section titled “Output Types”SessionOutput
Section titled “SessionOutput”SessionOutput
An output of a session.
pullRequest PullRequest A pull request created by the session.
PullRequest
Section titled “PullRequest”PullRequest
A pull request.
url string The URL of the pull request.
title string The title of the pull request.
description string The description of the pull request.
Activity Event Types
Section titled “Activity Event Types”PlanGenerated
Section titled “PlanGenerated”PlanApproved
Section titled “PlanApproved”PlanApproved
A plan was approved.
planId string The ID of the approved plan.
UserMessaged
Section titled “UserMessaged”UserMessaged
The user posted a message.
userMessage string The message content.
AgentMessaged
Section titled “AgentMessaged”AgentMessaged
Jules posted a message.
agentMessage string The message content.
ProgressUpdated
Section titled “ProgressUpdated”ProgressUpdated
A progress update occurred.
title string The title of the update.
description string Details about the progress.
SessionCompleted
Section titled “SessionCompleted”SessionCompleted
The session completed successfully.
No additional properties.
SessionFailed
Section titled “SessionFailed”SessionFailed
The session failed.
reason string The reason for the failure.
Request/Response Types
Section titled “Request/Response Types”SendMessageRequest
Section titled “SendMessageRequest”SendMessageRequest
Request to send a message to a session.
prompt required string The message to send.
SendMessageResponse
Section titled “SendMessageResponse”SendMessageResponse
Response from sending a message.
Empty response on success.
ApprovePlanRequest
Section titled “ApprovePlanRequest”ApprovePlanRequest
Request to approve a plan.
Empty request body.
ApprovePlanResponse
Section titled “ApprovePlanResponse”ApprovePlanResponse
Response from approving a plan.
Empty response on success.
ListSessionsResponse
Section titled “ListSessionsResponse”ListSessionsResponse
Response from listing sessions.
sessions Session [] The list of sessions.
nextPageToken string Token for the next page of results.
ListActivitiesResponse
Section titled “ListActivitiesResponse”ListActivitiesResponse
Response from listing activities.
activities Activity [] The list of activities.
nextPageToken string Token for the next page of results.
ListSourcesResponse
Section titled “ListSourcesResponse”ListSourcesResponse
Response from listing sources.
sources Source [] The list of sources.
nextPageToken string Token for the next page of results.