Skip to content

Launch an agent session acting as the caller

Mints a sandbox credential for the caller named after the session (cloud-<n>), records the session, and starts it with the prompt on the branch named: made off main when it is new, used as it is when it exists. Pando never invents a name: without branch, 400 branch_required. repo may be left out in a plain repository. A session that cannot start is answered failed with its reason, and its credential is revoked.

POST
https://app.gitpando.com/v1/monorepos/{owner}/{monorepo}/agents

Authorisation

  • credentialoptionalHTTP
  • sessionoptionalAPI key in cookie

Path parameters

  • ownerstringrequired

    The monorepo's owner, a namespace (a person's login or an organization). Matched without case.

    pattern: ^[a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){0,38}$
  • monorepostringrequired

    The monorepo's name within its owner (or an old name). Matched without case.

    pattern: ^[a-z0-9](?:[a-z0-9._]|-(?!-)){0,38}$

Request bodyJSONrequired

  • promptstringrequired
    maxLength: 65536
  • branchstringrequired

    The branch's name, named for the change.

  • repooptionalstring
  • modeloptionalstring
    Default: "@cf/zai-org/glm-5.3-flash"

Returns

201

Launched

JSON
  • numberintegerrequired
  • kindtaskorissueorrevieworchatrequired
  • statusworkingorwaitingorfailedorstoppedrequired
  • reasonstring | nullrequired
  • repostring | nullrequired

    The project it works in; null for an assistant's chat about the whole repository until it starts a branch in one.

  • branchstring | nullrequired

    Named by a person or from its issue; null for an assistant's chat until the person names one.

  • programstringrequired

    pi

  • modelstringrequired
  • issueinteger | nullrequired
  • launched_bystringrequired
  • machinestringrequired

    The session's credential, cloud-.

  • workspacemountorcloneornullrequired
  • awaiting_checksbooleanrequired

    Its merge waits for required checks still running; Pando tells it when they are green.

  • first_messagestring | nullrequired

    An assistant's chat: its first message, cut at 200 characters; null for other kinds.

  • created_atstringrequired
    format: date-time
  • updated_atstringrequired
    format: date-time
  • branch_factsoptionalobject | null

    In a list only. Its branch now (state, ahead, merged_at, checks); null while the branch is not made yet.

400

An error

JSON
  • errorobjectrequired
    6 properties
    • codestringrequired
    • messagestringrequired
    • pathsoptionalarray ofstring
    • checksoptionalobject

      GitHub's combined status, plus the required contexts and which are missing.

      6 properties
      • shastring | nullrequired
      • statesuccessorpendingorfailureorerrorormissingorunknownrequired

        success when the merge gate passes; missing when a required context has not reported; unknown while the required checks are (an unforced merge is refused).

      • requiredarray | nullrequired

        Null while unknown.

      • checks_unknownstring | nullrequired

        Why the required checks are unknown, in plain words: "Pando couldn't read this monorepo's required checks; try again", or "pando.toml line 3: expected comma or end of structure; fix it on main, or merge with force". Null otherwise.

      • statusesarray ofobjectrequired

        The latest status per context.

        8 properties
        • shastringrequired
        • contextstringrequired
        • statependingorsuccessorfailureorerrororsupersededrequired

          GitHub's four, and superseded: written by Pando when a newer push cancelled the build reporting the check. A superseded check counts as not reported.

        • created_atstringrequired
          format: date-time
        • target_urloptionalstring | null
        • descriptionoptionalstring | null
        • creatoroptionalstring

          The member who posted it (a login); app:<slug> for a status posted with a status token or by a CI integration; hook:<hook id> for a status token from a web hook with no app.

        • appoptionalstring | null

          The CI service that reported it (buildkite, github-actions, ...), stamped by Pando from a status token or a CI integration, never from the body or target_url. Null when a member posted it with their own credential. The web shows the service's mark for a slug it knows.

      • missingoptionalarray ofstring
    • checks_startedoptionalboolean

      A refused merge started the branch's checks (the project's ci_policy is on_merge).

    • reviewoptionalobject

      412 review_required and risk_pending: the head's risk-based review (Branch.review's shape).

503

An error

JSON
  • errorobjectrequired
    6 properties
    • codestringrequired
    • messagestringrequired
    • pathsoptionalarray ofstring
    • checksoptionalobject

      GitHub's combined status, plus the required contexts and which are missing.

      6 properties
      • shastring | nullrequired
      • statesuccessorpendingorfailureorerrorormissingorunknownrequired

        success when the merge gate passes; missing when a required context has not reported; unknown while the required checks are (an unforced merge is refused).

      • requiredarray | nullrequired

        Null while unknown.

      • checks_unknownstring | nullrequired

        Why the required checks are unknown, in plain words: "Pando couldn't read this monorepo's required checks; try again", or "pando.toml line 3: expected comma or end of structure; fix it on main, or merge with force". Null otherwise.

      • statusesarray ofobjectrequired

        The latest status per context.

        8 properties
        • shastringrequired
        • contextstringrequired
        • statependingorsuccessorfailureorerrororsupersededrequired

          GitHub's four, and superseded: written by Pando when a newer push cancelled the build reporting the check. A superseded check counts as not reported.

        • created_atstringrequired
          format: date-time
        • target_urloptionalstring | null
        • descriptionoptionalstring | null
        • creatoroptionalstring

          The member who posted it (a login); app:<slug> for a status posted with a status token or by a CI integration; hook:<hook id> for a status token from a web hook with no app.

        • appoptionalstring | null

          The CI service that reported it (buildkite, github-actions, ...), stamped by Pando from a status token or a CI integration, never from the body or target_url. Null when a member posted it with their own credential. The web shows the service's mark for a slug it knows.

      • missingoptionalarray ofstring
    • checks_startedoptionalboolean

      A refused merge started the branch's checks (the project's ci_policy is on_merge).

    • reviewoptionalobject

      412 review_required and risk_pending: the head's risk-based review (Branch.review's shape).

Navigation

Type to search…

↑↓ navigate↵ selectEsc close