Skip to content

Remove personas from @agent-relay/sdk #997

Description

@willwashburn

Problem

Workforce personas are a first-class concept in @agent-relay/sdk today:

  • packages/sdk/src/personas.ts (~350 lines) is a facade over @agentworkforce/persona-kit
  • AgentRelay.spawnPersona() (relay.ts:994) is a public method alongside spawnPty
  • The SDK has a hard dependency on @agentworkforce/persona-kit
  • Persona types (PersonaSpec, ResolvedPersona, PersonaSpawnPlan, etc.) are re-exported from the SDK
  • resolvePersona explicitly rejects non-interactive personas: "relay only spawns interactive personas" (relay.ts:281-286)

This couples the SDK to one specific recipe system. Anyone using relay must install persona-kit even if they never touch personas, and any alternative recipe system (presets, team templates, YAML configs) has to work around the persona-shaped hole in the SDK.

Goal

The SDK should know nothing about personas. A persona becomes "just a CLI command" — workforce ships npx agentworkforce persona run <id> (or similar), and callers spawn it like any other CLI via relay.spawnPty({ cli: 'npx agentworkforce persona run foobar', ... }) or relay.spawnHeadless({ ... }).

Scope

  1. Move persona loading/resolution/execution out of packages/sdk/src/personas.ts — either delete or move to a separate package owned by workforce (e.g., @agentworkforce/relay-personas, or fold into the workforce CLI itself).
  2. Remove AgentRelay.spawnPersona() from relay.ts (line 994-1086).
  3. Remove @agentworkforce/persona-kit as a dependency of @agent-relay/sdk.
  4. Remove persona-related re-exports from the SDK public surface.
  5. Remove persona-related logic from spawn dry-run / plan paths (relay.ts:1094+ and similar callers).

Migration

Persona side effects (skills install, sidecar writes, mount policy) need to happen somewhere — they're not free to drop. Options:

  • CLI-owned: the workforce CLI handles side effects in-process, with signal handlers / finally for cleanup. Forces workforce to get cleanup-on-SIGKILL right.
  • Resolver pattern: workforce CLI prints spawn config to stdout, caller parses and calls relay.spawnPty/spawnHeadless. Side effects still need an owner.

This depends on the broker-owned headless mode landing first (see related issue) — otherwise headless personas have no equivalent CLI invocation.

Related

  • Surface spawnHeadless on AgentRelay (siblings to spawnPty)
  • Implement broker-owned host ownership for headless app-server harnesses

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions