Dialogue Agent
Author: svcvit
Repository: dify-plugin-tod_agent
Version: 0.0.4
Description
A powerful task-oriented dialogue agent that can collect information through structured conversations. It supports dynamic field validation, multi-field information extraction, and state management. The agent now includes two dialogue strategies: TOD (Task-Oriented Dialogue) for information collection and MTD (Multi-Turn Dialogue) for general conversations.
Features
- Task-oriented dialogue management
- Dynamic field validation
- Multi-field information extraction
- Conversation state persistence
- Automatic answer validation
- Context-aware information collection
- Natural language interaction
- Multiple dialogue strategies support (TOD & MTD)
Usage Guide
Dialogue Strategies
The agent supports two dialogue strategies:
-
TOD (Task-Oriented Dialogue)
- A dialogue strategy for structured information collection
- Suitable for form filling and information gathering scenarios
- Supports dynamic field validation and state management
-
MTD (Multi-Turn Dialogue)
- A strategy for general multi-turn conversations
- Supports context awareness
- Suitable for open-ended dialogue scenarios
TOD Strategy Parameters
-
information_schema (Required)
- Type: string (JSON)
- Description: Schema defining the fields to collect
- Example:
-
query (Required)
- Type: string
- Description: User's input text
-
model (Required)
- Type: AgentModelConfig
- Description: LLM model configuration
- Example: Configuration for GPT or other LLM models
-
storage_key (Required)
- Type: string
- Description: Unique key for storing conversation state
- Example:
MTD Strategy Parameters
-
instruction (Required)
- Type: string
- Description: Dialogue instruction or system prompt
- Example:
-
query (Required)
- Type: string
- Description: User's input text
-
model (Required)
- Type: AgentModelConfig
- Description: LLM model configuration
- Example: Configuration for GPT or other LLM models
-
storage_key (Required)
- Type: string
- Description: Unique key for storing conversation state
- Example:
Changelog
v0.0.4
- Updated dify_plugin dependency requirement to
v0.0.3
- Added MTD (Multi-Turn Dialogue) strategy support
- Fixed data type validation bugs
- Added support for schema JSON without leading spaces (compatible with Dify official update)
v0.0.2
- Added logging functionality
- Added token usage statistics
- Optimized code structure and performance
v0.0.1
- Project initialization
- Implemented multi-turn dialogue
- Implemented conversation state storage
- Implemented intelligent Q&A content extraction