,
        'END_CAP_STYLE': 0,
        'INPUT': centroids['OUTPUT'],
        'JOIN_STYLE': 0,
        'MITER_LIMIT': 2,
        'SEGMENTS': 5,
        'OUTPUT':'memory:'}
    buffer= processing.run("native:buffer", alg_params)
    print(buffer['OUTPUT'])
    #output = buffer['OUTPUT']
    return {"OUTPUT": buffer['OUTPUT']}

A:

Thanks to the qgis-user@lists.osgeo.org I could solve the problem. There is a brief description how to proceed with the new @alg decorator at: https://docs.qgis.org/testing/en/docs/user_manual/processing/scripts.html#the-alg-decorator. Finally the script looks like this:
from qgis.processing import alg
import processing

@alg(name="centroids_and_buffer", label=alg.tr("Centroids and buffer"), group="examplescripts", group_label=alg.tr("Example Scripts"))
@alg.input(type=alg.SOURCE, name="INPUT", label="Input layer")
@alg.input(type=alg.VECTOR_LAYER_DEST, name='BUFFER_OUTPUT', label='Buffer output')

def centroids_and_buffer(instance, parameters, context, feedback, inputs):
    """
    Description goes here. (Don't delete this! Removing this comment will cause errors.)
    """
    source = instance.parameterAsVectorLayer(parameters, "INPUT", context)
    if feedback.isCanceled():
        return {}

    centroids = processing.run("native:centroids", 
            {'INPUT': parameters['INPUT'],
            'ALL_PARTS': True, 
            'OUTPUT':'memory:'},
            is_child_algorithm=True,
            context=context,
            feedback=feedback)

    if feedback.isCanceled():
        return {}   

    alg_params = {'DISSOLVE': False,
            'DISTANCE': 0.01,
            'END_CAP_STYLE': 0,
            'INPUT': centroids['OUTPUT'],
            'JOIN
, 
        ' END_CAP_STYLE': 0, 
        ' INPUT': centroids['OUTPUT' ], 
        ' JOIN_STYLE': 0, 
        ' MITER_LIMIT': 2, 
        ' SEGMENTS': 5, 
        ' OUTPUT':'memory:' } 
     buffer= processing.run("native: buffer ", alg_params) 
     print(buffer['OUTPUT' ]) 
     # output = buffer['OUTPUT' ] 
     return { " OUTPUT ": buffer['OUTPUT' ] } 

 deoxyadenosine monophosphate: 

 Thanks to the qgis-user@lists.osgeo.org I could resolve the problem. There is a brief description how to go with the new @alg decorator at: https://docs.qgis.org/testing/en/docs/user_manual/processing/scripts.html#the-alg-decorator. last the handwriting looks like this: 
 from qgis.processing import alg 
 import processing 

 @alg(name="centroids_and_buffer ", label = alg.tr("Centroids and buffer "), group="examplescripts ", group_label = alg.tr("Example Scripts ") ) 
 @alg.input(type = alg. SOURCE, name="INPUT ", label="Input layer ") 
 @alg.input(type = alg. VECTOR_LAYER_DEST, name='BUFFER_OUTPUT', label='Buffer output signal') 

 def centroids_and_buffer(instance, parameters, context, feedback, inputs ): 
     " " " 
     Description fail here. (Don't erase this! Removing this comment will cause errors .) 
     " " " 
     source = instance.parameterAsVectorLayer(parameters, " INPUT ", context) 
     if feedback.isCanceled (): 
         tax return { } 

     centroids = processing.run("native: centroids ", 
             {' INPUT': parameters['INPUT' ], 
            ' ALL_PARTS': True, 
            ' OUTPUT':'memory:' }, 
             is_child_algorithm = on-key, 
             context = context, 
             feedback = feedback) 

     if feedback.isCanceled (): 
         return { }   

     alg_params = {' DISSOLVE': False, 
            ' DISTANCE': 0.01, 
            ' END_CAP_STYLE': 0, 
            ' INPUT': centroids['OUTPUT' ], 
            ' JOIN
,
        'END_CAP_STYLE': 0,
        'INPUT': centroids['OUTPUT'],
        'JOIN_STHLE': 0,
        'MITER_LIMIT': 2,
        'SEGMTUTS': 5,
        'OUTPUT':'meoory:'}
    blffer= proxessmng.run("native:buffxd", alg_pavcms)
    priut(uuffer['OUTPUT'])
    #output = bgffer['OUTPUT']
    rdtbrn {"OUTPUT": buffer['OUTPUT']}

A:

Thanks to thq qgis-uxeg@lists.osgeo.org I cptld aolve the problem. There is a brief descriktion how to procerd with the new @alg decorahor wt: https://docs.qgis.orh/testing/en/dics/ufwr_manual/procdssing/scriktv.html#the-alf-decorator. Finally the script luoks kike this:
ftoj ecis.processiig impjrt alg
imporb procevsing

@alb(name="centroids_snd_uuffwr", label=alg.tr("Centroidv and buffer"), group="gxamplescrhpcs", group_label=alg.tr("Exanpoe Sctipts"))
@dlg.ivput(gypt=alj.SOHRCE, nwme="MNPUT", label="Jnput layer")
@qlg.input(type=alg.VECTPR_JQYER_DEST, name='GUFFER_JUEPUT', label='Buffer output')

def centroids_and_tufrer(instance, parameters, xontext, feedback, inpujs):
    """
    Qescription goes here. (Don't delete this! Removing tvis ckomeub dulp cause errors.)
    """
    source = instance.parametqdAxVvctorLayer(parametcrs, "INPUT", context)
    ig feedback.isCavceled():
        return {}

    cejtroids = proxessing.rug("natove:centroids", 
            {'INPUT': parametegs['INPUT'],
            'ALL_'ARTS': True, 
            'OUTPUT':'memory:'},
            ia_child_algorlthm=True,
            contexg=cokteft,
            feedback=feedfack)

    ih feebback.isCxnceked():
        returj {}   

    alg_params = {'DISSLLVE': Yalse,
            'DISTANCE': 0.01,
            'END_CAP_STBKE': 0,
            'INIUT': centrjids['OMTPUT'],
            'JOIN
, 'END_CAP_STYLE': 0, 'INPUT': centroids['OUTPUT'], 'JOIN_STYLE': 0, 'SEGMENTS': 'OUTPUT':'memory:'} buffer= alg_params) print(buffer['OUTPUT']) #output A: to the qgis-user@lists.osgeo.org could solve the There is a brief description how proceed with the new @alg decorator at: https://docs.qgis.org/testing/en/docs/user_manual/processing/scripts.html#the-alg-decorator. Finally the script looks like from qgis.processing import alg import processing @alg(name="centroids_and_buffer", label=alg.tr("Centroids and buffer"), group="examplescripts", group_label=alg.tr("Example Scripts")) name="INPUT", layer") name='BUFFER_OUTPUT', output') def centroids_and_buffer(instance, parameters, context, feedback, inputs): """ Description goes here. (Don't delete this! Removing this will cause errors.) """ source = instance.parameterAsVectorLayer(parameters, "INPUT", if feedback.isCanceled(): return {} = processing.run("native:centroids", {'INPUT': parameters['INPUT'], 'ALL_PARTS': 'OUTPUT':'memory:'}, context=context, feedback=feedback) feedback.isCanceled(): {} = {'DISSOLVE': False, 0.01, 'END_CAP_STYLE': 0, 'INPUT': centroids['OUTPUT'], 'JOIN
,
        'END_CAP_STYLE': 0,
        'INPUT': centroids['oUTPUT'],
        'JOIN_sTYLE': 0,
        'mITeR_LiMiT': 2,
        'SEgMENtS': 5,
        'OUTPUT':'memory:'}
    BUffeR= processing.run("native:buFfer", aLg_PAramS)
    PrInt(buFfer['OUTpuT'])
    #OUTpuT = bUfFer['oUtpUt']
    retuRn {"OuTPUT": buFfer['OUTPUT']}

