app icon
Knowledge Pro
1.0.0

A comprehensive AI Agent tool for managing Dify Knowledge Bases (Datasets). Enables advanced operations including creating, updating, and deleting Datasets and Documents, managing content chunks, retrieving knowledge, and applying granular metadata filtering via the Dify API.

abesticode/knowledge_pro4377 installs

Knowledge Pro

Author: abesticode
Version: 1.0.0
Type: tool
Repo: https://github.com/abesticode/dify-plugin-knowledge-pro

Description

Knowledge Pro is a comprehensive AI Agent tool designed for managing Dify Knowledge Bases (Datasets) via the Dify API. It provides a complete set of operations for knowledge base maintenance, document management, content chunk manipulation, and metadata filtering.

Features

📁 Dataset Operations

ToolDescription
Create DatasetCreate new empty knowledge bases
List DatasetsBrowse available knowledge bases with pagination
Get DatasetRetrieve detailed information about a specific knowledge base
Update DatasetModify knowledge base settings (name, description, permissions, embedding model, etc.)
Delete DatasetRemove knowledge bases permanently

📄 Document Operations

ToolDescription
Create Document by TextAdd new documents with text content. Supports advanced options like chunk method, process rules, and metadata assignment
List DocumentsBrowse documents in a knowledge base
Get DocumentRetrieve detailed information about a specific document
Update Document by TextUpdate existing document content, process rules, and settings
Update Document StatusEnable, disable, archive, or unarchive documents in batch
Delete DocumentRemove documents permanently
Get Indexing StatusTrack document embedding progress

🧩 Chunk/Segment Operations

ToolDescription
Add ChunksAdd content segments to documents
List ChunksView all segments in a document
Get Chunk DetailsGet detailed information of a specific chunk
Update ChunkModify segment content, keywords, or status
Delete ChunkRemove segments permanently
Retrieve ChunksSearch knowledge base with various methods (keyword, semantic, hybrid)

👶 Child Chunk Operations (Hierarchical Mode)

ToolDescription
List Child ChunksGet child chunks from a parent segment
Create Child ChunkAdd a new child chunk under a parent segment
Update Child ChunkModify child chunk content
Delete Child ChunkRemove a child chunk from parent segment

🏷️ Metadata Operations

ToolDescription
Add Metadata FieldDefine custom metadata fields
Update Metadata FieldRename metadata fields
Delete Metadata FieldRemove metadata fields
List MetadataView all defined metadata fields and their IDs
List Built-in MetadataView all built-in metadata fields in a knowledge base
Toggle Built-in MetadataEnable or disable built-in metadata fields
Update Document MetadataAssign metadata values to documents

🏷️ Knowledge Tag Operations

ToolDescription
List Knowledge TagsView all workspace-level knowledge base tags
Create Knowledge TagCreate a new tag for organizing knowledge bases
Update Knowledge TagRename an existing knowledge base tag
Delete Knowledge TagPermanently delete a knowledge base tag
List Dataset TagsView tags bound to a specific knowledge base
Bind Knowledge TagsAttach one or more tags to a knowledge base
Unbind Knowledge TagsRemove one or more tags from a knowledge base

🤖 Model & Datasource Operations

ToolDescription
List Available ModelsBrowse available embedding and reranking models
List Datasource PluginsView available datasource plugins for knowledge bases

🔄 Pipeline Operations

ToolDescription
Run PipelineExecute a pipeline with specified parameters
Run Datasource NodeRun a specific datasource node within a pipeline
Upload Pipeline FileUpload a file for use in pipeline processing

Installation

  1. Install the plugin from the Dify Marketplace or upload the file
  2. Navigate to your Dify workspace settings
  3. Add the Knowledge Pro tool to your agent
  4. Configure the required credentials:
    • API Key: Your Dify Knowledge Base API key
    • Base URL: Your Dify API endpoint (e.g., )

Getting API Credentials

  1. Go to your Dify Knowledge Base
  2. Navigate to the API ACCESS page from the left navigation
  3. Generate a new API key from the API Keys section
  4. Copy the API key and base URL for configuration

How to Use

Step 1: Authorization

The and credentials come from the Dify Knowledge Base API Access page:

  • API Key: Copy from the API Keys section
  • Base URL: Your Dify API endpoint (e.g., )

Step 2: Get Dataset ID

The can be found in the Knowledge Base URL or settings:

Copy the Dataset ID to use in the tool parameters.


Step 3: Create Metadata Field

Before assigning metadata to documents, you need to create metadata fields first:

Use the Add Metadata Field tool to define custom fields like , , etc.


Step 4: Get List of Metadata IDs

To assign metadata values, you need the metadata field IDs:

Use the List Metadata tool to get the UUIDs of your metadata fields.


Step 5: Configure Create/Update Document

When creating or updating documents, configure the following parameters:

Basic Configuration:

Chunk Method & Process Rules:

Metadata Assignment:


Step 6: Example Output

Successful Document Creation:

Document with Metadata:


Usage Examples

Creating a Knowledge Base

Adding Documents with Metadata

Searching Knowledge

Managing Metadata

Advanced Usage

Process Rules

The parameter controls how documents are segmented and processed. The default is , but you can customize it based on your chunk method.

