I think Valmiki appears in Ramayana and Vyasa in Mahabharata.
Is it true that they recorded what they saw directly and were not retelling what they had heard?
Valmiki and Vyasa were present.
Valmiki was given a boon by Brahma that he will know all the incidents in Ramayana and he can write an epic on it. More details in this answer.
As for Mahabharata, this answer goes in more detail.