Maybe I didn't understand but I'm thinking that you are trying to get an Alert with its messages and its location. I would do:
public function getIndex() {
$alerts = Alert::with('location', 'messages')
->where('user_id', '=', Auth::user()->id)
->get();
$this->layout->content = View::make('agents.index',
array('alerts' => $alerts));
}
to use eager loading on messages and location for your Alert.