The shock announcement was made by senior South Korean officials in Washington, who passed on a letter from the North Korean leader.
They said Mr Kim had also agreed to halt nuclear and missile tests and was "committed to denuclearisation".
It appears to be a major breakthrough after months of threats and violence.
The South Korean delegation had held unprecedented talks with Mr Kim in Pyongyang earlier this week.