Skip to content

Delete dead Multi-Agent GAgents and demote Studio Empty-state generators #643

@eanzhao

Description

@eanzhao

Goal

Reduce the number of GAgent types in the repo by removing actors that are either dead code or stateless-shaped (AIGAgentBase<Empty>), per CLAUDE.md "Actor 即业务实体;删除优先".

Inventory (verified 2026-05-14 on feature/lark-bot)

A. Dead code — zero callers

GAgent File Verification
TaskBoardGAgent src/Aevatar.Foundation.Core/MultiAgent/TaskBoardGAgent.cs grep matches only own file + docs/adr/0006-multi-agent-evolution.md + audit doc + own test
TeamManagerGAgent src/Aevatar.Foundation.Core/MultiAgent/TeamManagerGAgent.cs same — zero production callers

Both are residue from the Multi-Agent experiment (ADR-0006). Cross-references loning's framing in discussion #568 ("ChatRuntime/Memory/Governance/TaskBoard 都不该存在").

B. Stateless伪 actors — AIGAgentBase<Empty>

GAgent File Why suspect
ScriptGenerateGAgent src/Aevatar.Studio.Hosting/Endpoints/ScriptGenerateGAgent.cs AIGAgentBase<Empty> — no persistent state
WorkflowGenerateGAgent src/Aevatar.Studio.Hosting/Endpoints/WorkflowGenerateGAgent.cs same

These wrap one-shot Studio AI generation. Empty state means no event-sourced fact is owned — they're stateless services in an actor shell.

Proposed actions

Phase 1 — delete dead code

  • Delete TaskBoardGAgent, TeamManagerGAgent, their .protos (multi_agent_state.proto), ports, projectors, tests
  • Mark ADR-0006 superseded with rationale (kept for history)
  • CI guard: add Aevatar.Foundation.Core.MultiAgent.* to banned-namespace check so nobody re-adds it

Phase 2 — demote stateless generators

  • Convert ScriptGenerateGAgent + WorkflowGenerateGAgent into stateless application services (e.g. IScriptGenerateService / IWorkflowGenerateService)
  • Move LLM call to the service; keep the existing *ActorService HTTP wrapper or fold it in
  • Tests: golden-path generation still works

Out of scope

  • Run/Session base class refactor (LlmSessionGAgent/ResponseSessionGAgent + ServiceRunGAgent + WorkflowRunGAgent + ScriptEvolutionSessionGAgent sharing a generic base) — separate proposal; that reduces code duplication but does not reduce GAgent type count
  • Merging Service* (7 types) or Script* (5 types) — each is a distinct aggregate root; CLAUDE.md "Actor 即业务实体" forbids collapsing

Expected outcome

  • GAgent type count: 25 → 21
  • Cross-references issue for /v1/messages (Path B) which intentionally adds zero new types

Risk

  • Audit any external aevatarAI/aevatar consumers for TaskBoardGAgent / TeamManagerGAgent references before deleting
  • Studio integration tests against the demoted services must cover the same surface

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions