Skip to content

Types Reference

This page documents all data types used in the Jules REST API.

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.

sourceContext required SourceContext

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.

Enum representing the current state of a session:

ValueDescription
STATE_UNSPECIFIEDState is unspecified
QUEUEDSession is waiting to be processed
PLANNINGJules is creating a plan
AWAITING_PLAN_APPROVALPlan is ready for user approval
AWAITING_USER_FEEDBACKJules needs user input
IN_PROGRESSJules is actively working
PAUSEDSession is paused
FAILEDSession failed
COMPLETEDSession completed successfully

Enum for session automation settings:

ValueDescription
AUTOMATION_MODE_UNSPECIFIEDNo automation (default)
AUTO_CREATE_PRAutomatically create a pull request when code changes are ready

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.


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

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.


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

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

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

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.


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

A GitHub branch.

displayName string

The branch name.

GitHubRepoContext

Context for using a GitHub repo in a session.

startingBranch required string

The branch to start the session from.


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.


SessionOutput

An output of a session.

pullRequest PullRequest

A pull request created by the session.

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.


PlanGenerated

A plan was generated.

plan Plan

The generated plan.

PlanApproved

A plan was approved.

planId string

The ID of the approved plan.

UserMessaged

The user posted a message.

userMessage string

The message content.

AgentMessaged

Jules posted a message.

agentMessage string

The message content.

ProgressUpdated

A progress update occurred.

title string

The title of the update.

description string

Details about the progress.

SessionCompleted

The session completed successfully.

No additional properties.

SessionFailed

The session failed.

reason string

The reason for the failure.


SendMessageRequest

Request to send a message to a session.

prompt required string

The message to send.

SendMessageResponse

Response from sending a message.

Empty response on success.

ApprovePlanRequest

Request to approve a plan.

Empty request body.

ApprovePlanResponse

Response from approving a plan.

Empty response on success.

ListSessionsResponse

Response from listing sessions.

sessions Session []

The list of sessions.

nextPageToken string

Token for the next page of results.

ListActivitiesResponse

Response from listing activities.

activities Activity []

The list of activities.

nextPageToken string

Token for the next page of results.

ListSourcesResponse

Response from listing sources.

sources Source []

The list of sources.

nextPageToken string

Token for the next page of results.