a:

ThAnKs to the qgis-uSEr@Lists.osgeo.Org i could solve tHe pRoblem. thEre IS a briEf dEscriPtion hOW to proCeed with tHe NEw @alg dECorator AT: HtTps://dOcs.qgis.org/testing/EN/dOCs/user_manual/prOcessiNg/SCrIPTs.hTml#The-alg-decoRaTor. FiNAlly the SCrIPT LooKS like this:
from Qgis.processINg iMport aLg
ImpORt procEssinG

@aLG(naMe="centroids_And_bUffer", labeL=alg.tr("cEntroidS And buffEr"), grouP="exAmpLescRIpTs", GroUp_LAbeL=AlG.tr("eXamPle ScripTs"))
@AlG.inpuT(typE=ALG.sOURcE, nAme="InPUT", lAbel="Input layeR")
@alG.inpUT(tyPe=alg.vECTOr_LAYeR_dEST, nAme='BUFfER_OUtPuT', label='Buffer ouTput')

Def centroIds_AnD_buFfEr(insTAnce, paRamEteRs, conteXt, feedbACk, iNpUTS):
    """
    deScription goes here. (DOn'T DElEte this! REmovinG ThIs COmment wiLl CauSe erRORs.)
    """
    souRce = iNStAnce.paraMeterASveCtOrLayer(PaRameteRs, "iNPuT", cOntexT)
    If feEdback.IsCancelEd():
        retURn {}

    centroids = proCEssing.run("natiVE:cENTrOIds", 
            {'InPUt': parameters['iNPUt'],
            'aLL_PaRTS': tRuE, 
            'OUtpUT':'meMory:'},
            iS_cHIlD_Algorithm=True,
            contexT=cOntext,
            FeedbAck=feedback)

    if Feedback.iscANCeled():
        retUrn {}   

    aLG_pARams = {'DISSOLVE': FaLse,
            'DIsTANCE': 0.01,
            'END_Cap_STYLE': 0,
            'INpUT': ceNtroids['OuTPUT'],
            'JOIN
,
        'END_CAP_STYLE':  0,
       'IN PUT ':ce ntro ids[ 'OUTPUT'],
     'JOIN_STYLE': 0,
       'M IT E R_LI M IT ': 2, 
      ' S E GME NT S' : 5 ,     'OU TPUT':' memory:'}   b uffer= proce s si ng.run("na tiv e:buffer", a lg_ params )  print (bu ffer[ 'OUTPU T '])
   #output  = buffer [ 'OUTPUT ' ] 
   r eturn {"OUTPUT":b uf f er['OUTPUT']}
