{"skill":{"slug":"aicreat","displayName":"aicreat","summary":"Guide AI to create and manage NocoBase AI employees — chatbot assistants with page integration","description":"---\nname: nocobase-ai-employee\ndescription: Guide AI to create and manage NocoBase AI employees — chatbot assistants with page integration\ntriggers:\n  - AI员工\n  - AI助手\n  - ai employee\n  - ai assistant\n  - chatbot\n  - 创建AI\n  - 头像\n  - 浮动按钮\ntools:\n  - nb_create_ai_employee\n  - nb_list_ai_employees\n  - nb_get_ai_employee\n  - nb_update_ai_employee\n  - nb_delete_ai_employee\n  - nb_ai_shortcut\n  - nb_ai_button\n---\n\n# NocoBase AI Employee Management\n\nYou are guiding the user to create and manage AI employees (chatbot assistants) in NocoBase.\n\n## Key Concepts\n\n### AI Employee\nAn AI employee is a chatbot assistant configured with:\n- **username** (PK): Unique identifier, e.g. `am-asset-keeper`\n- **nickname**: Display name shown to users\n- **about**: System prompt defining role, data scope, and behavior\n- **skills**: Tool bindings (query, count, form fill, workflow call)\n- **modelSettings**: LLM configuration (service, model, temperature)\n\n### Page Integration\nAI employees appear on pages in two ways:\n1. **Floating Avatar** (`AIEmployeeShortcutListModel` + `AIEmployeeShortcutModel`): Circular avatar buttons in page top-right corner\n2. **Action Bar Button** (`AIEmployeeButtonModel`): AI button in table/form action bars\n\n## Workflow\n\n### Phase 1: Create AI Employees\n\n```\nnb_create_ai_employee(\"my-helper\", \"助手\", \"通用助手\",\n    \"nocobase-015-male\", \"One-line description\",\n    \"Full system prompt with role, data scope, behavior rules...\",\n    \"Welcome message...\",\n    '[{\"name\":\"dataSource-dataSourceQuery\",\"autoCall\":true}]')\n```\n\n### Phase 2: Add Page Shortcuts (Floating Avatars)\n\n```\nnb_ai_shortcut(\"tab_uid\", '[\n    {\"username\": \"my-helper\", \"tasks\": [\n        {\"title\": \"Quick Query\", \"message\": {\"user\": \"帮我查询数据\"}, \"autoSend\": false}\n    ]}\n]')\n```\n\n### Phase 3: Add Block Buttons\n\n```\nnb_ai_button(\"table_uid\", \"my-helper\", '[\n    {\"title\": \"Analyze Data\", \"message\": {\"user\": \"分析当前数据\"}, \"autoSend\": false}\n]')\n```\n\n## Available Skills (Tool Bindings)\n\n| Tool Name | Description | autoCall |\n|-----------|-------------|----------|\n| `dataModeling-getCollectionNames` | Discover table names | true |\n| `dataModeling-getCollectionMetadata` | Get field definitions | true |\n| `dataSource-dataSourceQuery` | Query database | true |\n| `dataSource-dataSourceCounting` | Count records | true |\n| `frontend-formFiller` | Auto-fill forms | true |\n| `workflowCaller-<key>` | Custom workflow tool | false |\n\n## Avatar IDs\n\nCommon avatar IDs: `nocobase-001-male` through `nocobase-060-male`,\n`nocobase-001-female` through `nocobase-060-female`.\n\n## Model Settings\n\nDefault LLM configuration:\n```json\n{\n  \"llmService\": \"gemini\",\n  \"model\": \"models/gemini-2.5-flash\",\n  \"temperature\": 0.7,\n  \"topP\": 1,\n  \"timeout\": 60000,\n  \"maxRetries\": 1,\n  \"responseFormat\": \"text\"\n}\n```\n\n**Common adjustments:**\n- `temperature: 0.3` — more deterministic, better for data queries\n- `temperature: 0.9` — more creative, better for writing/suggestions\n- `timeout: 120000` — longer timeout for complex multi-step queries\n- `responseFormat: \"markdown\"` — for formatted output\n\n## Page Integration — Complete Example\n\n### Floating Avatar (Shortcut)\nPlace AI employee avatars on a page for quick access:\n```\nnb_ai_shortcut(\"tab_uid\", '[\n    {\"username\": \"my-helper\", \"tasks\": [\n        {\"title\": \"Quick Query\", \"message\": {\"user\": \"帮我查一下最新数据\"}, \"autoSend\": false},\n        {\"title\": \"Generate Report\", \"message\": {\"user\": \"生成本月汇总报表\"}, \"autoSend\": false}\n    ]}\n]')\n```\n\nMultiple employees on the same page:\n```\nnb_ai_shortcut(\"tab_uid\", '[\n    {\"username\": \"data-analyst\", \"tasks\": [...]},\n    {\"username\": \"form-helper\", \"tasks\": [...]}\n]')\n```\n\n### Block Button\nAdd AI action button to a table's action bar:\n```\nnb_ai_button(\"table_uid\", \"my-helper\", '[\n    {\"title\": \"Analyze Selected\", \"message\": {\"user\": \"分析当前选中的记录\"}, \"autoSend\": false}\n]')\n```\n\n## Best Practices\n\n1. **Role-focused**: Each AI employee covers one business domain\n2. **Progressive**: Start with basic query tools, add workflow tools later\n3. **Chinese-first**: Use `{{$nLang}}` in system prompts for language awareness\n4. **Data scope**: Explicitly list accessible tables in the system prompt\n5. **Preset tasks**: Add 1-2 quick-start tasks to shortcuts and buttons\n6. **System prompt structure**: Role → Data scope (table names) → Behavior rules → Output format\n7. **Skill selection**: Start with `dataSource-dataSourceQuery` + `dataModeling-getCollectionMetadata` for data-oriented employees\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":757,"installsAllTime":28,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1773714712862,"updatedAt":1779078313326},"latestVersion":{"version":"1.0.0","createdAt":1773714712862,"changelog":"Initial release of NocoBase AI Employee Management skill.\n\n- Guides users to create and manage AI employees (chatbot assistants) in NocoBase.\n- Supports configuring AI employees with roles, data scopes, LLM settings, and tool bindings.\n- Enables page integration via floating avatar shortcuts and action bar buttons.\n- Provides detailed workflows, example API calls, and best practices for deploying AI employees.\n- Lists available tools, avatar options, and LLM configuration tips for customized deployment.","license":"MIT-0"},"metadata":null,"owner":{"handle":"alexander-lq","userId":"s17bsr5h5y8tte9g03yknsxsdd83g0rv","displayName":"liu xiansen","image":"https://avatars.githubusercontent.com/u/49258980?v=4"},"moderation":null}