Skip to content

refactor: retire the vestigial agent type taxonomy (business-assistant everywhere) #2104

Closed

Description

@trinity-ability

Summary

The free-text agent type field (default "business-assistant") is a vestigial taxonomy from before tags existed. The github: creation path never reads template.yaml metadata into the create config, so virtually every agent carries the default — and the surfaces that render it (Permissions tab, agent info chip, public-link fallback) show a stale, meaningless [business-assistant] label. Nothing functional depends on the value: categorization is covered by tags, the system agent keys on is_system, and the skill-runner tile variant can key on that agent's fixed name. Retire it end-to-end. No backward compatibility required — remove it from API/MCP responses outright rather than deprecating.

Context

Where it comes from:

  • AgentConfig.type defaults to "business-assistant" (src/backend/models.py); creation bakes it into the container as the trinity.agent-type Docker label + an AGENT_TYPE env var (src/backend/services/agent_service/crud.py). Rebuild fallbacks re-apply the default (src/backend/services/agent_service/lifecycle.py, deploy.py). The MCP create_agent tool advertises the same default.
  • The AGENT_TYPE env var is read by nothing under docker/base-image/ — dead weight.

Where it shows (the confusion):

  • src/frontend/src/components/PermissionsPanel.vue renders [business-assistant] next to every agent in the permission list.
  • src/frontend/src/components/InfoPanel.vue renders a type chip (fed by the /info endpoint reading the label).
  • src/backend/routers/public.py uses the label as a public link's display-name fallback — a visitor can see an agent titled "business-assistant".

What actually consumes it:

  • src/frontend/src/components/AgentTile.vue keys the skill-runner tile variant off type === 'skill-runner'; the runner is a fixed-name singleton (trinity-skill-runner), so the name is the sturdier key and the type check is replaceable.
  • Nothing keys on system-orchestrator (is_system covers the system agent everywhere).
  • src/backend/routers/avatar.py builds a name→type map but only uses it as an existence check.

Drive-by bug found while tracing: the agent-create audit entry logs getattr(config, "agent_type", None) (src/backend/routers/agents.py) but the field is named type, so it has always logged null.

Going forward, tags (including the reserved-namespace pattern established for org tags) are the platform's classification mechanism; a single-valued free-text type is strictly redundant.

Acceptance Criteria

  • AgentTile.vue keys the skill-runner variant off the fixed agent name instead of type (lands first; the enterprise provisioner's type= write becomes inert and is dropped in a private-repo follow-up).
  • The "business-assistant" default and all fallbacks are removed (models.py, lifecycle.py, deploy.py, MCP create_agent param); creation no longer writes the trinity.agent-type label or the AGENT_TYPE env var.
  • type is removed from API and MCP responses (AgentStatus, /api/agents, /api/agents/{name}/info, MCP list_agents/get_agent) — no deprecation window.
  • Display surfaces stop rendering type: PermissionsPanel.vue, InfoPanel.vue; routers/public.py falls back to the agent's display label / name, never the label — so the existing fleet's stale baked labels are never rendered anywhere (no forced recreates).
  • Permissions tab (Agent Detail): each agent row shows the canonical slug alongside the display name (replacing the removed [type] suffix; shown when the display label differs from the slug, so agents stay unambiguous without hovering for the tooltip).
  • template.yaml type: remains parseable but ignored (no compatibility check added; existing templates don't break).
  • The agent-create audit agent_type typo is fixed or the always-null field dropped.
  • User docs: a short retirement note added under docs/user-docs/ (agent type is retired; use tags for categorization), and existing references to agent type updated.
  • docs/memory/architecture.md reference to trinity.agent-type updated.

Technical Notes

  • Frontend self-heals for new agents (v-if on truthiness), but the display-side suppression is what cleans up the existing fleet — containers keep baked labels until recreate.
  • docker_service.py currently maps the label with an "unknown" fallback into AgentStatus.type; removing the field removes the fallback too.
  • Keep SYSTEM_AGENT_TYPE/runner constants only if the private modules still want them internally; nothing in OSS should read them.

Activity

  1. added
    priority-p2
    type-refactor
    theme-ui-ux
    complexity-medium
    status-ready
    on Aug 11, 2026
  2. removed
    status-ready
    on Aug 11, 2026
  3. vybe commented on Aug 11, 2026

    @vybe
    Contributor

    /claim

  4. added
    status-in-progress
    on Aug 11, 2026
  5. github-actions commented on Aug 11, 2026

    @github-actions

    Claimed by @vybe. Label status-in-progress added.

    Next steps:

    1. Create branch: feature/2104-<short-slug>
    2. Implement the feature
    3. Open a PR with Fixes #2104
  6. added
    status-in-dev
    and removed
    status-in-progress
    on Aug 12, 2026
  7. removed
    status-in-dev
    on Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

complexity-mediumpriority-p2theme-ui-uxtype-refactor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions