BEIJING (AP) _ Chinese economic planners agree on at least one thing these days: The economy is on a roll. The question is how to rein it in before prices spiral out of control.

Having unleashed many of the nation's communist fetters, the Chinese leadership now must tame its firebreathing, unruly dragon of an economy without putting it back in chains.

Inflation surged so high this summer - hitting 25.8 percent in August - Premier Li Peng declared that controlling prices will be the nation's top priority for the rest of the year.

The government's ''cai lanzi,'' or vegetable basket project, aimed at making a basic market basket of daily necessities affordable for average Chinese, has seemed instead to highlight the problem.

In the past year many families have seen prices for eggs, vegetables, pork and other key items shoot up 30 percent or more.

The last time this happened, in the late 1980s, urban Chinese took to the streets in mass demonstrations provoked, at least partly, by spiraling prices. The ensuing political crackdown and austerity drive that followed hamstrung economic growth and delayed reforms by several more years.

Leaders already jittery over rising worker unrest - more than 3,000 labor disputes were reported in the first three months of 1994 - have moved in recent weeks to curb price increases by banning profiteering, restoring price controls on key commodities and ordering the release of food reserves ahead of next week's Mid-Autumn Moon Festival and the Oct. 1 National Day celebrations.

Apparently to demonstrate their commitment to the problem, top officials like Premier Li have joined inspection teams monitoring markets to see if the policies are working.

So far, they don't seem to be. Inspectors in Beijing found market vendors charging at least 10 percent more than the official maximum price for pork, flour, vegetables and fruit, the Beijing Evening News reported this week.

There has been no panic buying, and shops and markets are abundantly stocked. But price controls enforced from above put shopkeepers in the awkward bind of sometimes having to sell at below cost. And they are only a temporary salve for the economic woes of a nation shifting from centralized planning to a market economy.

''The situation is by no means encouraging,'' economist Liu Guoguang, an advisor to the national legislature, recently told the magazine Beijing Review. ''With high inflation, chaos has appeared in China's economic life.''

It's a tricky balancing act for chief economic planner Zhu Rongji, who as governor of the central bank tried earlier in the year to cool inflation by clamping down on credit.

Theoretically, such a move would slow business investment, cool economic growth and, with it, inflation.

But business investment soared anyway as regulatory controls were eased to funnel money to state-owned firms drowning in red ink.

That stopgap measure, along with bad weather, sent prices of raw materials and farm products soaring.

There appeared to be little choice. One-third of the loans by China's banks are uncollectible or overdue, leaving them at risk being of pulled under by their state-run debtors. They also face heavy pressure from local governments to keep the cash flowing to the state firms.

The rusting state sector produces about half of China's industrial output but is hemorrhaging red ink.

Tens of thousands of inefficient state-owned enterprises are due to be bailed out or allowed to go bankrupt. But so far, the government has attacked the problem only on an experimental basis, fearing unemployment could lead to unrest among the estimated 30 million unneeded workers due to lose their jobs.

The solution, economists say, is a slight loosening of credit to give firms needed injections of cash, balanced by careful management of price controls on key items like food.

The trick, says Edward K.Y. Chen, an economist and director of the Center of Asian Studies at Hong Kong University, is to keep living standards rising while those controls are put into place.

''It's a tradeoff between inflation and unemployment,'' says Nobuo Maruyama, a senior researcher at Tokyo's Institute of Developing Economies. ''At the moment, the dominant mood is one of confusion.''