Skip to content

Update documentation for command-style microagents with user input support #8990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 63 commits into
base: main
Choose a base branch
from

Conversation

xingyaoww
Copy link
Collaborator

@xingyaoww xingyaoww commented Jun 8, 2025

This PR updates the microagent documentation to include task microagents and MCP tools support. It also clarifies field requirements in the microagent frontmatter.

Changes:

  1. Added documentation for task microagents with user input support
  2. Added documentation for MCP tools support in microagents
  3. Updated code to use filename as name when not specified in frontmatter
  4. Removed name field from all microagent files (using filename instead)
  5. Clarified that the type field is optional and inferred from other fields:
    • If inputs exist -> TASK
    • If triggers exist -> KNOWLEDGE
    • Otherwise -> REPO
  6. Documented that version, agent, and author fields are kept for backward compatibility but not used

Related to PR #8139 which adds task microagent support.


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:93287ef-nikolaik   --name openhands-app-93287ef   docker.all-hands.dev/all-hands-ai/openhands:93287ef

openhands-agent and others added 30 commits April 29, 2025 01:33
@xingyaoww xingyaoww changed the title Update documentation for task microagents with user input support Update documentation for command-style microagents with user input support Jun 8, 2025
Copy link

openhands-ai bot commented Jun 23, 2025

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • Run Python Unit Tests
    • Lint

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #8990

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

@xingyaoww
Copy link
Collaborator Author

@OpenHands please fix the failing actions on PR #8990

Copy link

openhands-ai bot commented Jun 24, 2025

I'm on it! xingyaoww can track my progress at all-hands.dev

- Add missing newlines at end of microagent files (fixed by pre-commit)
- Add pytest-asyncio dependency to fix async test execution
- All non-Docker tests now pass
Copy link

openhands-ai bot commented Jun 24, 2025

Summary: Fixed Failing Actions on PR #8990

I have successfully identified and fixed the failing GitHub Actions on PR #8990. Here's what I accomplished:

Issues Identified and Fixed:

  1. Lint Failures: Four microagent files were missing newlines at the end of the file:

    • microagents/address_pr_comments.md
    • microagents/fix_test.md
    • microagents/update_pr_description.md
    • microagents/update_test.md
  2. Python Unit Test Failures: The async test test_add_mcp_tools_from_microagents was failing because the pytest-asyncio dependency was missing.

Changes Made:

  1. Added missing newlines: Fixed the "fix end of files" pre-commit check by adding newlines to the 4 microagent files
  2. Added pytest-asyncio dependency: Added pytest-asyncio = "^1.0.0" to the dev dependencies in pyproject.toml

Verification:

  • ✅ All pre-commit checks now pass locally
  • ✅ The async test now passes locally
  • ✅ All non-Docker microagent tests pass locally
  • ✅ Changes committed and pushed to the update-microagent-docs branch
  • ✅ New GitHub Actions workflow runs have been triggered and are currently running

The changes are minimal and targeted - only fixing the specific issues that were causing the CI failures. Based on my local testing, the new workflow runs should now pass successfully.

Link to PR: #8990

- Update test assertions to expect filename as microagent name instead of 'default'
- Remove debug print statements from microagent.py
- Revert pytest-asyncio dependency addition as requested
- All tests now pass with the new filename-based naming behavior
- Change test filenames from 'test.md' to match expected microagent names
- Use 'default.md' for tests expecting 'default' name
- Use 'custom_name.md' for test expecting 'custom_name' name
- Use 'test_agent.md' for test expecting 'test_agent' name
- This properly tests the filename-based naming behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants