An Architecture For Intentional Agents