NocoBase AI Employee
Goal
Configure an AI employee-backed action for a specific NocoBase business surface. Decide whether the requirement should use built-in UI actions, JS actions, workflows, or an AI employee; then reuse or create the right employee and hand off the final UI placement to nocobase-ui-builder.
Required Hand-Off Skills
- Use
nocobase-ui-builder for Modern page/block/action authoring and AI employee action placement.
- Use
nocobase-data-modeling when the requirement needs new collections, fields, or relations before the AI action can work.
- Use
nocobase-workflow-manage when the AI employee should call or trigger a workflow tool, or when the task is mostly deterministic backend automation.
Decision Gate
Classify the user request before writing anything:
| Need |
Prefer |
| Fixed CRUD, navigation, visibility, filters, field assignment, or simple button behavior |
Built-in UI action / reaction through nocobase-ui-builder |
| Deterministic client-side calculation, formatting, validation, or data transform |
JS action / JS surface through nocobase-ui-builder |
| Deterministic multi-step server automation, approval, notification, scheduled work |
Workflow through nocobase-workflow-manage |
| Natural-language interpretation, ambiguous intent, extraction from messy text, summarization, classification, drafting, recommendations, data insight narrative, tool choice, or model judgment |
AI employee action |
Only choose AI employee when model judgment materially reduces ambiguity or gives the user a natural-language task surface. Do not use AI employee as a substitute for ordinary deterministic UI configuration.
Workflow
Decompose the request
- Identify the target page/block/action slot, target collection, current-record vs whole-block context, and expected user interaction.
- Split deterministic setup from non-deterministic model work.
- If the target UI surface is not uniquely known, use
nocobase-ui-builder inspection routes first.
Decide if AI employee is appropriate
- Apply the Decision Gate.
- If AI is not appropriate, hand off to the relevant skill and explain the narrower route.
- If AI is appropriate, write a compact task contract: employee role, input context, expected output, whether to auto-send, whether to use web search, and any required tools/skills.
Discover existing AI employees
- Prefer user-visible employees with
aiEmployees:listByUser.
- If using admin list data, filter to
enabled=true, deprecated=false, and role-visible rows. Avoid category="developer" unless the user is configuring developer-facing builder work.
- Match by role, position, bio, existing tools, and
modelSettings.
- Read
references/ai-employee-api.md only when you need concrete resource names, fields, or payload shapes.
Reuse or create
- Reuse an existing employee when one clearly covers the role with compatible tools and model restrictions.
- Create a new employee only when no existing employee reaches roughly 70% fit, or when the user explicitly wants a dedicated employee.
- For new employees, keep
bio human-facing and put operational behavior in about.
- For new employees, validate the create payload has
avatar set to a supported avatar seed before calling aiEmployees:create.
- If
avatar is missing, empty, null, or unsupported, set it to the default supported seed nocobase-015-male.
- Do not create developer-category employees for business users unless explicitly requested.
Bind the employee to the block
- Use
nocobase-ui-builder and its AI employee action reference.
- Use public action shape only:
type: "aiEmployee" with settings.username, settings.auto, settings.workContext, settings.tasks, settings.style.
- Do not write raw
props, stepParams, flowModels, or database rows.
- For block/form/record context, default to
workContext: [{ "type": "flow-model", "target": "self" }].
Verify
- Read back or inspect the target surface through
nocobase-ui-builder when a write occurred.
- Verify the AI action points at the intended username and has the intended task message.
- If a new employee was created, verify it appears in
aiEmployees:listByUser for the intended role, and verify its avatar is non-empty and still one of the supported avatar seeds. Explain any role/ACL follow-up if it is not visible.
Employee Matching Rules
Prefer built-ins when they fit:
atlas: route a broad request to other employees or coordinate sub-agents.
dex: extract, clean, structure, or fill forms from messy text.
viz: analyze data and produce insights or reports.
ellis: understand, summarize, and draft email replies.
lexi / lina: translation and localization, with lina usually developer-facing.
nathan: frontend code authoring or JS/code-editor work; developer-facing.
Create a dedicated employee when the task needs domain-specific behavior, a constrained model set, dedicated custom workflow tools, or a role/persona that should be exposed to business users.
Avatar Payload Rules
avatar is a preset seed string, not an uploaded file object or external image URL.
- Default seed:
nocobase-015-male.
- Every new
aiEmployees:create payload must include avatar.
- Before create, validate
avatar against the supported seeds below. Replace missing, empty, null, or unsupported values with nocobase-015-male.
- After create, read back the employee through
aiEmployees:list or aiEmployees:listByUser and verify avatar is present.
Supported avatar seeds:
nocobase-001-male
nocobase-002-male
nocobase-003-female
nocobase-004-male
nocobase-005-female
nocobase-006-male
nocobase-007-male
nocobase-008-female
nocobase-009-female
nocobase-010-male
nocobase-011-male
nocobase-012-male
nocobase-013-female
nocobase-014-female
nocobase-015-male
nocobase-016-female
nocobase-017-female
nocobase-018-female
nocobase-019-female
nocobase-020-female
nocobase-021-male
nocobase-022-male
nocobase-023-female
nocobase-024-male
nocobase-025-male
nocobase-026-male
nocobase-027-female
nocobase-028-male
nocobase-029-male
nocobase-030-male
nocobase-031-female
nocobase-032-male
nocobase-033-male
nocobase-034-female
nocobase-035-male
nocobase-036-female
nocobase-037-male
nocobase-038-female
nocobase-039-female
nocobase-040-female
nocobase-041-male
nocobase-042-male
nocobase-043-male
nocobase-044-male
nocobase-045-female
nocobase-046-female
nocobase-047-male
nocobase-048-female
nocobase-049-male
nocobase-050-female
nocobase-051-female
nocobase-052-female
nocobase-053-male
nocobase-054-female
nocobase-055-male
nocobase-056-female
nocobase-057-female
nocobase-058-female
nocobase-059-male
nocobase-060-female
Task Contract Template
Use this internal template before placement:
{
"intent": "what the user wants",
"targetSurface": "page/block/action slot",
"decision": "builtin|js|workflow|ai-employee",
"employee": {
"mode": "reuse|create",
"username": "candidate-or-new-username",
"role": "short business role",
"reason": "why this employee fits"
},
"aiAction": {
"auto": false,
"autoSend": false,
"context": "self|named block|record",
"taskTitle": "short button/task title",
"systemMessage": "stable operational constraints",
"userMessage": "what the employee should do with the block context",
"webSearch": false
}
}
References
- Read
references/ai-employee-api.md for collections, resource actions, field meanings, and create/update payload notes.
- Read
references/block-action-payload.md for the public AI employee action shape and placement rules.
- Read
references/examples.md for reusable classification and payload examples.
1---2name: nocobase-ai-employee3description: Use when a NocoBase task requires AI employee lifecycle work such as discovering existing employees, judging fit, creating a dedicated employee, or configuring profile, prompt, model, skills, tools, or knowledge base before another skill binds it to a UI surface.4---56# NocoBase AI Employee78## Goal910Configure an AI employee-backed action for a specific NocoBase business surface. Decide whether the requirement should use built-in UI actions, JS actions, workflows, or an AI employee; then reuse or create the right employee and hand off the final UI placement to `nocobase-ui-builder`.1112## Required Hand-Off Skills1314- Use `nocobase-ui-builder` for Modern page/block/action authoring and AI employee action placement.15- Use `nocobase-data-modeling` when the requirement needs new collections, fields, or relations before the AI action can work.16- Use `nocobase-workflow-manage` when the AI employee should call or trigger a workflow tool, or when the task is mostly deterministic backend automation.1718## Decision Gate1920Classify the user request before writing anything:2122| Need | Prefer |23| --- | --- |24| Fixed CRUD, navigation, visibility, filters, field assignment, or simple button behavior | Built-in UI action / reaction through `nocobase-ui-builder` |25| Deterministic client-side calculation, formatting, validation, or data transform | JS action / JS surface through `nocobase-ui-builder` |26| Deterministic multi-step server automation, approval, notification, scheduled work | Workflow through `nocobase-workflow-manage` |27| Natural-language interpretation, ambiguous intent, extraction from messy text, summarization, classification, drafting, recommendations, data insight narrative, tool choice, or model judgment | AI employee action |2829Only choose AI employee when model judgment materially reduces ambiguity or gives the user a natural-language task surface. Do not use AI employee as a substitute for ordinary deterministic UI configuration.3031## Workflow32331. **Decompose the request**34 - Identify the target page/block/action slot, target collection, current-record vs whole-block context, and expected user interaction.35 - Split deterministic setup from non-deterministic model work.36 - If the target UI surface is not uniquely known, use `nocobase-ui-builder` inspection routes first.37382. **Decide if AI employee is appropriate**39 - Apply the Decision Gate.40 - If AI is not appropriate, hand off to the relevant skill and explain the narrower route.41 - If AI is appropriate, write a compact task contract: employee role, input context, expected output, whether to auto-send, whether to use web search, and any required tools/skills.42433. **Discover existing AI employees**44 - Prefer user-visible employees with `aiEmployees:listByUser`.45 - If using admin list data, filter to `enabled=true`, `deprecated=false`, and role-visible rows. Avoid `category="developer"` unless the user is configuring developer-facing builder work.46 - Match by role, position, bio, existing tools, and `modelSettings`.47 - Read `references/ai-employee-api.md` only when you need concrete resource names, fields, or payload shapes.48494. **Reuse or create**50 - Reuse an existing employee when one clearly covers the role with compatible tools and model restrictions.51 - Create a new employee only when no existing employee reaches roughly 70% fit, or when the user explicitly wants a dedicated employee.52 - For new employees, keep `bio` human-facing and put operational behavior in `about`.53 - For new employees, validate the create payload has `avatar` set to a supported avatar seed before calling `aiEmployees:create`.54 - If `avatar` is missing, empty, null, or unsupported, set it to the default supported seed `nocobase-015-male`.55 - Do not create developer-category employees for business users unless explicitly requested.56575. **Bind the employee to the block**58 - Use `nocobase-ui-builder` and its AI employee action reference.59 - Use public action shape only: `type: "aiEmployee"` with `settings.username`, `settings.auto`, `settings.workContext`, `settings.tasks`, `settings.style`.60 - Do not write raw `props`, `stepParams`, `flowModels`, or database rows.61 - For block/form/record context, default to `workContext: [{ "type": "flow-model", "target": "self" }]`.62636. **Verify**64 - Read back or inspect the target surface through `nocobase-ui-builder` when a write occurred.65 - Verify the AI action points at the intended username and has the intended task message.66 - If a new employee was created, verify it appears in `aiEmployees:listByUser` for the intended role, and verify its `avatar` is non-empty and still one of the supported avatar seeds. Explain any role/ACL follow-up if it is not visible.6768## Employee Matching Rules6970Prefer built-ins when they fit:7172- `atlas`: route a broad request to other employees or coordinate sub-agents.73- `dex`: extract, clean, structure, or fill forms from messy text.74- `viz`: analyze data and produce insights or reports.75- `ellis`: understand, summarize, and draft email replies.76- `lexi` / `lina`: translation and localization, with `lina` usually developer-facing.77- `nathan`: frontend code authoring or JS/code-editor work; developer-facing.7879Create a dedicated employee when the task needs domain-specific behavior, a constrained model set, dedicated custom workflow tools, or a role/persona that should be exposed to business users.8081## Avatar Payload Rules8283- `avatar` is a preset seed string, not an uploaded file object or external image URL.84- Default seed: `nocobase-015-male`.85- Every new `aiEmployees:create` payload must include `avatar`.86- Before create, validate `avatar` against the supported seeds below. Replace missing, empty, null, or unsupported values with `nocobase-015-male`.87- After create, read back the employee through `aiEmployees:list` or `aiEmployees:listByUser` and verify `avatar` is present.8889Supported avatar seeds:9091```text92nocobase-001-male93nocobase-002-male94nocobase-003-female95nocobase-004-male96nocobase-005-female97nocobase-006-male98nocobase-007-male99nocobase-008-female100nocobase-009-female101nocobase-010-male102nocobase-011-male103nocobase-012-male104nocobase-013-female105nocobase-014-female106nocobase-015-male107nocobase-016-female108nocobase-017-female109nocobase-018-female110nocobase-019-female111nocobase-020-female112nocobase-021-male113nocobase-022-male114nocobase-023-female115nocobase-024-male116nocobase-025-male117nocobase-026-male118nocobase-027-female119nocobase-028-male120nocobase-029-male121nocobase-030-male122nocobase-031-female123nocobase-032-male124nocobase-033-male125nocobase-034-female126nocobase-035-male127nocobase-036-female128nocobase-037-male129nocobase-038-female130nocobase-039-female131nocobase-040-female132nocobase-041-male133nocobase-042-male134nocobase-043-male135nocobase-044-male136nocobase-045-female137nocobase-046-female138nocobase-047-male139nocobase-048-female140nocobase-049-male141nocobase-050-female142nocobase-051-female143nocobase-052-female144nocobase-053-male145nocobase-054-female146nocobase-055-male147nocobase-056-female148nocobase-057-female149nocobase-058-female150nocobase-059-male151nocobase-060-female152```153154## Task Contract Template155156Use this internal template before placement:157158```json159{160 "intent": "what the user wants",161 "targetSurface": "page/block/action slot",162 "decision": "builtin|js|workflow|ai-employee",163 "employee": {164 "mode": "reuse|create",165 "username": "candidate-or-new-username",166 "role": "short business role",167 "reason": "why this employee fits"168 },169 "aiAction": {170 "auto": false,171 "autoSend": false,172 "context": "self|named block|record",173 "taskTitle": "short button/task title",174 "systemMessage": "stable operational constraints",175 "userMessage": "what the employee should do with the block context",176 "webSearch": false177 }178}179```180181## References182183- Read `references/ai-employee-api.md` for collections, resource actions, field meanings, and create/update payload notes.184- Read `references/block-action-payload.md` for the public AI employee action shape and placement rules.185- Read `references/examples.md` for reusable classification and payload examples.