Skip to main content

openhands.utils.prompt

PromptManager Objects

class PromptManager()

Manages prompt templates and micro-agents for AI interactions.

This class handles loading and rendering of system and user prompt templates, as well as loading micro-agent specifications. It provides methods to access rendered system and initial user messages for AI interactions.

Attributes:

  • prompt_dir str - Directory containing prompt templates.
  • agent_skills_docs str - Documentation of agent skills.
  • micro_agent MicroAgent | None - Micro-agent, if specified.

initial_user_message

@property
def initial_user_message() -> str

This is the initial user message provided to the agent before actual user instructions are provided.

It is used to provide a demonstration of how the agent should behave in order to solve the user's task. And it may optionally contain some additional context about the user's task. These additional context will convert the current generic agent into a more specialized agent that is tailored to the user's task.