I think it's typically a colloquialism of ~고 (~고요) a kind of quotation particle .. roughly equivalent to "I told you; I am telling you" and "I/he/she/they said/say"
In writing it should probably always be 고 (고요) but in speech it is often said "구" and written "구" in books when an author wants to convey a more colloquial feel -- but both are grammatically correct as far as I know.
나도 간다고..(고요) I said I'm going too // I'm telling you I'm going too.
~~ 했다고요 (구요) --I'm telling you ~~ did it; --I/he/she/they said/say it was done
Textbook example:
"참, 우리 어머니가 내일 스티브 씨 놀러 오라고 그러시던데요. 같이 저녁이니 하자고요. Oh, my mom said that you(스티브 -Steve) should come over tomorrow. She said we should (lit. let's) have dinner together. "
Here the second sentence example ending "..고요" corresponds to "said," and can equally be ended with "..구요."
********
When preceded by "~더" (which conveys a past situation experienced by the one speaking) the pattern (~더라고/ ~더라고요/ 더라구요) emphasises the validity of what the speaker is saying about his experience. Kind of like "I'm telling you it was like..." or "I remember it was like..." ex: 그 식당의 음식이 맛있더라고요 I remember (from my experience) that the food at that restaurant was tasty.
********
ALSO - the non-final sentence ending "..고; ..고요" (which may be pronounced "..구; ..구요" ) can mean something similar to "is/does/ also" as in this example:
"일을 도와 주지 않은 할아버지를 은근히 원망하는 소리이기도 하
고요" -What was said
was also subtly blaming Grandfather for not helping out.
Although it may seem a bit awkward to hang a sentence ending with "하고" "does also" or 있고 "is also" this seems to be somewhat common in speaking.
Merry Christmas
성탄절 즐겁게 보내시고 새해에 복 많이많이 받으세요