Skip to content

feat: add GRR and IS work patterns with agent templates and sample apps#527

Open
SeasonPilot wants to merge 1 commit intoagentuniverse-ai:masterfrom
SeasonPilot:feature/grr-is-work-patterns
Open

feat: add GRR and IS work patterns with agent templates and sample apps#527
SeasonPilot wants to merge 1 commit intoagentuniverse-ai:masterfrom
SeasonPilot:feature/grr-is-work-patterns

Conversation

@SeasonPilot
Copy link

Implement two new multi-agent collaboration patterns:

GRR (Generate-Review-Rewrite) Pattern:

  • Add GRRWorkPattern class with sync/async support
  • Implement 3 agent templates: Generating, Reviewing, Rewriting
  • Iterative content refinement with configurable quality thresholds
  • Complete sample app with Chinese documentation
  • Use cases: content creation, technical docs, creative writing

IS (Implementation-Supervision) Pattern:

  • Add ISWorkPattern class with checkpoint mechanism
  • Implement 2 agent templates: Implementation, Supervision
  • Goal-aligned execution with continuous supervision and feedback
  • Complete sample app with Chinese documentation
  • Use cases: code development, document writing, data processing

Core Features:

  • Work pattern base class integration
  • Configurable iteration/checkpoint parameters
  • Expert framework support
  • Memory management integration
  • Comprehensive test coverage

Files Added:

  • Agent templates: 6 new template classes

  • Work patterns: 2 pattern implementations with YAML configs

  • Sample apps: 2 complete demo applications with configs

  • Documentation: README, CHANGELOG, usage examples

  • Tests: Unit tests for both patterns

    When submitting a PR, please confirm the following points and put [x] in the boxes one by one. | 在提出pr时,请确认了以下几点,并逐一使用[x]符号确认勾选。

    Checklist | 检查项

    • I have read and understood the contributor guidelines. |
      我已阅读并理解贡献者指南
    • I have checked for any duplicate features related to this request and communicated with the project maintainers. |
      我已检查没有与此请求重复的功能并与项目维护者进行了沟通。
    • I accept the suggestion of the maintainers to make changes to or close this PR. | 我接受此PR配合维护人员的建议进行修改或关闭。
    • I have submitted the test files and can provide screenshots of the test results (required for feature or bug fixes) |
      我已经提交了测试文件并可提供测试结果截图(功能修改、BUG修复类PR必须提供,其他按需)
    • I have added or modified the documentation related to this PR | 我已经添加或修改了本次pr对应的文档说明(非必要,根据实际PR内容按需添加)
    • I have added examples and notes if needed | 我已经添加了使用案例代码与文档说明(非必要,根据实际PR内容按需添加)

    Please fill in the specific details of this PR: | 请详细填写本次PR的内容:

    本PR新增两个多智能体协作模式:GRR(Generate-Review-Rewrite)和IS(Implementation-Supervision)

    GRR模式核心功能:

    • 实现GRRWorkPattern工作模式类,支持同步/异步调用
    • 新增3个Agent模板:GeneratingAgentTemplate(生成)、ReviewingAgentTemplate(评审)、RewritingAgentTemplate(重写)
    • 支持可配置的迭代次数和质量阈值参数
    • 提供完整的示例应用grr_agent_app,包含中文文档
    • 适用场景:内容创作、技术文档、创意写作

    IS模式核心功能:

    • 实现ISWorkPattern工作模式类,支持检查点机制
    • 新增2个Agent模板:ImplementationAgentTemplate(实施)、SupervisionAgentTemplate(监督)
    • 支持目标对齐的持续监督和反馈修正机制
    • 提供完整的示例应用is_agent_app,包含中文文档
    • 适用场景:代码开发、文档编写、数据处理

    技术实现:

    • 继承WorkPattern基类,实现invoke()和async_invoke()方法
    • 集成Expert Framework和Memory管理
    • 提供YAML配置文件支持
    • 完整的单元测试覆盖

    新增文件:

    • Agent模板: 6个新模板类
    • 工作模式: 2个模式实现 + YAML配置
    • 示例应用: 2个完整演示应用(含配置、提示词、测试)
    • 文档: README、CHANGELOG、使用示例

    Please provide the path of test files and submit screenshots or files of the test results(fill in as needed): |
    请填写测试文件路径并提供测试结果截图或文件(按需填写):

    • examples/sample_apps/grr_agent_app/intelligence/test/test_grr_agent.py - GRR模式单元测试
    • examples/sample_apps/is_agent_app/intelligence/test/test_is_agent.py - IS模式单元测试
    • examples/sample_apps/grr_agent_app/simple_example.py - GRR快速开始示例
    • examples/sample_apps/is_agent_app/simple_example.py - IS快速开始示例
image

Please list the names of the docs that were added or modified in this PR (fill in as needed): | 请列出本次PR新增或修改的文档名称(按需填写):

  • examples/sample_apps/grr_agent_app/README.md - GRR模式完整文档(中文)
  • examples/sample_apps/grr_agent_app/CHANGELOG.md - GRR应用变更日志
  • examples/sample_apps/is_agent_app/README.md - IS模式完整文档(中文)
  • examples/sample_apps/is_agent_app/CHANGELOG.md - IS应用变更日志
  • Agent模板代码中包含详细的docstring文档

Implement two new multi-agent collaboration patterns:

**GRR (Generate-Review-Rewrite) Pattern:**
- Add GRRWorkPattern class with sync/async support
- Implement 3 agent templates: Generating, Reviewing, Rewriting
- Iterative content refinement with configurable quality thresholds
- Complete sample app with Chinese documentation
- Use cases: content creation, technical docs, creative writing

**IS (Implementation-Supervision) Pattern:**
- Add ISWorkPattern class with checkpoint mechanism
- Implement 2 agent templates: Implementation, Supervision
- Goal-aligned execution with continuous supervision and feedback
- Complete sample app with Chinese documentation
- Use cases: code development, document writing, data processing

**Core Features:**
- Work pattern base class integration
- Configurable iteration/checkpoint parameters
- Expert framework support
- Memory management integration
- Comprehensive test coverage

**Files Added:**
- Agent templates: 6 new template classes
- Work patterns: 2 pattern implementations with YAML configs
- Sample apps: 2 complete demo applications with configs
- Documentation: README, CHANGELOG, usage examples
- Tests: Unit tests for both patterns
@SeasonPilot
Copy link
Author

#257

1 similar comment
@SeasonPilot
Copy link
Author

#257

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.

1 participant