Updated on 2026-07-29 GMT+08:00

Repository Index

CodeArts Agent provides a repository index function to help you quickly search and retrieve code-related information. This function supports creating both local user indexes and cloud-shared indexes, flexibly adapting to the requirements of different scenarios.

Constraints

Table 1 Constraints

Category

Description

Language

Java, JavaScript, TypeScript, and Go are supported.

Total number of code files

  • Basic edition: Up to 50,000 code files can be indexed.
  • Professional edition: Up to 100,000 code files can be indexed.

Differences Between Local User Indexes and Cloud Indexes

Table 2 Differences between local user indexes and cloud indexes

Dimension

Local User Index

Cloud Index

Used by

Current user

  • Enterprise: available to all enterprise members and created by the enterprise administrator, team administrator, enterprise members, or team members.
  • Team: available only to team members and created by the enterprise administrator, team administrator, or team members.
  • User: available only to members themselves.

Repository type

Unlimited

Git and GitHub repositories are supported.

Prerequisites

An enterprise administrator has joined a team, if they want to create a team repository index.

Creating Indexes

You can create local user indexes and cloud indexes.

  1. Log in to CodeArts Agent IDE as instructed in Quick Start.
  2. Click in the upper right corner of CodeArts Agent IDE to open the settings page.
  3. In the navigation pane on the left, choose Repository Index.
  4. Enable the index function.

    • Automatic indexing: After Auto Update is enabled, CodeArts Agent will automatically create and update indexes for repositories containing 50,000 or fewer files.

      After enabling this function, CodeArts Agent will perform incremental updates every 5 minutes to ensure the agent always analyzes and responds based on the latest code.

    • Manual indexing: When the number of files in a local repository exceeds 50,000, you need to click Create Index to manually build an index.

  5. View the indexing results.

    Once the index is successfully built, the page will show the progress at 100%.

    Figure 1 Index created

  6. (Optional) Use the index in the intelligent Q&A mode.

    To use the index in the intelligent Q&A mode, first ensure that the indexing process is completed. Then, at the bottom of the input box on the chat panel, click to search for indexes. When the icon changes to , the index function is enabled.

If your account has been assigned a seat, you can create cloud repository indexes. If not, you cannot create them.

  1. Log in to the CodeArts Agent console.
  2. In the navigation pane on the left, choose Agent Settings > Repository Index.
  3. Click Create Index.
  4. Set basic index information by referring to Table 3 and click Next.

    Table 3 Repository index parameters

    Parameter

    Description

    Visible To

    Visible scope of the repository index.

    • User: available only to members themselves.
    • Team: available only to team members and created by the enterprise administrator, team administrator, or team members.
    • Enterprise: available to all enterprise members and created by the enterprise administrator, team administrator, enterprise members, or team members.

    Teams

    This parameter is displayed only when Visible To is set to Team.

    Select a team from the drop-down list; only the teams which the current account belongs to are displayed.

    Code Source

    Source of the code repository that you want to index.

    • Git: a general Git repository.
    • GitHub: a GitHub repository, which can be a public repository or an authorized private repository.

    Authorization Method

    Method to authorize the system to access your code source.

    • Authorize by Service: Select a service endpoint from the drop-down list. The endpoint corresponds to the connection information of the GitHub or Git repository.

      If no service endpoint has been created, click Add to create one by referring to Table 4.

    • Authorize by Personal Token: Authorize access requests using an access token generated from your personal account.

    Default Branch

    This parameter is displayed only when Code Source is set to Git.

    Enter the branch name of a Git repository. The branch name can contain a maximum of 200 characters.

    Figure 2 Creating a service endpoint
    Table 4 Service endpoint parameters

    Parameter

    Description

    Connection Name

    Name of the custom repository to be connected.

    Naming rules: The name can contain letters, digits, underscores (_), and hyphens (-), but cannot start with an underscore.

    Git URL

    This parameter is displayed only when Code Source is set to Git.

    HTTPS access address of the Git repository

    User Name

    This parameter is displayed only when Code Source is set to Git.

    User name for HTTPS authentication of the Git repository.

    Password or Access Token

    This parameter is displayed only when Code Source is set to Git.

    Password or access token for HTTPS authentication of the Git repository.

    Access Token

    This parameter is displayed only when Code Source is set to Github.

    Access token for HTTPS authentication of the GitHub repository.

  5. Select the repository and language, and click OK to finish creating the index.

    On the repository index page, view the newly created repository index. When its status changes from parsing to parsing completed, the repository index has been successfully parsed.

  6. Return to the CodeArts Agent IDE client and open the Git, Repo, or GitHub repository project. CodeArts Agent automatically downloads team repository indexes from the cloud.

    After the team repository indexes are successfully downloaded, the progress displayed on the page reaches 100%.

    If the number of files in the repository is greater than 50,000, click Create Index to manually build the repository index.

  7. (Optional) Use the index in the intelligent Q&A mode.

    To use the index in the intelligent Q&A mode, first ensure that the indexing process is completed. Then, at the bottom of the input box on the chat panel, click to search for indexes. When the icon changes to , the index function is enabled.

Managing Repository Indexes

After a repository index is built, you can manage it throughout its lifecycle.

Beyond creation, local repository indexes support operations such as restarting and deleting. For details, see Table 5.

Table 5 Managing repository indexes

Operation

Instruction

Stop indexing

Click Stop to halt the indexing process at any time.

Restart indexing

To resume a paused indexing process, click Resume Indexing.

Update indexes

Incremental update is supported. The system compares the current status with the result of the last update, indexes the added or modified code files, and skips unchanged files to save time.

Reindex

If you need to rebuild an index entirety, click Reindex to trigger a complete indexing process.

Delete indexes

To clear all current index data, click Delete Index.

Ignore files in the current directory

If you want to exclude any file in the current folder from being indexed, click Configure. Then, in .codebaseignore, specify the file name.

Table 6 shows the operation permissions of different roles to delete repository indexes.

Table 6 Scope of repository indexes that can be deleted by different roles

Role

Enterprise-Level Repository Index

Team-Level Repository Index

User-Level Repository Index

Enterprise administrator

All repository indexes

All repository indexes of the administrator's team

All repository indexes created by the user

Team administrator

All repository indexes created by the user

All repository indexes created by team administrator and members of the team managed by the team administrator

All repository indexes created by the user

Team member

All repository indexes created by the user

All repository indexes created by the user

All repository indexes created by the user

Enterprise member

All repository indexes created by the user

No operation permissions.

All repository indexes created by the user

Table 7 Repository index management on the console

Operation

Procedure

Delete a specified repository index.

When there are only several indexes, you can delete them one by one.

  1. On the Repository Index page, locate the target index, and click Delete in the Operation column. The Delete Repository Index dialog box is displayed.
  2. Confirm the information, and click Autofill. The system automatically enters DELETE. Then, click OK.
    The target index cannot be found on the Repository Index page, indicating that the deletion is successful.
    CAUTION:

    The deleted index cannot be restored. Exercise caution when you perform this operation.

Delete the repository indexes in a batch.

If there are many indexes, you can delete them in batches.

  1. In the upper right corner of the Repository Index page, click Batch Delete and select the indexes to be deleted.
  2. Click Delete. The Delete Repository Index dialog box is displayed.
  3. Confirm the information, and click Autofill. The system automatically enters DELETE. Then, click OK.

    The target indexes cannot be found on the Repository Index page, indicating that the deletion is successful.

    CAUTION:

    The deleted indexes cannot be restored. Exercise caution when you perform this operation.