Skip to content

Design: Named agent teams via personalities + orchestration (supersedes #1838) #3041

Closed as not planned

Description

@senamakel

Supersedes

Closes the design direction in #1838 (Named team hierarchy with Team Lead role and siloed working memory). That issue proposed a parallel [[teams]] block in config.toml plus a new delegate_to_team runtime. This issue reframes the same product goal on top of infrastructure that already exists (agent profiles / personalities, orchestration tools, thread binding) and calls out the gaps we should close first.


Problem (unchanged intent)

Users running multi-agent swarms want named, reusable teams (e.g. Research, Writing, Code, QA) with:

  • A designated team lead profile that coordinates members and returns a consolidated result upstream
  • A clear advice-only vs execute posture per team (recommendations vs side-effecting work)
  • Siloed working memory between parallel teams (while keeping long-term / Memory Tree context appropriately shared)
  • Optional output routing to a channel when work completes
  • Optional cross-team delegation so one team can call another without re-specifying members in a SKILL

Re-specifying team structure inside every SKILL.md is brittle; we want a declarative, runtime-enforced pattern.


What we already have (do not duplicate)

Agent profiles / personalities (AgentProfile)

Persisted in <workspace>/agent_profiles.json, managed via RPC (profiles_list, profile_select, profile_upsert, profile_delete) and the app agentProfileSlice / Conversations profile picker.

Each profile already carries the knobs #1838 wanted as separate team fields:

#1838 concept Existing field / behavior
Member role / archetype agent_id → AgentDefinitionRegistry (orchestrator, researcher, critic, …)
Per-agent model model_override, temperature
Tool / skill surface allowed_tools + agent definition tool list
Identity / values soul_md, soul_md_path, personalities/{id}/MEMORY.md
Integration access composio_integrations allowlist
Working-memory silo memory_dir_suffix → memory, memory_tree, session_raw subdirs via personality_paths
Orchestrator vs specialist is_master (only default is master today)

Built-in profiles today: default (master orchestrator), research, planner, review.

Tests: tests/personality_e2e.rs (profile lifecycle, memory isolation plumbing, roster prompt section, thread personality_id binding, integration filtering).

Cross-personality delegation

  • Tool: delegate_to_personality (src/openhuman/agent/tools/delegate_to_personality.rs)
  • Master-only gate; injects personality SOUL/MEMORY preamble; runs child via run_subagent
  • Prompt surface: PersonalityRosterSection + roster entries on orchestrator PromptContext

Known gaps (must be Phase 0): inline TODO in delegate_to_personality — personality-scoped UnifiedMemory and composio_integrations filtering are not yet wired through SubagentRunOptions; delegation is prompt-level only today.

Agent-registry delegation (single specialist, not “team”)

  • spawn_subagent — inline sub-agent in parent thread
  • spawn_worker_thread — persisted worker thread + compact reference back to parent
  • ArchetypeDelegationTool — collapsed tools like delegate_to_integrations_agent, research, plan, …

These cover one specialist hand-off, not a named multi-member team with a lead.

Thread ↔ personality binding

ConversationStore threads carry optional personality_id (see personality e2e). This is the right anchor for “this conversation runs as personality X” without a second identity system.

Channels / output delivery

Channel connections and runtime dispatch already exist; team output_channel should reference an existing channel target, not invent a parallel delivery bus.


Proposed design (compose, don’t fork)

1. Team descriptor (grouping over profiles)

A team references existing AgentProfile.id values. The team lead is always an explicit profile on the team — not inferred from member_profile_ids[0].

{
  "default_team_id": "general",
  "teams": [
    {
      "id": "general",
      "name": "General",
      "lead_profile_id": "default",
      "member_profile_ids": ["default", "planner"],
      "mode": "execute",
      "may_delegate_to_teams": ["research", "review"],
      "silo_working_memory": true,
      "review_loop": false,
      "output_channel": null
    },
    {
      "id": "research",
      "name": "Research Team",
      "lead_profile_id": "research",
      "member_profile_ids": ["research", "source_verifier", "report_writer"],
      "mode": "execute",
      "may_delegate_to_teams": [],
      "silo_working_memory": true,
      "review_loop": true,
      "output_channel": "mattermost://research-team"
    },
    {
      "id": "strategy",
      "name": "Strategy Advisory",
      "lead_profile_id": "planner",
      "member_profile_ids": ["planner", "review"],
      "mode": "advice_only",
      "may_delegate_to_teams": ["research"],
      "silo_working_memory": true,
      "review_loop": false,
      "output_channel": null
    }
  ]
}
Field Required Meaning
id yes Stable team identifier for tools and RPC
name yes Display label
lead_profile_id yes Team lead — the profile that owns planning, member dispatch, synthesis, and upstream response. Must be in member_profile_ids
member_profile_ids yes Non-empty list of profile IDs on this team
mode yes execute or advice_only (see below)
may_delegate_to_teams no (default []) Allowlist of other team ids this team’s lead may call via delegate_to_team. Empty = no cross-team calls
silo_working_memory no (default true) Enforce scratch-memory isolation vs other teams
review_loop no Lead runs a review/synthesis pass before returning
output_channel no Auto-deliver final result when set

Storage (pick one in implementation PR):

  • A. Extend workspace team state with top-level default_team_id + teams array (alongside profiles in one file or sibling agent_teams.json), or
  • B. Dedicated <workspace>/agent_teams.json + RPC (teams_list, teams_upsert, teams_set_default, …).

Non-goals: Duplicating archetype/model/skills on the team record when those fields already live on AgentProfile.

2. Default team

  • Persist default_team_id in team state (see schema above).
  • When the master orchestrator (or UI) delegates without naming a team, runtime resolves default_team_id.
  • Bootstrap: if unset, fall back to a built-in general team whose lead is the master default profile (same as today’s orchestrator path).
  • RPC/UI: expose set default team so users can change which team handles ambient work without editing every workflow.

3. Team mode: advice_only vs execute

Mode Lead + members may Lead + members may not (runtime-enforced)
advice_only Read tools, memory, search, analysis, delegate_to_personality / internal member dispatch that stays read-only Tools with external_effect / write / install / destructive classes; channel publish; file writes; spawn_worker_thread that persists side effects
execute Full tool surface allowed by each member profile’s allowed_tools + agent definition + security policy — (still subject to global SecurityPolicy and approval gate)
  • Mode is stored on the team and injected into the lead’s run preamble + tool filter for the whole delegation tree spawned under that team.
  • Upstream callers choose team explicitly or via default; they do not pass mode per call (mode is declarative on the team).

4. delegate_to_team tool

Single entry point for team work. Callable by:

  1. Master orchestrator (is_master) — any team (subject to optional global allowlist), or implicit default team when team_id omitted.
  2. Team lead session — only if caller’s active context is the lead profile for team T, and only teams listed in T.may_delegate_to_teams (prevents member profiles or arbitrary sub-agents from spawning cross-team work).

Request shape:

{
  "team_id": "research",
  "task": "Analyse competitive landscape for X",
  "context": "optional caller context blob"
}

Omitting team_id resolves default_team_id.

Execution recipe (unchanged core, mode-aware):

  1. Resolve team descriptor; reject if lead_profile_id missing or not in member_profile_ids
  2. Run as team lead profile (PersonalityContext::from_profile)
  3. Apply mode tool filter for lead and all member spawns
  4. Lead distributes to members via delegate_to_personality / spawn_worker_thread as today
  5. Optional review_loop synthesis (e.g. review profile)
  6. Return consolidated output upstream; optional output_channel only when mode = execute

Cross-team call: when lead of team A invokes delegate_to_team with team_id: B, runtime checks B ∈ A.may_delegate_to_teams, then runs B’s lead as a nested delegation (depth cap TBD in implementation — recommend max 2 team hops, same spirit as worker-thread depth). Nested team inherits its own mode and silo; parent receives B’s synthesized result only.

5. Silo enforcement

#1838’s silo = true maps to enforcing memory_dir_suffix / UnifiedMemory::new_with_memory_dir in subagent and worker-thread runners, plus policy that in-flight session state for team A is invisible to team B.

Shared Memory Tree remains namespace-global; document which namespaces are team-private vs org-shared (align with memory namespace work elsewhere).

6. UI

Extend existing Agents / profiles surfaces (#1838 dashboard mockup as layout inspiration):

  • Team list, default team selector, member + lead profile pickers (lead required, must be a member)
  • Mode toggle: Advice only / Execute
  • May delegate to teams multi-select (other team IDs)
  • Per-profile memory suffix + integration allowlist (read-only in team view)
  • Show which contexts expose delegate_to_team (master + eligible team leads)

7. Relation to model council (#2890 on main)

Model council solves multi-model deliberation on one question. Teams solve multi-personality / multi-role parallel work with siloed scratch memory. They can coexist; a team lead might optionally invoke council for a synthesis step — out of scope unless explicitly requested.


Phased delivery

Phase Scope Exit criteria
0 Wire delegate_to_personality memory + Composio isolation through SubagentRunOptions personality e2e proves separate SQLite dirs and filtered integrations
1 Team schema: lead_profile_id, mode, default_team_id, may_delegate_to_teams + delegate_to_team JSON-RPC e2e: master delegates to default + named team; advice_only team rejects write tools
1b Cross-team delegation + depth cap Team A with may_delegate_to_teams: ["research"] can call research; team without allowlist cannot
2 Silo policy for parallel team runs Two execute teams in parallel cannot read each other’s in-flight scratch state
3 App UI: teams CRUD, default team, mode, cross-team allowlist Vitest coverage for team API/slice
4 Optional output_channel auto-delivery (execute teams only) Channel mock/RPC e2e

Acceptance criteria

  • No parallel [[teams]] TOML block duplicating AgentProfile fields
  • Every team has a required lead_profile_id that is a member of member_profile_ids
  • default_team_id persisted; omitting team_id on delegate_to_team uses it (with safe bootstrap)
  • mode: advice_only teams cannot run side-effecting tools; execute teams can (within policy)
  • may_delegate_to_teams: only team leads (and master orchestrator) may call delegate_to_team for allowlisted teams; empty list = no cross-team calls
  • delegate_to_team composes delegate_to_personality / spawn_worker_thread / registry agents — not a parallel agent type
  • Working-memory silo via memory_dir_suffix (Phase 0 + 2)
  • Memory Tree access per documented namespace policy
  • Master orchestrator gate preserved for top-level delegation (is_master)
  • Diff coverage ≥ 80% on changed lines

References

Activity

  1. added theissue type on Aug 9, 2026
  2. added
    triage: needs-opinion
    on Oct 9, 2026
  3. senamakel commented on Oct 9, 2026

    @senamakel
    MemberAuthor

    Triage: needs opinion — “Design: Named agent teams via personalities + orchestration (supersedes #1838)” needs a maintainer decision on product scope/priority or fresh reproduction evidence before its status can be settled. Please advise whether to pursue, narrow, or close it.

  4. added
    source: team
    on Oct 9, 2026
  5. M3gA-Mind commented on Nov 16, 2026

    @M3gA-Mind
    Collaborator

    Thanks for the design. Since it was written, the pieces it builds on have changed: the agent-teams runtime was removed in #8319 and the old personality runtime in #6348, as the agent runtime moved to TinyAgents. So the plan can't be carried out as written.

    Maintainers: are named, reusable agent teams still a goal? If yes, this needs a fresh design on top of the current TinyAgents host. If not, we'll close it.

  6. M3gA-Mind commented on Nov 20, 2026

    @M3gA-Mind
    Collaborator

    Closing as not planned.

    This design builds named agent teams on two things that have since been removed from this repository: agent teams (#8319) and the personality runtime (#6348). The agent runtime now lives in TinyAgents, so the design as written no longer has the pieces it composes.

    If named teams are wanted again, they would need a fresh design against the TinyAgents runtime; a new issue there, linked from here, is the place to start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementfeature-requestsource: teamtriage: needs-opinion

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions