Heat the olive oil in a medium pan over medium heat.
While the olive oil is heating up, place the lentils in a small saucepan. Cover with plenty of water (around 3 cups), bring to a boil, and then cook for 12 to 15 minutes, until the lentils have softened but still have a little bite. Drain the lentils and set aside.
While the lentils are cooking. add the cumin and coriander seeds to the heated olive oil and toast for a minute or two.
Add the allspice, cinnamon, black pepper, turmeric, salt, and agave to the cumin/coriander seeds. Stir briefly to combine, then add the rice. Stir until the rice is coated with the oil/spices.
When the lentils are done, combine the rice/spices mixture with the cooked lentils and the water. If you have a rice maker, transfer the whole mixture to the rice maker, set it for white rice, and let it do its thing.
If you don’t have a rice maker, wait until the onions are done cooking, then try following the rice/lentil cooking instructions from the original recipe: "bring the water to a boil, cover with a lid, and simmer over very low heat for 15 minutes. Then remove from the heat, lift off the lid, and quickly cover the pan with a clean tea towel. Seal tightly with the lid and set aside for 10 minutes."
When the onion is done frying and the rice/lentils are done cooking, add most of the onion to the rice and lentils and stir gently. Pile the mixture in a serving bowl and top with the rest of the onion.