Repository navigation
Description
Summary
Today an agent's name is its identifier — slug-cased, lowercase, no spaces (e.g. tom-marketing-operations-agent). Users want to call it TOM — Marketing operations in the UI. The current create / rename flows reject non-slug input.
This is a feature spike, not a fix. Decide whether to add a separate display_name field, or to relax slug rules (and pay the schema/Docker cost).
Context
Reported during a UI/UX review session. The slug is load-bearing — per Invariant #1 / schema in docs/memory/architecture.md, agent_name is the PK across ~20 tables and is used as a Docker container label (trinity.agent-name), volume name (agent-{name}-public), and route segment (/api/agents/{name}/...). Changing the slug rules globally is high blast-radius.
Cheapest cleanest path is almost certainly: keep the slug as today, add an optional display_name TEXT column to agent_ownership, render it where humans look (avatar caption, agent list, header), keep the slug everywhere machines look (URLs, MCP, Docker labels). Doable but worth a design pass before code.
Open Questions
- Add
display_name(UI-only) and keep the slug, or actually relax slug rules? - If
display_name: who can set it (owner only? collaborators?), what's the max length, unicode handling, profanity / abuse policy - How does it interact with
rename_agentflow (Soft-delete all entities + configurable data retention policy #834 cascade rename)? - Does the MCP tool surface need it (
get_agent_info,list_agents)? External orchestrators? - Where exactly does it render — agent list, agent header, avatar caption, anywhere else?
- Search / disambiguation: today users type the slug to find an agent — does display name need to be searchable?
Acceptance Criteria
- Decision recorded (issue comment) on display_name approach vs slug relaxation
- If display_name approach: short design doc (issue comment is fine) covering schema, API, MCP surface, render sites
- Implementation broken into follow-up issues — this spike does not ship code
- Update
docs/memory/architecture.mdschema section if the decision lands
Technical Notes
- Constraints from Invariant Fix: Add missing Docker labels to system agent container #1 (
docs/memory/architecture.md):agent_nameis PK across many tables, used as Docker label, volume name, route segment - Existing rename flow:
routers/agent_rename.py,services/agent_service/rename, manual cascade across 17+ tables - Sites that probably need the display name if we add one: Agent list view, Agent detail header, Agent Avatar dialog, agent cards in collaboration graph, system agent picker
- MCP tools that may need to surface it:
get_agent,get_agent_info,list_agents(src/mcp-server/src/tools/agents.ts)
Activity
vybe commentedon Jul 15, 2026
Decision: add
display_name, keep the slugApproach chosen: optional
display_namecolumn onagent_ownership. Slug rules are NOT relaxed.The slug stays the identity everywhere machines look (PK across ~19 tables,
trinity.agent-nameDocker label,agent-{name}-*volume names, route segments, MCP/API addressing).display_nameis additive, owner-editable, and UI-only.Four constraints set the shape of this:
display_nameis set, the slug remains visible — the friendly name never replaces the slug, so it's always clear which agent you're looking at.This is not a greenfield field — a partial version already ships
A friendly name already renders on three surfaces today, sourced from
template.yaml:OverviewPanel.vue:276—info?.display_name || info?.name || agent.nameInfoPanel.vue:31public.py:222-245falls back through template info →trinity.agent-typelabel → slugThat existing path has three defects this issue really exists to fix:
template.yamlinside the agent's own repo.public.pyonly fetches it whenagent_available, via a live HTTP call into the container.Two more surfaces are already hand-rolling a friendly name because the column doesn't exist:
public.py:222(label-faking) andvoice.py:435(agent_name.replace("-", " ").title()).Precedence (resolves the name collision):
get_agent_infoalready returns adisplay_namemeaning the template's name. We keep the key and let the DB value win wherever both exist — one concept with a fallback chain, not two competing fields. This needs an explicit note inarchitecture.mdand in the MCP tool descriptions, sinceGET /api/agentsandGET /api/agents/{name}/infowill both carry the key from different sources.Render rule — consistent by intent, not by literal uniformity
~67 sites render an agent name. Only 9 are roomy enough for a two-line treatment; 30+ are tight single-string contexts where a second line cannot physically go. So "consistent" is defined per surface class:
AgentHeader:73,OverviewPanel:276,PortalBriefing:4,PortalSidebar:63,PortalConversation:36,PortalChat:11,ClientPortal:63,MobileAdmin:87,AgentTile:21(reuse.t-repo)Display (slug)<option>dropdowns —ExecutionsPanel:73,ReportsPanelFleet:27,QueueList:35,NotificationsPanel:15,FileManager:36,Settings:1285RoleMatrix:78(100px column)Agents.vue:1119,Settings.vue:3968,PortalChat:52,PortalFilesPanel:16,56Idiom to copy — already in the codebase at
SharingPanel.vue:247-248, which promotes the identity to primary when there's no friendly name so there's never a dangling empty line:Cross-cutting risks (none of these are in the original issue)
AgentAvatarhashes the name into its gradient (AgentAvatar.vue:72-88) and derives initials from it. Passingdisplay_namemakes"TOM — Marketing operations"yield initialsTMand silently recolors every agent's avatar the moment a display name is set — across 16 call sites, plus a duplicate implementation atClientPortal.vue:60. Decision: keep passing the slug toAgentAvatarso identity color stays stable.data.labelis both display text and API key in the collaboration graph (AgentNode.vue:444,454,466use it forrouter.push/toggleAutonomy/toggleAgentRunning). Keeplabel= slug; add a sibling field instores/network.js:511,545.agentNames/availableAgentsinExecutionsPanel,ReportsPanelFleet,QueueList,NotificationsPanelare arrays of strings and need a store-shape change (or a slug→display resolver) before they can render both names.Agents.vue:834filters onagent.nameonly. Must matchdisplay_nametoo, or users type "TOM" and get nothing. Sort (Agents.vue:101-104, "Name (A-Z)") needs a stated key.agent_namefrom the API, not the agents store — those payloads need the display name added, or a frontend resolver.display_namesits onagent_ownership, which is not inAGENT_REFS; the cascade only re-keys theagent_namecolumn, so the friendly name survives a slug rename untouched. That's the intended semantic and should be stated in the migration docstring.CreateAgentModal.vue:15-22is the only name input (labelled "Agent Name", placeholder is a slug);AgentHeader.vue:58-71is the only rename input and edits the slug. Both need a second field and a relabel to "Slug"/"Identifier".Backend/MCP change surface — small and cheap
GET /api/agentsreturns enriched plain dicts (noresponse_model);list_all_agents_fastsupplies Docker-label identity andget_accessible_agentsmerges DB fields via one batched query for the whole fleet (get_all_agent_metadata). Sodisplay_nameis +1 column in an existing SELECT, +0 queries. Exact precedent:mcp_exposed(#846) is a DB column onagent_ownershipalready surfaced through this path.db/schema.py:68db/tables.py:71db/migrations.py(+fn, +registry)migrations/versions/0024_agent_ownership_display_name.py(head is0023_agent_sync_state_gc_signals)db/agent_settings/metadata.py:330-400services/agent_service/helpers.py:247+ orphan branch ~220src/mcp-server/src/types.ts:3-15— adddisplay_name?: stringsrc/mcp-server/src/tools/agents.tslist_agents/get_agent/get_agent_infoare thin pass-throughs thatJSON.stringifythe backend payload verbatim (list_agentsonly touches.name, to filter by permission), so both names flow to MCP automatically once the field is onGET /api/agents.Do NOT add
display_nametoAgentStatus/list_all_agents_fast. That's a hot labels-only path (startup, telemetry, ops ×7, monitoring); adding it there forces either a per-agent DB lookup or a new Docker label — and a mutable friendly name in a Docker label cuts against Invariant #11's slug-as-identity. Docker stays authoritative forname; the DB ownsdisplay_name.Sizing
complexity-medium(5-8 pts) is wrong for the whole of this — ~67 render sites, a store-shape change, and a dual-track migration. Split into the five follow-ups below (sized individually) rather than re-sizing this spike.Follow-ups (created, all
status-ready, OSS-core / ungated)types.ts, tool descriptions. Ships the data end-to-end with no UI. Blocks the other four.PUT /api/agents/{name}/display-name(owner-only, max length, unicode/trim policy), plus the create + rename inputs and the "Slug"/"Identifier" relabel.SharingPanelidiom; retire the template-derived fallback onOverviewPanel/InfoPanel/public chat in favor of the precedence chain.Display (slug)concat, search matches both fields, stated sort key.Remaining open questions
feat(agents): render the display label across remaining surfaces (#1643…
feat(agents): agent display name in pickers, search, and sort (#1642) (…
fix(ui): Dashboard Timeline tile leads with the display name, slug be…
vybe commentedon Jul 20, 2026
Groom (2026-07-20): spike resolved — the decision was made and implemented.
Outcome: a presentation-only
agent_ownership.display_label; the slug remains the identity every route, container, volume, MCP key and A2A card keys on. Shipped OSS-core via trinity-enterprise#181 (PR #1676), then #1687 / #1699 / #1700 across the render surfaces.Follow-ups 1/5 (#1639), 3/5 (#1641), 4/5 (#1642) and 5/5 (#1643) are
status-in-dev. The only surviving gap is #1640, narrowed to accepting a display label at creation time. Closing the spike.feat(agents): set display label at creation + harden the label contra…