def build(
      self,
      model: language_model.LanguageModel,
      memory_bank: basic_associative_memory.AssociativeMemoryBank,
  ) -> entity_agent_with_logging.EntityAgentWithLogging:
    """Build an agent.

    Args:
      model: The language model to use.
      memory_bank: The agent's memory_bank object.

    Returns:
      An entity.
    """
    entity_name = self.params.get('name', 'Assistant')
    system_prompt = self.params.get('system_prompt', '')

    system = agent_components.constant.Constant(
        state=system_prompt,
        pre_act_label='System',
    )

    observation_to_memory = agent_components.observation.ObservationToMemory(
    )

    observation_label = (
        agent_components.observation.DEFAULT_OBSERVATION_PRE_ACT_LABEL)
    observation = agent_components.observation.LastNObservations(
        history_length=100,
        pre_act_label=observation_label,
    )

    components_of_agent = {
        'System': system,
        'ObservationToMemory': observation_to_memory,
        agent_components.observation.DEFAULT_OBSERVATION_COMPONENT_KEY: (
            observation
        ),
        agent_components.memory.DEFAULT_MEMORY_COMPONENT_KEY: (
            agent_components.memory.AssociativeMemory(memory_bank=memory_bank)
        ),
    }

    act_component = agent_components.concat_act_component.ConcatActComponent(
        model=model,
    )

    agent = entity_agent_with_logging.EntityAgentWithLogging(
        agent_name=entity_name,
        act_component=act_component,
        context_components=components_of_agent,
    )

    return agent
Build an agent.

    Args:
      model: The language model to use.
      memory_bank: The agent's memory_bank object.

    Returns:
      An entity.
    
concordia/prefabs/entity/fake_assistant_with_configurable_system_prompt.py