Skip to content
Navigation

Create an agent

Creates an agent together with its version-1 draft. Authorization: organization administrators only — other callers are rejected with 403. Body: name (required, 1-200 chars); optional role, avatar, visibility (org | private), handle (lowercase/digits/hyphens; derived from the name and de-duplicated — a second "Mike" becomes mike-2 — when omitted) and a full draft version config. 409 handle_taken if an explicit handle is already used. Response 201: { data: { agent, draft, published } }.

POST
https://api.cloudraker.com/agents
Try it
Request body
Live API request

This request can change data or incur charges for the selected organization.

Authorization

  • bearerAuth
    HTTP
    required

Request body JSON required

  • name
    string
    required
    maxLength: 200 · minLength: 1
  • role
    optional
    string
    maxLength: 200
  • handle
    optional
    string

    Lowercase, digits and hyphens. Derived from name when omitted.

    maxLength: 32 · minLength: 2 · pattern: ^[a-z0-9][a-z0-9-]{0,30}[a-z0-9]$
  • avatar
    optional
    object
    • kind
      initials
      or
      generated
      required
    • color
      optional
      string
      pattern: ^#[0-9a-fA-F]{6}$
  • visibility
    optional
    org
    or
    private
  • draft
    optional
    object
    • documentAgent
      optional
      boolean

      Offer this published agent as a document reviewer. Requires file reading and document editing tools.

    • harness
      optional
      auto
      or
      native
      or
      sandbox

      Automatic execution keeps the agent loop in the platform and starts isolated compute only when a tool needs it. Default: auto. Legacy native and sandbox values remain accepted for existing integrations.

    • instructions
      optional
      string

      The standing instructions the agent runs under. A native version must also fit the engine ceiling (8000 chars) to publish.

      maxLength: 32768
    • model
      optional
      object
      • policy
        optional
        string
        maxLength: 64 · minLength: 1
      • maxSteps
        optional
        integer
        maximum: 100 · minimum: 1
      • budgetCredits
        optional
        integer
        maximum: 9007199254740991 · minimum: 1
    • memory
      optional
      object

      Saved memory the agent reads and updates across sessions. Private agents only: publishing an org agent with memory enabled answers 422 memory_requires_private. Default: on for sandbox, off otherwise.

      • enabled
        boolean
        required
    • skills
      optional
      array of
      string
      maxLength: 64 · minLength: 1
    • tools
      optional
      array of

      One of the following:

      • object
        • kind
          action
          required
        • installedActionId
          string
          required
          maxLength: 128 · minLength: 1
        • preApproval
          optional
          boolean
        • postApproval
          optional
          boolean
      • object
        • kind
          connector
          required
        • connectionId
          string
          required
          maxLength: 128 · minLength: 1
        • readOnlyTools
          optional
          array of
          string
          maxLength: 64 · minLength: 1
      • object
        • kind
          platform
          required
        • name
          files
          or
          artifacts
          or
          spaces
          or
          compose
          or
          sign
          or
          search
          +3 more
          required
      • object
        • kind
          sandbox
          required
        • name
          fs
          or
          shell
          or
          browser
          or
          code
          or
          net
          required
      • object
        • kind
          delegate
          required
      • object
        • kind
          ask_human
          required
    • spaces
      optional
      object
      • mode
        optional
        session
        or
        fixed
        or
        any
      • spaceIds
        optional
        array of
        string
        maxLength: 128 · minLength: 1
      • spaceTypes
        optional
        array of
        string
        pattern: ^[a-z][a-z0-9-]{0,38}[a-z0-9]$
    • network
      optional
      object
      • policyId
        optional
        string
        or null
        maxLength: 128
    • approvals
      optional
      object
      • defaultForWrite
        optional
        ask
        or
        allow
      • sensitive
        optional
        ask
      • approvers
        optional
        array of
        string
        maxLength: 128 · minLength: 1
    • delegation
      optional
      object
      • canInvite
        optional

        Any of the following:

        • array<string>
        • string
          any
          or
          none
    • tasks
      optional
      array of
      object
      • id
        string
        required
        maxLength: 64 · minLength: 1
      • title
        string
        required
        maxLength: 200 · minLength: 1
      • instructions
        optional
        string
        or null
        maxLength: 4000
      • dependsOn
        optional
        array of
        string
      • executor
        optional
        agent
        or
        human
      • assignee
        optional
        string
        or null
        maxLength: 128 · minLength: 1

Returns

201

The created agent and its draft.

JSON
  • data
    object
    required
    • agent
      object
      required
      • id
        string
        required
      • handle
        string
        required

        Unique per org, derived from the name when not given (mike, mike-2, …).

      • name
        string
        required
      • role
        string
        required
      • avatar
        object
        required
        • kind
          initials
          or
          generated
          required
        • color
          optional
          string
          pattern: ^#[0-9a-fA-F]{6}$
      • visibility
        org
        or
        private
        required
      • ownerUserId
        string
        required
      • publishedVersionId
        string | null
        required

        The agv_ id a run is started with. Null until the agent is published.

      • draftVersionId
        string
        required
      • emailTriggerId
        string | null
        required
      • sourcePlaybookId
        string | null
        required

        Set on agents created by the playbook migration; null otherwise.

      • createdAt
        string
        required
        format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
      • updatedAt
        string
        required
        format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
      • createdBy
        string
        required
      • archivedAt
        required

        Any of the following:

        • string
        • null
      • documentAgent
        optional
        boolean
    • draft
      object
      required
      • id
        string
        required
      • agentId
        string
        required
      • version
        integer
        required
        maximum: 9007199254740991 · minimum: -9007199254740991
      • publishedAt
        required

        Any of the following:

        • string
        • null
      • createdAt
        string
        required
        format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
      • updatedAt
        string
        required
        format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
      • createdBy
        string
        required
      • documentAgent
        optional
        boolean

        Offer this published agent as a document reviewer. Requires file reading and document editing tools.

      • harness
        optional
        auto
        or
        native
        or
        sandbox

        Automatic execution keeps the agent loop in the platform and starts isolated compute only when a tool needs it. Default: auto. Legacy native and sandbox values remain accepted for existing integrations.

      • instructions
        optional
        string

        The standing instructions the agent runs under. A native version must also fit the engine ceiling (8000 chars) to publish.

        maxLength: 32768
      • model
        optional
        object
        • policy
          optional
          string
          maxLength: 64 · minLength: 1
        • maxSteps
          optional
          integer
          maximum: 100 · minimum: 1
        • budgetCredits
          optional
          integer
          maximum: 9007199254740991 · minimum: 1
      • memory
        optional
        object

        Saved memory the agent reads and updates across sessions. Private agents only: publishing an org agent with memory enabled answers 422 memory_requires_private. Default: on for sandbox, off otherwise.

        • enabled
          boolean
          required
      • skills
        optional
        array of
        string
        maxLength: 64 · minLength: 1
      • tools
        optional
        array of
        ToolGrant

        One of the following:

        • object
          • kind
            string
            required
          • installedActionId
            string
            required
            maxLength: 128 · minLength: 1
          • preApproval
            optional
            boolean
          • postApproval
            optional
            boolean
        • object
          • kind
            string
            required
          • connectionId
            string
            required
            maxLength: 128 · minLength: 1
          • readOnlyTools
            optional
            array of
            string
            maxLength: 64 · minLength: 1
        • object
          • kind
            string
            required
          • name
            files
            or
            artifacts
            or
            spaces
            or
            compose
            or
            sign
            or
            search
            +3 more
            required
        • object
          • kind
            string
            required
          • name
            fs
            or
            shell
            or
            browser
            or
            code
            or
            net
            required
        • object
          • kind
            string
            required
        • object
          • kind
            string
            required
      • spaces
        optional
        object
        • mode
          optional
          session
          or
          fixed
          or
          any
        • spaceIds
          optional
          array of
          string
          maxLength: 128 · minLength: 1
        • spaceTypes
          optional
          array of
          string
          pattern: ^[a-z][a-z0-9-]{0,38}[a-z0-9]$
      • network
        optional
        object
        • policyId
          optional

          Any of the following:

          • string
          • null
      • approvals
        optional
        object
        • defaultForWrite
          optional
          ask
          or
          allow
        • sensitive
          optional
          string
        • approvers
          optional
          array of
          string
          maxLength: 128 · minLength: 1
      • delegation
        optional
        object
        • canInvite
          optional

          Any of the following:

          • array<string>
          • string
            any
            or
            none
      • tasks
        optional
        array of
        object
        • id
          string
          required
          maxLength: 64 · minLength: 1
        • title
          string
          required
          maxLength: 200 · minLength: 1
        • instructions
          optional

          Any of the following:

          • string
          • null
        • dependsOn
          optional
          array of
          string
        • executor
          optional
          agent
          or
          human
        • assignee
          optional

          Any of the following:

          • string
          • null
    • published
      required

      Any of the following:

      • AgentVersion
        • id
          string
          required
        • agentId
          string
          required
        • version
          integer
          required
          maximum: 9007199254740991 · minimum: -9007199254740991
        • publishedAt
          required

          Any of the following:

          • string
          • null
        • createdAt
          string
          required
          format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
        • updatedAt
          string
          required
          format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
        • createdBy
          string
          required
        • documentAgent
          optional
          boolean

          Offer this published agent as a document reviewer. Requires file reading and document editing tools.

        • harness
          optional
          auto
          or
          native
          or
          sandbox

          Automatic execution keeps the agent loop in the platform and starts isolated compute only when a tool needs it. Default: auto. Legacy native and sandbox values remain accepted for existing integrations.

        • instructions
          optional
          string

          The standing instructions the agent runs under. A native version must also fit the engine ceiling (8000 chars) to publish.

          maxLength: 32768
        • model
          optional
          object
          • policy
            optional
            string
            maxLength: 64 · minLength: 1
          • maxSteps
            optional
            integer
            maximum: 100 · minimum: 1
          • budgetCredits
            optional
            integer
            maximum: 9007199254740991 · minimum: 1
        • memory
          optional
          object

          Saved memory the agent reads and updates across sessions. Private agents only: publishing an org agent with memory enabled answers 422 memory_requires_private. Default: on for sandbox, off otherwise.

          • enabled
            boolean
            required
        • skills
          optional
          array of
          string
          maxLength: 64 · minLength: 1
        • tools
          optional
          array of
          ToolGrant

          One of the following:

          • object
            • kind
              string
              required
            • installedActionId
              string
              required
              maxLength: 128 · minLength: 1
            • preApproval
              optional
              boolean
            • postApproval
              optional
              boolean
          • object
            • kind
              string
              required
            • connectionId
              string
              required
              maxLength: 128 · minLength: 1
            • readOnlyTools
              optional
              array of
              string
              maxLength: 64 · minLength: 1
          • object
            • kind
              string
              required
            • name
              files
              or
              artifacts
              or
              spaces
              or
              compose
              or
              sign
              or
              search
              +3 more
              required
          • object
            • kind
              string
              required
            • name
              fs
              or
              shell
              or
              browser
              or
              code
              or
              net
              required
          • object
            • kind
              string
              required
          • object
            • kind
              string
              required
        • spaces
          optional
          object
          • mode
            optional
            session
            or
            fixed
            or
            any
          • spaceIds
            optional
            array of
            string
            maxLength: 128 · minLength: 1
          • spaceTypes
            optional
            array of
            string
            pattern: ^[a-z][a-z0-9-]{0,38}[a-z0-9]$
        • network
          optional
          object
          • policyId
            optional

            Any of the following:

            • string
            • null
        • approvals
          optional
          object
          • defaultForWrite
            optional
            ask
            or
            allow
          • sensitive
            optional
            string
          • approvers
            optional
            array of
            string
            maxLength: 128 · minLength: 1
        • delegation
          optional
          object
          • canInvite
            optional

            Any of the following:

            • array<string>
            • string
              any
              or
              none
        • tasks
          optional
          array of
          object
          • id
            string
            required
            maxLength: 64 · minLength: 1
          • title
            string
            required
            maxLength: 200 · minLength: 1
          • instructions
            optional

            Any of the following:

            • string
            • null
          • dependsOn
            optional
            array of
            string
          • executor
            optional
            agent
            or
            human
          • assignee
            optional

            Any of the following:

            • string
            • null
      • null

409

handle_taken — the requested handle is already used in this org.

Type to search…

↑↓ navigate↵ selectEsc close