app icon
Knowledge Pro
0.0.6

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_pro2497 installs

Knowledge Pro

[Image blocked: Knowledge Pro]

Author: abesticode
Version: 0.0.6
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
Delete DatasetRemove knowledge bases permanently

📄 Document Operations

ToolDescription
Create/Update DocumentAdd new documents with text content, or update existing ones by name. Supports advanced options like chunk method, process rules, and metadata assignment
List DocumentsBrowse documents in a knowledge base
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
Update Document MetadataAssign metadata values to documents

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:

[Image blocked: Authorization Setup]

  • 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:

[Image blocked: Dataset ID]

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:

[Image blocked: Create Metadata]

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:

[Image blocked: List Metadata]

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:

[Image blocked: Config Part 1]

Chunk Method & Process Rules:

[Image blocked: Config Part 2]

Metadata Assignment:

[Image blocked: Config Part 3]


Step 6: Example Output

Successful Document Creation:

[Image blocked: Output Success]

Document with Metadata:

[Image blocked: Output 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

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
0.0.6
abesticode·01/13/2026 02:52 AM
REQUIREMENTS
Tool invocation
Maximum memory
256MB
Maximum storage
1MB