The world’s first unified interface for agent harnessesOpen Source4.4kPowered by UHP

API reference

Branch from an earlier turn and leave the original as it was.

Try another direction from any earlier response; the branch is a new line of work and the original session does not change.

Request

Branch from an earlier turn
POST /{harness_id}/v1/responses
Content-Type: application/json

{
  "input": "Try the same analysis with last year's numbers instead.",
  "previous_response_id": "<an earlier response id>",
  "branch": true,
  "stream": true
}

How it works

  • The branch starts from the turn you name and continues from there. Later turns on the original are not part of it.
  • The original session is left alone, so both lines of work stay open.
  • You can branch only from a response that has ended. One with no restorable checkpoint answers 409 with branch_unavailable.
  • branch without previous_response_id answers 400.

Ready to run this against a live workspace?Create API key