Skip to content

feat: clone an agent hierarchy into another project #19

Description

@antiv

Narrowed 2026-08-06. The original scope (environment tags dev/staging/prod, promotion workflow with diff preview, promotion history, rollback of a promotion) assumes teams running several environments. MATE deployments run one instance, and the useful half — copying a working agent tree somewhere else — is nearly free given what already exists.

Problem

Reusing a configured agent hierarchy in another project means exporting JSON, hand-editing project ids, and importing — or rebuilding it in the dashboard.

What already exists

  • GET /dashboard/api/agents/export and POST /dashboard/api/agents/import (shared/utils/dashboard/dashboard_server.py) already serialise and restore agent configs, including tools and relationships.
  • agent_config_versions with rollback and version tags covers "undo a bad change" — the rollback half of the original promotion story.
  • The template library (documents/TEMPLATE_LIBRARY.md) covers sharing a starting point across installations.
  • WizardProvisioningService.promote_trial() already does a narrow form of promotion for wizard trials.

Scope

  • "Clone to project" action on a root agent: deep-copies the agent and its sub-agents into a chosen target project, rewriting project_id and parent references.
  • Name collision handling: suffix or prompt for a new root name.
  • Optionally include the agent's memory blocks and file-search store assignments (checkbox).
  • Audit entry for the clone.

Acceptance criteria

  • Clone a root agent with its whole sub-agent tree into another project
  • Cloned agents are immediately loadable (folders created as for a normal agent)
  • Name collisions handled without corrupting the source
  • Clone recorded in the audit log

Explicitly out of scope

Environment tags, diff-preview promotion workflow, promotion history table. Versioning already provides rollback, and single-instance deployments have nothing to promote between.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium prioritydevopsDevOps and deploymentenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions