Mayor Bill de Blasio and the City Council agreed on Wednesday on an $82.1 billion budget for New York City that adds tens of millions in new spending for initiatives, including summer jobs for youths, after-school programs and reserve funds to help the city weather an economic downturn.

The handshake deal, reached hours before the mayor was to depart for his daughter’s college graduation in California, was the earliest reached since 2001, according to the mayor’s office, and contained few surprises or major new efforts beyond those announced in the executive budget.

Despite the additional spending pushed by the Council, including an extra $21 million to keep libraries open six days a week and $10 million for cultural organizations in the five boroughs, the final number agreed upon was slightly less than what had been proposed in the mayor’s executive budget in late April. The budget contains no job or staff cuts; reductions came mostly from more accurately estimating costs across the city bureaucracy.

“Give-and-take is a wonderful thing in a democratic process when it leads to a productive result and that’s what’s happened here,” Mr. de Blasio said from the steps under the City Hall rotunda amid a buoyant group of council members.