The text of the Agent of the Grave's class feature, "Spells Per Day/Spells Known" reads
When a new Agent of the Grave level is gained, the character gains new spells as if he had also gained a level in a spellcasting class he belonged to before adding the prestige class. He does not, however, gain other benefits a character of that class would have gained, except for additional spells per day, spells known (if he is a spontaneous spellcaster), and an increased effective level of spellcasting. If the character has more than one spellcasting class before becoming an Agent of the Grave he must decide which class he adds the new level to for the purpose of determining spells per day.
When you first gain this prestige class, are you "Gaining a new Agent of the Grave" level, or are you instead selecting this prestige class at level 1, and not getting any benefit of this ability?