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
- 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).
- Remove
AgentRelay.spawnPersona() from relay.ts (line 994-1086).
- Remove
@agentworkforce/persona-kit as a dependency of @agent-relay/sdk.
- Remove persona-related re-exports from the SDK public surface.
- 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
Problem
Workforce personas are a first-class concept in
@agent-relay/sdktoday:packages/sdk/src/personas.ts(~350 lines) is a facade over@agentworkforce/persona-kitAgentRelay.spawnPersona()(relay.ts:994) is a public method alongsidespawnPty@agentworkforce/persona-kitPersonaSpec,ResolvedPersona,PersonaSpawnPlan, etc.) are re-exported from the SDKresolvePersonaexplicitly 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 viarelay.spawnPty({ cli: 'npx agentworkforce persona run foobar', ... })orrelay.spawnHeadless({ ... }).Scope
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).AgentRelay.spawnPersona()fromrelay.ts(line 994-1086).@agentworkforce/persona-kitas a dependency of@agent-relay/sdk.Migration
Persona side effects (skills install, sidecar writes, mount policy) need to happen somewhere — they're not free to drop. Options:
finallyfor cleanup. Forces workforce to get cleanup-on-SIGKILL right.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
spawnHeadlessonAgentRelay(siblings tospawnPty)