π OpenHands: AI-Driven Development
Update microagents docs (#8183)
mamoodi9b128f61682d
diff --git a/docs/modules/usage/prompting/microagents-keyword.md b/docs/modules/usage/prompting/microagents-keyword.mdindex c63210160c..c17ef22bc3 100644--- a/docs/modules/usage/prompting/microagents-keyword.md+++ b/docs/modules/usage/prompting/microagents-keyword.md@@ -5,10 +5,9 @@Keyword-triggered microagents provide OpenHands with specific instructions that are activated when certain keywordsappear in the prompt. This is useful for tailoring behavior based on particular tools, languages, or frameworks.-## Microagent File+## Usage-Create a keyword-triggered microagent (example: `.openhands/microagents/trigger-keyword.md`) to include instructions-that activate only for prompts with specific keywords.+These microagents are only loaded when a prompt includes one of the trigger words.## Frontmatter Syntax@@ -19,31 +18,21 @@ Enclose the frontmatter in triple dashes (---) and include the following fields:| Field | Description | Required | Default ||------------|--------------------------------------------------|----------|------------------|-| `name` | A unique identifier for the microagent. | Yes | 'default' |-| `type` | Type of microagent. Must be set to `knowledge`. | Yes | 'repo' || `triggers` | A list of keywords that activate the microagent. | Yes | None || `agent` | The agent this microagent applies to. | No | 'CodeActAgent' |## Example+Keyword-triggered microagent file example located at `.openhands/microagents/yummy.md`:```----name: magic_word-type: knowledgetriggers:- yummyhappy- happyyummy-agent: CodeActAgent---The user has said the magic word. Respond with "That was delicious!"```-Keyword-triggered microagents:-- Monitor incoming prompts for specified trigger words.-- Activate when relevant triggers are detected.-- Apply their specialized knowledge and capabilities.-- Follow defined guidelines and restrictions.-[See examples of microagents triggered by keywords in the official OpenHands repository](https://github.com/All-Hands-AI/OpenHands/tree/main/microagents)diff --git a/docs/modules/usage/prompting/microagents-overview.md b/docs/modules/usage/prompting/microagents-overview.mdindex 1af648ce93..49173f254c 100644--- a/docs/modules/usage/prompting/microagents-overview.md+++ b/docs/modules/usage/prompting/microagents-overview.md@@ -34,7 +34,7 @@ some-repository/Each microagent file may include frontmatter that provides additional information. In some cases, this frontmatteris required:-| Microagent Type | Frontmatter Requirement |-|----------------------------------|-------------------------------------------------------|-| `General Repository Microagents` | Required only if more than one of this type exists. |-| `Keyword-Triggered Microagents` | Required. |+| Microagent Type | Required |+|----------------------------------|----------|+| `General Repository Microagents` | No |+| `Keyword-Triggered Microagents` | Yes |diff --git a/docs/modules/usage/prompting/microagents-repo.md b/docs/modules/usage/prompting/microagents-repo.mdindex 0828011649..e7c7020585 100644--- a/docs/modules/usage/prompting/microagents-repo.md+++ b/docs/modules/usage/prompting/microagents-repo.md@@ -4,31 +4,24 @@General guidelines for OpenHands to work more effectively with the repository.-## Microagent File+## Usage-Create a general repository microagent (example: `.openhands/microagents/repo.md`) to include-project-specific instructions, team practices, coding standards, and architectural guidelines that are relevant for-**all** prompts in that repository.+These microagents are always loaded as part of the context.## Frontmatter Syntax-The frontmatter for this type of microagent is optional, unless you plan to include more than one general-repository microagent.+The frontmatter for this type of microagent is optional.Frontmatter should be enclosed in triple dashes (---) and may include the following fields:-| Field | Description | Required | Default |-|-----------|-----------------------------------------|--------------------------------------------------------------------|----------------|-| `name` | A unique identifier for the microagent | Required only if using more than one general repository microagent | 'default' |-| `agent` | The agent this microagent applies to | No | 'CodeActAgent' |+| Field | Description | Required | Default |+|-----------|-----------------------------------------|----------|----------------|+| `agent` | The agent this microagent applies to | No | 'CodeActAgent' |## Example+General repository microagent file example located at `.openhands/microagents/repo.md`:```-----name: repo-----This project is a TODO application that allows users to track TODO items.To set it up, you can run `npm run build`.