Complete Example: Create a Built-in AI Employee
The following complete example creates a built-in AI employee that guides plugin development. The example names the employee Dev Helper and configures its Tool, Skill, and system prompt. When a user says “Please greet Alice,” the employee loads the welcome-developer Skill, calls the greetDeveloper Tool to confirm the name, and then generates a greeting in the user's current language.
- Define a server-side Tool — Learn the basic structure of
defineTools()and Tools - Define a Skill — Learn about
SKILLS.mdand Tool binding - Define a built-in AI employee — Learn about
defineAIEmployee()and employee directories
Final result
When complete, the plugin provides these capabilities:
- Creates a built-in AI employee named
Dev Helper - Automatically binds the
welcome-developerSkill to the employee - Uses the Skill to call the
greetDeveloperTool and confirm the developer's name - Generates a greeting and follow-up question in the user's current language
Final directory structure
This example requires no frontend code and no manual registration in src/server/plugin.ts.
Step 1: Define the Tool
Create src/ai/ai-employees/dev-helper/skills/welcome-developer/tools/greetDeveloper.ts:
Step 2: Define the Skill
Create src/ai/ai-employees/dev-helper/skills/welcome-developer/SKILLS.md:
Because greetDeveloper.ts is in the current Skill's tools/ directory, you do not need to add tools: [greetDeveloper].
Step 3: Define the AI employee profile
Create src/ai/ai-employees/dev-helper/index.ts:
username is the unique identifier in the database. Do not change it casually after release, or NocoBase will treat the new value as a different built-in AI employee.
The username must remain stable and must not conflict with another plugin or existing AI employee. If the database already contains the same username, loading the plugin updates that record instead of creating an isolated new employee.
When the plugin reloads, the category, nickname, position, avatar, bio, greeting, default system prompt, Skill and Tool bindings, chatSettings, and sort from the code may all be written to the database again. For production plugins, use a plugin-prefixed name such as developer-helper-dev-assistant.
Step 4: Define the system prompt
Create src/ai/ai-employees/dev-helper/prompt.md:
The directory relationships now provide automatic binding:
Step 5: Enable and verify
Rebuild or restart the development service and confirm that the plugin containing these files is enabled. Then check the AI employee management page:
Dev Helperis listed- The employee is marked as built-in
- The employee's dedicated Skills include
welcome-developer greetDeveloperis available after the Skill loads
Enter the following in a conversation:
The expected sequence is:
Set defaultPermission: 'ALLOW' if the Tool should not ask the user for confirmation before every call. For Tools that delete data, modify records in bulk, or have external side effects, keeping the default ASK is more appropriate.
Summary
Related links
- AI employee plugin development — Understand the relationship between Tools, Skills, and built-in AI employees
- Define a server-side Tool — See the complete
defineTools()configuration - Define a Skill — See the fields and format of
SKILLS.md - Define a built-in AI employee — Learn about
defineAIEmployee()and directory binding - Internationalization for AI employee plugins — Add translations for management-interface text in this example

