  We investigate some models of compact objects in the general relativity
theory with cosmological constant $\Lambda$, based on two density profiles, one
of them attributed to Stewart and the other one to Durgapal and Bannerji,
proposed in the literature to model "neutron stars". For them, a nonlocal
equation of state with cosmological constant is obtained as a consequence of
the chosen metric. In another direction, we obtain a solution for
configurations with null radial pressure. The first model (based on the
Stewart's density profile) turned out to be the most interesting, since
surprisingly it admits the presence of dark energy in the interior of the star,
in the outermost layers, for a certain range of mass-radius ratio $\gamma$.
This dark energy is independent of the cosmological constant, since it is a
consequence of the tangential pressure of the fluid be sufficiently negative.
Still in this case, for other values of $\gamma$, all the energy conditions are
satisfied. Another advantage of this model, as well as that based on the
density profile of Durgapal and Bannnerji is the existence of intervals of
$\gamma$ compatible with physically acceptable models for $\Lambda < 0$,
$\Lambda = 0$ and $\Lambda > 0$, which also allowed us to analyze the influence
of $\Lambda$ on the behavior of the fluid with respect to the energy
conditions. The other configuration studied here, $P_r=0$, only allow solutions
for $\Lambda<0$, in order to ensure a positive mass for the object and to
satisfy all the energy conditions in a specific range of $\gamma$.
