π OpenHands: AI-Driven Development
Organization and user microagents (#8506)
mamoodi5b583e5f2724
diff --git a/docs/modules/usage/prompting/microagents-org.md b/docs/modules/usage/prompting/microagents-org.mdnew file mode 100644index 0000000000..59887c2fe3--- /dev/null+++ b/docs/modules/usage/prompting/microagents-org.md@@ -0,0 +1,23 @@+# Organization and User Microagents++## Purpose++Organizations and users can define microagents that apply to all repositories belonging to the organization or user.++## Usage++These microagents can be [any type of microagent](./microagents-overview#microagent-types) and will be loaded+accordingly. However, they are applied to all repositories belonging to the organization or user.++Add a `.openhands` repository under the organization or user and create a `microagents` directory and place the+microagents in that directory.++## Example++General microagent file example for organization `Great-Co` located inside the `.openhands` repository:+`microagents/org-microagent.md`:+```+* Use type hints and error boundaries; validate inputs at system boundaries and fail with meaningful error messages.+* Document interfaces and public APIs; use implementation comments only for non-obvious logic.+* Follow the same naming convention for variables, classes, constants, etc. already used in each repository.+```diff --git a/docs/modules/usage/prompting/microagents-overview.md b/docs/modules/usage/prompting/microagents-overview.mdindex 49173f254c..40e741d1db 100644--- a/docs/modules/usage/prompting/microagents-overview.md+++ b/docs/modules/usage/prompting/microagents-overview.md@@ -7,7 +7,7 @@ They provide expert guidance, automate common tasks, and ensure consistent practCurrently OpenHands supports the following types of microagents:-- [General Repository Microagents](./microagents-repo): General guidelines for OpenHands about the repository.+- [General Microagents](./microagents-repo): General guidelines for OpenHands about the repository.- [Keyword-Triggered Microagents](./microagents-keyword): Guidelines activated by specific keywords in prompts.To customize OpenHands' behavior, create a .openhands/microagents/ directory in the root of your repository and@@ -24,7 +24,7 @@ Example repository structure:some-repository/βββ .openhands/βββ microagents/- βββ repo.md # General repository guidelines+ βββ repo.md # General guidelinesβββ trigger_this.md # Microagent triggered by specific keywordsβββ trigger_that.md # Microagent triggered by specific keywords```@@ -34,7 +34,7 @@ some-repository/Each microagent file may include frontmatter that provides additional information. In some cases, this frontmatteris required:-| Microagent Type | Required |-|----------------------------------|----------|-| `General Repository Microagents` | No |-| `Keyword-Triggered Microagents` | Yes |+| Microagent Type | Required |+|---------------------------------|----------|+| `General Microagents` | No |+| `Keyword-Triggered Microagents` | Yes |diff --git a/docs/modules/usage/prompting/microagents-repo.md b/docs/modules/usage/prompting/microagents-repo.mdindex e7c7020585..2c75547a8a 100644--- a/docs/modules/usage/prompting/microagents-repo.md+++ b/docs/modules/usage/prompting/microagents-repo.md@@ -1,4 +1,4 @@-# General Repository Microagents+# General Microagents## Purpose@@ -20,7 +20,7 @@ Frontmatter should be enclosed in triple dashes (---) and may include the follow## Example-General repository microagent file example located at `.openhands/microagents/repo.md`:+General microagent file example located at `.openhands/microagents/repo.md`:```This project is a TODO application that allows users to track TODO items.@@ -28,4 +28,4 @@ To set it up, you can run `npm run build`.Always make sure the tests are passing before committing changes. You can run the tests by running `npm run test`.```-[See more examples of general repository microagents here.](https://github.com/All-Hands-AI/OpenHands/tree/main/.openhands/microagents)+[See more examples of general microagents here.](https://github.com/All-Hands-AI/OpenHands/tree/main/.openhands/microagents)diff --git a/docs/sidebars.ts b/docs/sidebars.tsindex 4cd006139d..ab9d788585 100644--- a/docs/sidebars.ts+++ b/docs/sidebars.ts@@ -70,7 +70,7 @@ const sidebars: SidebarsConfig = {},{type: 'doc',- label: 'General Repository Microagents',+ label: 'General Microagents',id: 'usage/prompting/microagents-repo',},{@@ -78,6 +78,11 @@ const sidebars: SidebarsConfig = {label: 'Keyword-Triggered Microagents',id: 'usage/prompting/microagents-keyword',},+ {+ type: 'doc',+ label: 'Organization and User Microagents',+ id: 'usage/prompting/microagents-org',+ },{type: 'doc',label: 'Global Microagents',