Hamas has agreed to a draft ceasefire in Gaza and the release of hostages, officials told the Associated Press on Tuesday.