Skip to content

create_pr

Create draft pull requests for one or more repositories in a Polygraph session.

Each PR is created as a draft and includes session metadata linking it to related PRs across repos. Branches must be pushed first with push_branch. Optionally saves a user-facing description to the session timeline and records the agent session ID for later resumption.

NameTypeRequiredDescription
sessionIdstringyesThe Polygraph session ID.
prsarrayyesArray of PR specifications to create. Each item: owner (GitHub repo owner), repo (GitHub repo name), title (PR title), body (PR description; session metadata appended automatically), branch (pushed branch name), baseBranch (optional target base branch).
descriptionstringnoUser-facing Polygraph session description text. The CLI saves it to the session description timeline.
agentSessionIdstringnoThe AI agent session ID. Can be used to resume the session later.