Agnolotti is made by folding a sheet of pasta over a filling, but ravioli is made by sandwiching the filling between two layers of pasta.
They are super similar, but pasta types are a weird subject as there is a different definition depending on pretty much any variation in the preparation; e.g. The only difference between something like cavatappi and cellentani is that the latter has more ridges. They both have ridges, but somehow additional ridges is enough to garner a separate definition.
🤓