def METHOD_NAME(self, generate_all: bool = False) -> str:
    """Generate a summary of all resources for an agent."""
    agent_config_resource_summary = self.session.query(AgentConfiguration). \
        filter(AgentConfiguration.agent_id == self.agent_id,
               AgentConfiguration.key == "resource_summary").first()
    resources = self.session.query(Resource).filter(Resource.agent_id == self.agent_id,
                                                    Resource.channel == 'INPUT').all()
    if not resources:
        return
    resource_summary = " ".join([resource.name for resource in resources])
    agent_last_resource = self.session.query(AgentConfiguration). \
        filter(AgentConfiguration.agent_id == self.agent_id,
               AgentConfiguration.key == "last_resource_time").first()
    if agent_config_resource_summary is not None:
        agent_config_resource_summary.value = resource_summary
    else:
        agent_config_resource_summary = AgentConfiguration(agent_id=self.agent_id, key="resource_summary",
                                                           value=resource_summary)
        self.session.add(agent_config_resource_summary)
    if agent_last_resource is not None:
        agent_last_resource.value = str(resources[-1].updated_at)
    else:
        agent_last_resource = AgentConfiguration(agent_id=self.agent_id, key="last_resource_time",
                                                 value=str(resources[-1].updated_at))
        self.session.add(agent_last_resource)
    self.session.commit()