Relates to compounds of formula I, where R1 is heterociclilo, phenyl or heteroaryl, where each Ring are optionally substituted R2 and R3 is Hydrogen or c1-c6 alkyl R4 is phenyl heteroaryl, aryl, alkyl or cycloalkyl C1 - C6 C3 - C7, where each heteroaryl, aryl or alkyl phenyl C1 - C6 are optionally substituted and q n or Ch.Preferred compounds are: N - (3 - cyano - 4 - fluoro phenyl) - 3 - (2,4-difluorophenyl) - 6 - methyl - 6.7 - dihydro - 4 - pyrazolo [1,5-a] - 5 - pirazin carboxamide n - (3 - Chloro - fluoro - 4 - phenyl) - 3 - (2,4-difluorophenyl) - 6 - methyl - 6.7 - dihydro - 4 - pyrazolo [1,5-a] - 5 - pirazin carboxamide among others. It also relates to a production method and a Pharmaceutical composition.These compounds are pyrazine derivatives useful in the treatment of infections caused by hepatitis B virusSe refiere a compuestos de formula I, donde: R1 es heterociclilo, heteroarilo o fenilo, donde cada anillo se encuentran opcionalmente sustituidos R2 y R3 son hidrogeno o alquilo C1-C6 R4 es heteroarilo, arilo, fenil-alquilo C1-C6 o cicloalquilo C3-C7, donde cada heteroarilo, arilo o fenil-alquilo C1-C6 se encuentran opcionalmente sustituidos Y y Q son CH o N. Son compuestos preferidos: N-(3-ciano-4-fluoro-fenil)-3-(2,4-difluorofenil)-6-metil-6,7-dihidro-4H-pirazolo[1,5-a]pirazin-5-carboxamida N-(3-cloro-4-fluoro-fenil)-3-(2,4-difluorofenil)-6-metil-6,7-dihidro-4H-pirazolo[1,5-a]pirazin-5-carboxamida entre otros. Tambien se refiere a un procedimiento de obtencion y una composicion farmaceutica. Dichos compuestos son derivados de pirazina utiles en el tratamiento de infecciones causadas por el virus de la hepatitis B