Skip to content

Replace code-defined Agent Teams with reusable Space Templates #173

Description

@mydmdm

Summary

Replace the current code-defined Agent Team model with reusable Space Templates that materialize a complete task-specific Agent workspace from ordinary Space nodes and Agent configuration.

Huabu now supports Space-specific Prompt Frames and Skill Frames well enough that workflows such as Issue Tracker and Paper Review should no longer require a separate hard-coded Agent Team abstraction. A template could create the relevant Prompt and Skill nodes, preconfigure the required Agent Nodes, and establish the initial Frames, connections, layout, and defaults.

Motivation

Task-specific teams are primarily compositions of capabilities Huabu already exposes on the Space:

  • role and workflow instructions in Prompt Frames
  • task-specific procedures and contracts in Skill Frames
  • Agent Nodes with selected Profiles and initial configuration
  • Frames, links, layout, and supporting Notes that define the collaboration surface

Representing these workflows as Space content would make them visible, editable, copyable, shareable, and customizable without changing application code. It would also make the Space itself the canonical representation of an Agent Team.

Examples

Issue Tracker

A template could instantiate:

  • the Coordinator Prompt Frame
  • issue-fixing Skill Frames and safety contracts
  • a preconfigured Coordinator Agent Node
  • the standard execution-note and issue-frame conventions
  • the intended initial connections and layout

Paper Review

A template could instantiate:

  • reviewer/coordinator Prompt Frames
  • literature-search, extraction, comparison, and synthesis skills
  • preconfigured review Agent Nodes and Profiles
  • Frames and Notes for papers, evidence, review status, and final synthesis

Proposed experience

  • Users can create a new Space from a named template or apply a template to an empty Space.
  • A template materializes normal Space nodes rather than introducing opaque runtime-only team state.
  • Prompt and Skill content remains editable after instantiation and follows existing Space-specific prompt/skill semantics.
  • Agent Nodes are created with declared Profiles and stable initial configuration, but are not unintentionally started before template connections and context are complete.
  • Initial parentage, edges, geometry, Frame layout, labels, and reusable workflow Notes are preserved.
  • Template instances are independent: editing one Space does not mutate the source template or other instances.
  • Templates can be exported/shared and versioned with a clear compatibility story for missing Agent Profiles or capabilities.

Design questions

  • Define the minimal declarative template format and whether it is itself stored as a Space, a snapshot, or a portable manifest.
  • Decide how template-local references between nodes are remapped to newly assigned node IDs and Agent thread IDs.
  • Define Agent creation timing so Prompt/Skill topology is complete before first realization freezes Agent context.
  • Decide how required Agent Profiles are resolved when importing a template into another environment.
  • Determine whether applying a template to a non-empty Space is supported initially or deferred in favor of new-Space creation.
  • Establish migration and deprecation boundaries for existing code-defined Agent Teams.

Acceptance criteria

  • Issue Tracker and Paper Review can each be represented and instantiated as a Space Template without task-specific Agent Team code.
  • Instantiation creates the expected Prompt Frames, Skill Frames, Agent Nodes, workflow Notes, Frames, edges, and layout.
  • Agent Profiles and launch configuration are resolved deterministically, with actionable errors for missing dependencies.
  • Agents do not realize or freeze context until all template nodes and connections have been created.
  • Instantiated content is ordinary editable Space content and remains independent from the source template.
  • A documented migration path exists from current Agent Team definitions to Space Templates.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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