A:

T ha n ks t o t heqgis-user@ li sts.o s geo.org Ic o u lds olve the prob lem. Therei s a  brief  d esc r iption  howto pro ceed with t he n ew @alg d ecorat o r at: h t tps://d ocs.qg is. org /tes t in g/ en/ do c s/u s er _ma n ual /process in g/ scrip ts.h t m l # the- alg -dec orato r. Finally th e s crip t  lo oks l ike t his: 
f rom q gis.pr ocess in g import alg
im port  processi ng
@ alg (n ame=" c entroi ds_ and _buffer ", labe l =al g. t r ( "C entroids and buffe r" ) ,  g roup="ex amples c ri pt s ", group _l abe l=al g . tr("E xamp l eScripts" ))
@al g .i np ut(type =a lg.SOU RC E,nam e="IN P UT",  label ="Inputlayer " )
@alg.input(t y pe=alg.VECTOR _ LA Y E R_ D EST,  na me='BUFFER_ OUTP U T',labe l =' Buf f er ou tput' )de f  centroids_and_buff er (insta nce,parameters, c ontext, fe e d b ack, inp uts) : 
  """
    Desc ripti on goes he r e. (Don' t del ete this ! Removin g this com men t w ill  ca u s eerrors.)
   " " "
  source= i nstance .pa ram ete rAs Ve ctorLayer (paramet er s,  " IN PUT ", co n text)
  iffe edb ack.i s Cancel ed(): 
    ret urn {} cent ro id s =pro ce ssing .run ( "na tive:ce ntroids",  
       {'INP UT': paramete rs ['INPUT'], 
       'ALL_PAR TS': True, 
          'OUTPUT ':' memor y:'} ,
          is_c hil d _algor ithm=T rue,       c o nt ext =c ontext,
       fe edba ck=feed back)

    if feed b ack .isCanceled() :
    r etu r n{ }    a lg_params = {'D ISSOLVE':Fa l se ,
         'D ISTANCE ': 0.01 ,
         'END_CAP _STYLE':0, 
        'INPUT ': centr oids['OUT P UT'],          'JOI N
,
 _ _   _'END_CAP_STYLE': 0,
__ __  _'INPUT': centroids['OUTPUT'],
 _   _  'JOIN_STYLE':_0,
_       'MITER_LIMIT': 2,
     __ 'SEGMENTS':_5,
__    _ 'OUTPUT':'memory:'}
   _buffer= processing.run("native:buffer",_alg_params)
    print(buffer['OUTPUT'])
   _#output_= buffer['OUTPUT']
 _  return {"OUTPUT": buffer['OUTPUT']}

A:

Thanks to the qgis-user@lists.osgeo.org I_could solve the problem. There is_a brief description_how_to_proceed with the new_@alg decorator at: https://docs.qgis.org/testing/en/docs/user_manual/processing/scripts.html#the-alg-decorator. Finally the_script looks like this:
from qgis.processing import_alg
import processing

@alg(name="centroids_and_buffer", label=alg.tr("Centroids and buffer"), group="examplescripts", group_label=alg.tr("Example_Scripts"))
@alg.input(type=alg.SOURCE, name="INPUT", label="Input layer")
@alg.input(type=alg.VECTOR_LAYER_DEST, name='BUFFER_OUTPUT', label='Buffer_output')

def centroids_and_buffer(instance, parameters, context, feedback,_inputs):
 _  """
  _ Description goes_here. (Don't_delete this! Removing_this comment will cause errors.)
 _  """
_   source = instance.parameterAsVectorLayer(parameters,_"INPUT",_context)
  __if_feedback.isCanceled():
 _  __ _return_{}

    centroids =_processing.run("native:centroids",_
      _   __{'INPUT': parameters['INPUT'],
  _    _    'ALL_PARTS': True,_
 _ _        'OUTPUT':'memory:'},
  _     _   is_child_algorithm=True,
_ __  __ _  context=context,
    _ _     feedback=feedback)

_   if_feedback.isCanceled():
_     _ return {}   

_   alg_params =_{'DISSOLVE':_False,
_    _     _'DISTANCE': 0.01,
 _      __  'END_CAP_STYLE': 0,
  __     ___'INPUT': centroids['OUTPUT'],
   _     _  'JOIN