The White House announces in parallel statements that the two countries have agreed to "ensure safe navigation, eliminate the use of violence, and prevent the use of commercial vessels for military purposes in the Black Sea".
The message comes after the US has held separate talks with Ukraine and Russia in recent days.
Ukraine's President Volodymyr Zelensky calls it a step in the right direction.
It's too early to say that it will work, but these were the right meetings, the right decisions, the right steps. No one can accuse Ukraine of not striving for a sustainable peace after this, says Zelensky at a press conference in Kyiv.
Demand to lift sanctions
Zelensky says he hopes that the ceasefire at sea will come into effect immediately and that Ukraine will do its part to "fulfill the agreement".
According to a statement from the Kremlin, the agreement can only come into force if the US lifts sanctions against the Russian agricultural bank Rosselkhozbank and "other financial institutions" involved in food exports. The institutions should also be reconnected to the international payment system Swift, according to the Russian statement.
The White House has not mentioned sanctions specifically, but says the US will facilitate Russian agricultural exports.
Zelensky is critical of any potential US sanctions relief.
We believe it weakens our position, he says.
Russia and the US have also agreed, according to the Kremlin, that the month-long pause in attacks on energy infrastructure presented last week will include gas pipelines, power plants, power grids, and refineries.
Both Ukraine and Russia say they agree with the US that third countries will be able to monitor a potential future ceasefire.
Calling for more talks
Ukraine is simultaneously warning Russia against moving its warships out of the eastern part of the Black Sea. Defense Minister Rustem Umerov writes on Facebook that if Russian warships move from the eastern part, "Ukraine will have full right to exercise the right to self-defense".
Umerov is also calling for more talks to resolve the details of the agreement announced by the Americans.
The US negotiated with Russia in Saudi Arabia's capital Riyadh on Monday and with Ukraine on Sunday. On Tuesday, new talks have been held between Ukraine and the US.