Nenjo Docs
Agents

Councils

Multi-agent councils, delegation strategies, and council members.

A council is a multi-agent group where a leader agent coordinates work among member agents. Councils enable structured collaboration patterns like task decomposition, parallel execution, and consensus-based decision making.

Data Model

CouncilRow

FieldTypeDescription
idUUIDUnique identifier
namestringCouncil name
descriptionstring or nullHuman-readable description
leader_role_assignment_idUUIDRole assignment of the leader agent
delegation_strategystringHow work is distributed to members
configJSONBAdditional council configuration
created_byUUIDUser who created the council
created_attimestampCreation time
updated_attimestampLast update time

CouncilMemberRow

FieldTypeDescription
idUUIDMember record ID
council_idUUIDParent council
role_assignment_idUUIDRole assignment for this member
priorityintegerPriority order (lower = higher priority)
configJSONBMember-specific configuration
created_attimestampCreation time

Role Assignment Summary

Each leader and member includes a RoleAssignmentSummary with:

FieldTypeDescription
idUUIDAssignment ID
role_idUUIDThe role
role_namestringRole name
role_descriptionstring or nullRole description
agent_idUUIDThe agent
agent_namestringAgent name
agent_modelstringLLM model identifier
agent_model_providerstringModel provider

Delegation Strategies

The delegation_strategy determines how the leader distributes work to members:

StrategyDescription
dynamicLeader decides at runtime which member(s) to delegate to based on the task
broadcastAll members receive the same task and work in parallel
decomposeLeader breaks the task into subtasks and assigns each to a specific member
round_robinTasks are distributed to members in rotation
voteMembers each provide a response; the leader synthesizes or selects the best

The default strategy is decompose.

Constraints

  • A council must have at least one member
  • The leader cannot also be a member
  • Each role assignment can appear at most once in a council's member list
  • All role assignments (leader and members) must exist and be valid
  • Deleting a council cascades to its members

Council Steps in Pipelines

Councils can be used as steps in pipelines. A pipeline step with step_type: "council" delegates execution to a council, where the leader coordinates the members according to the delegation strategy. The council step completes when the leader produces a final result.

API Endpoints

All endpoints are under /api/v1/councils and require authentication.

Council CRUD

# List all councils
curl -H "Authorization: Bearer $TOKEN" \
  https://your-instance.com/api/v1/councils

# Get a council with leader and member details
curl -H "Authorization: Bearer $TOKEN" \
  https://your-instance.com/api/v1/councils/:id

# Create a council
curl -X POST -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Code Review Board",
    "description": "Reviews PRs with multiple perspectives",
    "leader_role_assignment_id": "...",
    "delegation_strategy": "vote",
    "members": [
      {"role_assignment_id": "...", "priority": 1},
      {"role_assignment_id": "...", "priority": 2}
    ]
  }' \
  https://your-instance.com/api/v1/councils

# Update a council
curl -X PATCH -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"delegation_strategy": "broadcast"}' \
  https://your-instance.com/api/v1/councils/:id

# Delete a council
curl -X DELETE -H "Authorization: Bearer $TOKEN" \
  https://your-instance.com/api/v1/councils/:id

Member Management

# Add a member to a council
curl -X POST -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"role_assignment_id": "...", "priority": 3}' \
  https://your-instance.com/api/v1/councils/:id/members

# Update a member
curl -X PATCH -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"priority": 1}' \
  https://your-instance.com/api/v1/councils/:id/members/:member_id

# Remove a member
curl -X DELETE -H "Authorization: Bearer $TOKEN" \
  https://your-instance.com/api/v1/councils/:id/members/:member_id

Example: Task Decomposition Council

A decompose strategy council where a lead architect breaks work into subtasks:

{
  "name": "Feature Team",
  "delegation_strategy": "decompose",
  "leader_role_assignment_id": "architect-assignment-id",
  "members": [
    {
      "role_assignment_id": "frontend-dev-assignment-id",
      "priority": 1,
      "config": {}
    },
    {
      "role_assignment_id": "backend-dev-assignment-id",
      "priority": 1,
      "config": {}
    },
    {
      "role_assignment_id": "qa-engineer-assignment-id",
      "priority": 2,
      "config": {}
    }
  ]
}

The architect leader receives the task, decomposes it into frontend, backend, and QA subtasks, then delegates each to the appropriate member. Members work on their subtasks and report back. The leader synthesizes the results.

On this page