Skip to main content

agenthub.monologue_agent.utils.prompts

get_summarize_monologue_prompt

def get_summarize_monologue_prompt(thoughts: list[dict])

Gets the prompt for summarizing the monologue

Returns:

  • str: A formatted string with the current monologue within the prompt

get_request_action_prompt

def get_request_action_prompt(task: str, thoughts: list[dict],
recent_events: list[dict])

Gets the action prompt formatted with appropriate values.

Arguments:

  • task (str): The current task the agent is trying to accomplish
  • thoughts (list[dict]): The agent's current thoughts

Returns:

  • str: Formatted prompt string with hint, task, monologue, and background commands included

parse_action_response

def parse_action_response(orig_response: str) -> Action

Parses a string to find an action within it

Arguments:

  • response (str): The string to be parsed

Returns:

  • Action: The action that was found in the response string

parse_summary_response

def parse_summary_response(response: str) -> list[dict]

Parses a summary of the monologue

Arguments:

  • response (str): The response string to be parsed

Returns:

  • list[dict]: The list of summaries output by the model