Automatic Mode (default):

Custom Mode for General or Q&A Chunk Method:

When your is or , use this format:

Hierarchical Mode for Parent-child Chunk Method:

When your is , use this format:

Process Rule Parameters:

ParameterDescription
, , or
Rules for text cleanup before segmentation
String used to split text into chunks
Maximum tokens per chunk
Number of overlapping tokens between chunks
For hierarchical: or
Segmentation rules for child chunks (hierarchical only)

Metadata Assignment

To assign metadata when creating/updating documents:

  1. First, use List Metadata to get the metadata field IDs
  2. Then provide the metadata as JSON in the format:

Configuration

ParameterRequiredDescription
API KeyYesDify Knowledge Base API key for authentication
Base URLYesDify API endpoint URL (e.g., )

Error Handling

The plugin provides descriptive error messages for common issues:

  • Invalid API key or authentication failures
  • Missing required parameters
  • Resource not found errors
  • API rate limiting

Best Practices

  1. Use List Tools First: Before updating or deleting resources, use the corresponding list tools to get the correct IDs
  2. Monitor Indexing: After creating documents, use Get Indexing Status to track embedding progress
  3. Organize with Metadata: Use metadata fields to categorize and filter documents effectively
  4. Choose Search Methods Wisely:
    • Use for meaning-based queries
    • Use for exact matches
    • Use for best of both

Changelog

v0.0.1

  • Initial release
  • Full CRUD operations for Datasets, Documents, and Chunks
  • Metadata management support
  • Multiple search methods for retrieval
  • Auto create/update document feature

v0.0.2

  • Bug fixes and improvements
  • Enhanced error handling

v0.0.3

  • Added animated SVG icon with floating cubes and search effect
  • Updated documentation

v0.0.4

  • Added Get Chunk Details tool for retrieving complete chunk information
  • Added Child Chunk Operations for hierarchical document structures:
    • List Child Chunks
    • Create Child Chunk
    • Update Child Chunk
    • Delete Child Chunk
  • Updated API utility module with new endpoints
  • Enhanced documentation

v0.0.5

  • Added Keyword Search to List Documents tool for filtering documents by name
  • Improved List Documents output with document names and IDs
  • Added tag to plugin manifest

v0.0.6

  • Embedding Cost Calculation Feature:
    • Added configurable Embedding Model selection in provider credentials
    • Added Custom Cost input for custom embedding models (cost per 1M tokens)
    • Supports preset models: OpenAI (ada-002, 3-small, 3-large), Cohere, Voyage
    • All cost calculations now use the configured model rate
  • 📊 JSON Response Enhancement:
    • Added object to JSON response for easy data extraction
    • Fields include: , , ,
    • No more regex needed - directly select cost values from JSON!
  • 🛠️ Tools Updated with Cost Info:
    • Create/Update Document - shows estimated tokens and cost
    • Add Chunks - shows actual/estimated tokens and cost
    • Get Indexing Status - shows actual tokens and cost after indexing
  • 📁 New utility: for centralized cost calculations

v1.0.0

🎉 Major Release — Comprehensive expansion of the Knowledge Pro plugin with 19 new tools and significant improvements.

New Dataset Operations

  • Get Dataset — Retrieve detailed info about a specific knowledge base
  • Update Dataset — Modify knowledge base settings (name, description, permissions, embedding model, retrieval model, etc.)

New Document Operations

  • Get Document — Retrieve detailed info about a specific document including metadata
  • Update Document by Text — Update existing document content and settings separately from create
  • Update Document Status — Batch enable, disable, archive, or unarchive documents

Knowledge Tag Management (NEW category)

  • List Knowledge Tags — View all workspace-level tags
  • Create Knowledge Tag — Create new tags for organizing knowledge bases
  • Update Knowledge Tag — Rename existing tags
  • Delete Knowledge Tag — Remove tags permanently
  • List Dataset Tags — View tags bound to a specific knowledge base
  • Bind Knowledge Tags — Attach tags to a knowledge base
  • Unbind Knowledge Tags — Remove tags from a knowledge base

Built-in Metadata Management (NEW category)

  • List Built-in Metadata — View all built-in metadata fields
  • Toggle Built-in Metadata — Enable or disable built-in metadata fields

Model & Datasource Discovery (NEW category)

  • List Available Models — Browse available embedding and reranking models
  • List Datasource Plugins — View available datasource plugins

Pipeline Operations (NEW category)

  • Run Pipeline — Execute a pipeline with specified parameters
  • Run Datasource Node — Run a specific datasource node within a pipeline
  • Upload Pipeline File — Upload a file for pipeline processing

Improvements

  • Enhanced existing tools with improved parameter handling and error messages
  • Fixed response parsing for API compatibility
  • Updated API utility module with all new endpoints
  • Expanded provider configuration to register all 41 tools

Support

For issues and feature requests, please contact abesticode.

License

This plugin is provided as-is for use with the Dify platform.

CATEGORY
Tool
TAGS
PRODUCTIVITYUTILITIES
VERSION
1.0.0
abesticode·06/02/2026 03:14 AM
REQUIREMENTS
Tool invocation
Maximum memory
256MB
Maximum storage
1MB