I went looking for libraries that implement just the ActivityPub interactions without an app "on top" of them, and the only one I found was go-fed, a library written in Go.
I ended up watching this entire talk about the author of the library, given as part of ActivityPub conference 2020:
https://conf.tube/w/jqu23ke8Px9mFpCztZTTqw
(Incidentally, let me know if there are other libraries out there. I've definitely barely scratched the surface here so far.)
3/x