def make_memories(
      self,
      agent_config: AgentConfig,
  ) -> associative_memory.AssociativeMemory:
    """Creates agent memory from the agent config."""

    mem = self._blank_memory_factory_call()
    # All players share generic memories.
    for item in self._shared_memories:
      mem.add(item)

    context = agent_config.context
    if agent_config.goal:
      context += '\n' + agent_config.goal

    self.add_memories(memory=mem, agent_config=agent_config)

    if context:
      context_items = context.split('\n')
      for item in context_items:
        if item:
          mem.add(item)

    if agent_config.specific_memories:
      specific_memories = agent_config.specific_memories.split('\n')
      for item in specific_memories:
        if item:
          mem.add(item)

    return mem
Creates agent memory from the agent config.
concordia/associative_memory/deprecated/formative_memories.py