Repository navigation
Description
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 orchestratorPromptContext
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 threadspawn_worker_thread— persisted worker thread + compact reference back to parentArchetypeDelegationTool— collapsed tools likedelegate_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+teamsarray (alongside profiles in one file or siblingagent_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_idin 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
generalteam whose lead is the masterdefaultprofile (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:
- Master orchestrator (
is_master) — any team (subject to optional global allowlist), or implicit default team whenteam_idomitted. - 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):
- Resolve team descriptor; reject if
lead_profile_idmissing or not inmember_profile_ids - Run as team lead profile (
PersonalityContext::from_profile) - Apply mode tool filter for lead and all member spawns
- Lead distributes to members via
delegate_to_personality/spawn_worker_threadas today - Optional
review_loopsynthesis (e.g.reviewprofile) - Return consolidated output upstream; optional
output_channelonly whenmode = 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 duplicatingAgentProfilefields - Every team has a required
lead_profile_idthat is a member ofmember_profile_ids -
default_team_idpersisted; omittingteam_idondelegate_to_teamuses it (with safe bootstrap) -
mode:advice_onlyteams cannot run side-effecting tools;executeteams can (within policy) -
may_delegate_to_teams: only team leads (and master orchestrator) may calldelegate_to_teamfor allowlisted teams; empty list = no cross-team calls -
delegate_to_teamcomposesdelegate_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
- Superseded feature request: Feature Request : Named team hierarchy with Team Lead role and siloed working memory #1838
- Core:
src/openhuman/agent/profiles.rs,personality_paths.rs,tools/delegate_to_personality.rs - Orchestration:
src/openhuman/agent_orchestration/tools/{spawn_subagent,spawn_worker_thread,archetype_delegation}.rs - Tests:
tests/personality_e2e.rs - App:
app/src/store/agentProfileSlice.ts,app/src/types/agentProfile.ts
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
senamakel commentedon Oct 9, 2026
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.
M3gA-Mind commentedon Nov 16, 2026
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.
M3gA-Mind commentedon Nov 20, 2026
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.