Skip to content

F1: Add unique agent handles for stable delegation#20

Merged
obaid merged 2 commits intomainfrom
feature/agent-handles
Apr 9, 2026
Merged

F1: Add unique agent handles for stable delegation#20
obaid merged 2 commits intomainfrom
feature/agent-handles

Conversation

@obaid
Copy link
Copy Markdown
Contributor

@obaid obaid commented Apr 9, 2026

Summary

  • Add handle column to agents (auto-generated from name via Str::slug())
  • Unique per team, immutable, with collision suffix (-2, -3)
  • DaemonController delegation lookup prefers handle, falls back to name
  • provisiond uses @handle in delegation syntax
  • Org chart displays @handle next to agent names

Test plan

  • Create agent → verify handle auto-generated
  • Create two agents with same name → verify suffix added
  • Run migration on prod
  • Backfill handles for existing agents
  • Verify provisiond prompt includes @handle delegation syntax

obaid added 2 commits April 8, 2026 16:45
Each agent gets an auto-generated handle (e.g., @radar, @Ink) derived
from their name via Str::slug(). Handles are unique per team, immutable,
and used as the primary key for delegation lookups (falling back to name
for backward compatibility).

Changes:
- Add handle column to agents table (unique per team)
- Auto-generate handle on Agent::creating model event with collision suffix
- DaemonController: include handle in work queue response, use handle-first
  lookup for delegation
- provisiond: use @handle in prompt delegation syntax, strip @ in parser
- Frontend: add handle to Agent type, display @handle in org chart
Tests cover handle creation from name, slugification, per-team collision
suffixes, cross-team uniqueness, explicit handle preservation, daemon
work-queue response inclusion, handle-based delegation, and name fallback.
@obaid obaid merged commit f2c6f11 into main Apr 9, 2026
1 of 2 checks passed
@obaid obaid deleted the feature/agent-handles branch April 9, 2026 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant