Heat the oven to 350°F (175°C). Line a baking sheet with parchment.
Soak the pitted dates in hot water for 5 minutes to soften. Drain well, and reserve 2 tablespoons of the soaking water.
Add the drained dates, almond flour, salt, cardamom, and vanilla to a food processor. Pulse until the dates are finely chopped into small flecks and the mixture looks crumbly, about 45-60 seconds. Squeeze a handful. It should hold together. If it crumbles apart, add reserved soaking water 1 teaspoon at a time and pulse again.
Shape and bake
Scoop about 1 1/2 tablespoons of dough per cookie. Roll into balls, place on the sheet, and flatten gently to about 1/2-inch thick. Press a few chocolate chips or pistachios on top if using.
Bake 10-12 minutes, until the edges look set and the centers still look soft. Do not wait for deep browning.
Cool on the sheet for 10 minutes before moving. They firm as they cool.
Notes
Use fresh almond flour. Stale flour tastes flat and can make the cookies dry.For Deglet Noor dates, soak 8-10 minutes and expect to use a little more soaking water.Store cooled cookies in an airtight container at room temperature for 2 days, or refrigerate up to 5 days.Freeze baked cookies up to 1 month. Thaw at room temperature.