President Joe Biden says Israel and Hamas have agreed to a ceasefire deal to pause the war in Gaza and release hostages.