def _make_pre_act_value(self) -> str:
    """Returns the latest observations to preact."""
    memory = self.get_entity().get_component(
        self._memory_component_key, type_=memory_component.Memory
    )

    mems = memory.retrieve_recent(limit=self._history_length)
    # Remove memories that are not observations.
    mems = [mem for mem in mems if OBSERVATION_TAG in mem]
    result = '\n'.join(mems) + '\n'
    self._logging_channel(
        {'Key': self.get_pre_act_label(), 'Value': result.splitlines()}
    )

    return result
Returns the latest observations to preact.
concordia/components/agent/observation.py