---
url: /en/ai/intro.md
description: >
  Introduces the AI features available on the CNB platform, including CodeBuddy
  NPC, TencentCloud CodeBuddy integration, Chat assistant, RAG Knowledge Base,
  Issue Analysis, and Change Analysis.
---
**AI Assistant Introduction** collects the AI capabilities built into the CNB platform.

**When to use**: when you want AI help in your workflow but don't know where to start — for example
letting AI take over an issue, analyzing build failures, asking questions against a repository
knowledge base, or generating Wiki docs on demand. The CNB platform has several built-in AI features
that boost developer productivity.

## Features

### CodeBuddy NPC

[CodeBuddy NPC](../build/npc.md) is the AI colleague living in your CNB dev infrastructure.
You set the goal and review its output; it is a Cloud Agent built on CodeBuddy, deeply integrated
with the CNB platform, acquiring context on its own and completing dev tasks end-to-end.

**Core Capabilities**:

* **Goal-Driven**: You define "what", the NPC handles "how".
  From requirements to PR, fully autonomous.
* **Autonomous Context**: Deeply integrated with CNB repos, issues, and pipelines.
  Understands requirements, reads code, checks logs on its own.
* **Parallel Assignment**: Dispatch several tasks at once. Multiple NPCs work in parallel in the
  cloud, unblocked and independently delivered.

**Quick Start**:

* Mention `@CodeBuddy` in an Issue or PR comment, and the NPC automatically
  executes the task and replies
* Define a role in your repository's `.cnb/settings.yml` to create your own NPC,
  then use it via `@repo-path(role-name)`
* After enabling [Work Mode](../build/npc.md#work-mode), the NPC can autonomously
  write code, push code, and create PRs

For more information on event triggers and custom NPCs,
see [NPC](../build/npc.md).

### TencentCloud CodeBuddy

[TencentCloud CodeBuddy](https://codebuddy.cn/) is built into the Workspaces WebIDE,
ready to use without additional installation.

### AI Chat

The platform has a built-in
[AI Chat](//cnb.build/?aiq=CNB%20AI%20Function%20Introduction),
supporting quick access to help documentation and configuration file writing through AI.

### RAG Knowledge Base

Set up enterprise or personal knowledge bases through code repositories: commit documents to the
repository and configure the pipeline, and the content is processed by the large model and written
to the knowledge base automatically, for webpage Q\&A, OpenAPI, and other scenarios — helping build
RAG (Retrieval-Augmented Generation) applications.
See [Knowledge Base](./knowledge-base.md) for details.

### Issue Analysis

Submit build error messages to AI with one click to identify the cause quickly.

### Change Analysis

Submit commit or pull request change information to AI with one click to understand the changes and
their potential impact quickly.
