Resource: Session
A session is a contiguous amount of work within the same context.
JSON representation |
---|
{ "name": string, "id": string, "prompt": string, "sourceContext": { object ( |
Fields | |
---|---|
name |
Output only. Identifier. The full resource name (e.g., "sessions/{session}"). |
id |
Output only. The id of the session. This is the same as the "{session}" part of the resource name (e.g., "sessions/{session}"). |
prompt |
Required. The prompt to start the session with. |
sourceContext |
Required. The source to use in this session, with additional context. |
title |
Optional. If not provided, the system will generate one. |
requirePlanApproval |
Optional. Input only. If true, plans the agent generates will require explicit plan approval before the agent starts working. If not set, plans will be auto-approved. |
createTime |
Output only. The time the session was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
updateTime |
Output only. The time the session was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
state |
Output only. The state of the session. |
url |
Output only. The URL of the session to view the session in the Jules web app. |
outputs[] |
Output only. The outputs of the session, if any. |
SourceContext
Context for how to use a source in a session.
JSON representation |
---|
{ "source": string, // Union field |
Fields | |
---|---|
source |
Required. The name of the source this context is for. To get the list of sources, use the ListSources API. Format: sources/{source} |
Union field context . The context for how to use the source in a session. context can be only one of the following: |
|
githubRepoContext |
Context to use a GitHubRepo in a session. |
GitHubRepoContext
Context to use a GitHubRepo in a session.
JSON representation |
---|
{ "startingBranch": string } |
Fields | |
---|---|
startingBranch |
Required. The name of the branch to start the session from. |
State
State of a session.
Enums | |
---|---|
STATE_UNSPECIFIED |
The state is unspecified. |
QUEUED |
The session is queued. |
PLANNING |
The agent is planning. |
AWAITING_PLAN_APPROVAL |
The agent is waiting for plan approval. |
AWAITING_USER_FEEDBACK |
The agent is waiting for user feedback. |
IN_PROGRESS |
The session is in progress. |
PAUSED |
The session is paused. |
FAILED |
The session has failed. |
COMPLETED |
The session has completed. |
SessionOutput
An output of a session.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field output . An output of the session. output can be only one of the following: |
|
pullRequest |
A pull request created by the session, if applicable. |
PullRequest
A pull request.
JSON representation |
---|
{ "url": string, "title": string, "description": string } |
Fields | |
---|---|
url |
The URL of the pull request. |
title |
The title of the pull request. |
description |
The description of the pull request. |
Methods |
|
---|---|
|
Approves a plan in a session. |
|
Creates a new session. |
|
Gets a single session. |
|
Lists all sessions. |
|
Sends a message from the user to a session. |