Republicans and Democrats agree on budget deal