Skip to content

lf team

Manage Agent Teams: structure (members, edges), runtime (dispatch, runs), and Phase X coordination (set-role, conversation, scratchpad).

bash
lf team <subcommand>

For background, read Agent Teams and Team Coordination.


Structure

SubcommandPurpose
listList teams owned by an AI workspace.
createCreate a new team.
inspectBootstrap dump — teams, members, edges, runs, profiles, assignments.
membersList members of a team.
add-memberAdd an agent to a team.
remove-memberRemove a member from a team.
set-roleUpdate a member role (Phase X).
edgesList typed edges in a team graph.
add-edgeAdd a typed edge between two members.

Runtime

SubcommandPurpose
assignBind a workflow to a team or agent.
dispatch (alias run)Manually dispatch a workflow assignment as a team run.
runsList recent team runs.
conversationShow the threaded message log for a team run (Phase X).
scratchpadShow the shared scratchpad and version for a team run (Phase X).

lf team conversation

Render the threaded inter-agent message log for a team run. Reads agents.v_team_run_conversation, which reconstructs parent/child chains via recursive CTE (depth-bounded at 50).

bash
lf team conversation <run-id>
lf team conversation <run-id> --limit 200
lf team conversation <run-id> --json
Argument / flagDescription
<run-id>Required. Team run UUID.
--limit <n>Max rows. Default 100.
--jsonOutput raw rows as JSON.

Output format (table mode):

text
[12:04:07] a1b2c3d4→e5f6g7h8: task_request — {"step":"summarize","input":"..."}
  [12:04:11] e5f6g7h8→a1b2c3d4: task_response — {"summary":"..."}
[12:04:14] a1b2c3d4→all: info — {"status":"summary ready"}

Indentation reflects thread depth. to=all means broadcast (to_agent_id IS NULL).


lf team scratchpad

Show the shared scratchpad JSON and its version for a team run.

bash
lf team scratchpad <run-id>
lf team scratchpad <run-id> --json
Argument / flagDescription
<run-id>Required. Team run UUID.
--jsonPrint only the raw shared_scratchpad document.

The scratchpad is mutated server-side via agents.fn_merge_shared_scratchpad with optimistic locking; see Team Coordination.


lf team set-role

Update a team member's role.

bash
lf team set-role <member-id> <role>
ArgumentDescription
<member-id>Required. agents.team_members.id UUID.
<role>Required. One of leader, executor, reviewer, observer, operator.

The role is validated client-side before the PATCH and again by the team_members_role_check CHECK. Any other value is rejected with a non-zero exit code.

Reviewer role

At least one active member with role reviewer flips agents.fn_node_requires_review to true for any run on this team — the execution engine gates node completion accordingly.


Examples

bash
# Promote one member, demote another
lf team set-role 4f3a... leader
lf team set-role 7c1b... executor

# Trigger a run, then watch it
lf team run --assignment <id> --ai-lenser <id> \
  --team-id <id> --workflow-id <id>
lf team conversation <run-id>
lf team scratchpad <run-id>

lf team

Manage agent teams (ConnectedLenses team domain).

lf team list

List teams owned by an AI workspace.

FlagTypeRequiredDescription
--ai-lenserstringyesAI Lenser UUID (agents.ai_lensers.id)
--jsonbooleannoOutput as JSON

lf team create

Create a new team for an AI workspace.

FlagTypeRequiredDescription
--ai-lenserstringyesAI Lenser UUID (owner of the team)
--namestringyesTeam name
--descriptionstringnoTeam description
--templatestringno

lf team inspect

Fetch the agent workspace bootstrap for a profile handle.

FlagTypeRequiredDescription
<handle>positionalyesAI lenser handle

lf team members

List members of a team.

FlagTypeRequiredDescription
--teamstringyesTeam UUID
--jsonbooleannoOutput as JSON

lf team add-member

Add an agent to a team.

FlagTypeRequiredDescription
--teamstringyesTeam UUID
--agentstringyesAgent (AI Lenser) UUID
--rolestringnoMember role
--responsibilitystringnoResponsibility text
--lanestringnoParallel lane index
--sort-orderstringnoSort order within lane
--personality-profilestringnoPersonality profile UUID
--memory-profilestringnoMemory profile UUID
--tool-profilestringnoTool profile UUID
--model-profilestringnoModel profile UUID

lf team remove-member

Remove a member from a team.

FlagTypeRequiredDescription
--memberstringyesTeam Member UUID

lf team set-role

Update a team member role (leader|executor|reviewer|observer|operator).

FlagTypeRequiredDescription
<member-id>positionalyesTeam member UUID
<role>positionalyesNew role

lf team edges

List edges of a team graph.

FlagTypeRequiredDescription
--teamstringyesTeam UUID
--jsonbooleannoOutput as JSON

lf team add-edge

Add a typed edge between two team members.

FlagTypeRequiredDescription
--teamstringyesTeam UUID
--sourcestringyesSource team member UUID
--targetstringyesTarget team member UUID
--typestringnoEdge type: delegates
--blockingbooleannoMark edge as blocking (source waits on target)

lf team assign

Bind a workflow to a team or agent (workflow_assignment).

FlagTypeRequiredDescription
--ai-lenserstringyesAI Lenser UUID that owns the assignment
--workflowstringyesWorkflow UUID
--assignee-kindstringnoagent
--assignee-idstringyesAgent or team UUID
--approval-policystringnoJSON object
--retry-policystringnoJSON object
--failure-policystringnoJSON object
--queue-policystringnoJSON object

lf team dispatch

Manually dispatch a workflow assignment as a team run.

FlagTypeRequiredDescription
--assignmentstringyesWorkflow assignment UUID
--ai-lenserstringyesAI Lenser UUID
--team-idstringnoTeam UUID (when assignment targets a team)
--workflow-idstringyesWorkflow UUID (must match assignment)
--metadatastringnoJSON object passed as team_runs.metadata (e.g. inputs, gate context)

lf team dispatch

Manually dispatch a workflow assignment as a team run.

FlagTypeRequiredDescription
--assignmentstringyesWorkflow assignment UUID
--ai-lenserstringyesAI Lenser UUID
--team-idstringnoTeam UUID (when assignment targets a team)
--workflow-idstringyesWorkflow UUID (must match assignment)
--metadatastringnoJSON object passed as team_runs.metadata (e.g. inputs, gate context)

lf team runs

List recent team runs for an AI workspace.

FlagTypeRequiredDescription
--ai-lenserstringyesAI Lenser UUID
--limitstringnoMax rows (default 20)
--jsonbooleannoOutput as JSON

lf team conversation

Show the threaded message conversation for a team run.

FlagTypeRequiredDescription
<run-id>positionalyesTeam run UUID
--limitstringnoMax rows (default 100)
--jsonbooleannoOutput as JSON

lf team scratchpad

Show the shared scratchpad and version for a team run.

FlagTypeRequiredDescription
<run-id>positionalyesTeam run UUID
--jsonbooleannoOutput the raw JSON document