They will be able to apply to their local health board for management and workload support or more healthcare professionals as well as back office and financial help.
Each will be assessed before any necessary help is given.
It is part of the Welsh government's plans to reform primary care services.
Surgeries in parts of Wales, particularly rural areas, have suffered with a lack of GPs and financial incentives have been suggested as a possible way forward.
But this scheme is much wider than that and looks at all aspects of a surgery.
Health Minister Mark Drakeford said: "Strengthening primary care services in Wales is a priority for the Welsh government.
"Our aim is to create a stronger, highly-trained primary care workforce, which can deliver a wide-range of services in local communities, reducing our dependence on hospital-based care.
"The new sustainability framework puts in place a clear system to ensure at-risk GP practices can apply for support, as part of the reform of primary care which health boards are delivering as part of improving services for the public."
The move has been welcomed by GPs.
Dr Charlotte Jones, chairwoman of General Practitioners Committee Wales, said: "It is vital that access and the continuity of services are secured for patients across Wales and it is important to recognise that rural and deprived urban communities face unique challenges."
Dr Paul Myres, chaiman of the Royal College of General Practitioners Wales (RCGP), agreed but wants further action.
"Many of our colleagues are trying to deal with excessive workloads and that puts strain on practices and practice staff," he said.
"This scheme helps practices to identify when they may be in difficulty, balancing their work and capacity to deliver and to make a case that extra support is needed.
"It is not clear yet exactly what support health boards will be able to provide."
He added: "We have always advocated the importance of identifying potential problems and putting in support before actual problems occur.
"We very much hope the support that can be provided will help practices maintain, if not improve their services.
"RCGP Wales is calling for an occupational health service to be made available as a matter of urgency to practices across Wales."
Struggling GP practices that are at risk of closure or cutting patient services are being offered help to keep them operating.