Place egg in a small saucepan and cover with cold water. Bring water to the boil and immediately remove from heat. Cover and let egg stand in hot water for 10 to 12 minutes. Remove from hot water, cool, peel and chop.
Heat oil in a frying pan over low heat and add chopped onion. Cook, stirring occasionally until brown and tender. Add chopped garlic and sauté for 1 to 2 minutes. Remove the mixture from the frying pan and set aside to cool.
In a blender or food processor, finely chop crackers and walnuts. Mix in peas and onion mixture. Add the egg and blend to a fine paste, adding water or oil if necessary to attain desired consistency. Season with salt and pepper.