Skip to main content
POST
Merge Agent Branch

Overview

Lands the branch on dev as a fast-forward: the branch’s newest version becomes one new dev version, and the branch is closed. A fast-forward is only possible while the branch’s base is still dev’s newest version. If dev has moved, the request returns 409 BRANCH_BEHIND; run Preview Agent Branch Rebase and Rebase Agent Branch, then merge again. Takes no body. Requires an admin, owner, operator, or prompter role.

Headers

string
required
Your API key for authentication.

Path Parameters

string
required
The agent’s unique identifier.
string
required
The branch’s unique identifier. Must be an open branch on this agent, and must have at least one version saved to it; a branch with no saves of its own returns 400 NO_CHANGES.

Response

object
The new dev version. Its snapshot is the branch head’s configuration. The branch no longer appears in List Agent Branches.
null | array
null on success, or a list of error objects if the request failed.

Docs for agents: llms.txt