Bot Father: Tools Configuration Fix
Summary
Fixed the bot-father configuration to properly support LangChain task features, specifically the ability to configure which tools to use through a proper flow that separates concerns between behavior rules, property actions, and output configurations.
Problem
The original configuration had the following issues:
Property actions were incorrectly mapped to ask actions - Properties were being set on actions like
ask_for_*_tools_whitelistinstead of having dedicated property-setting actionsQuick replies used JSON strings as expressions - The expressions field contained JSON arrays like
"[\"calculator\",\"websearch\"]"which couldn't be properly matched by behavior rulesDirect input mapping conflict - The system tried to take input from
memory.current.inputwhile also trying to match quick reply expressions, creating a conflict
Solution
Implemented a proper separation of concerns:
1. Property Actions (property.json)
Created dedicated actions for each property setting operation:
set_api_key,set_model_name,set_temperature,set_timeout- For basic configurationset_enable_builtin_tools,set_disable_builtin_tools- For tool enable/disableset_empty_whitelist- For all tools enabled (empty whitelist = no restrictions)set_tools_calculator_websearch- For calculator + websearch combinationset_tools_calculator_web_datetime- For calculator + websearch + datetime combinationset_tools_custom- For custom JSON input from user
2. Behavior Rules (behavior.json)
Updated behavior rules to:
Trigger property actions based on user input expressions
Match simple expression identifiers (e.g.,
enable_all_tools,tools_calc_web,tools_calc_web_datetime)Use negation conditions to handle custom input as a fallback
Chain actions properly: set property → ask next question
3. Output Configuration (output.json)
Updated quick replies to:
Use simple expression identifiers instead of JSON strings
enable_all_tools- Enables all available tools (empty whitelist)tools_calc_web- Enables calculator and websearchtools_calc_web_datetime- Enables calculator, websearch, and datetimeCustom text input - User can enter their own JSON array
Files Modified
Gemini Vertex AI Bot
6740832b2b0f614abcaee7bc/1/6740832b2b0f614abcaee7ba.property.json- ✅ Fixed6740832b2b0f614abcaee7bc/1/6740832b2b0f614abcaee7b7.behavior.json- ✅ Fixed6740832b2b0f614abcaee7bc/1/6740832b2b0f614abcaee7bb.output.json- ✅ Fixed
OpenAI Bot
6740832a2b0f614abcaee7a4/1/6740832a2b0f614abcaee7a2.property.json- ✅ Fixed6740832a2b0f614abcaee7a4/1/6740832a2b0f614abcaee79f.behavior.json- ✅ Fixed6740832a2b0f614abcaee7a4/1/6740832a2b0f614abcaee7a3.output.json- ✅ Fixed
Anthropic Bot
6740832a2b0f614abcaee7b0/1/6740832a2b0f614abcaee7ae.property.json- ✅ Fixed6740832a2b0f614abcaee7b0/1/6740832a2b0f614abcaee7ab.behavior.json- ✅ Fixed6740832a2b0f614abcaee7b0/1/6740832a2b0f614abcaee7af.output.json- ✅ Fixed
JLama (HuggingFace) Bot
6740832b2b0f614abcaee7c8/1/6740832b2b0f614abcaee7c6.property.json- ✅ Fixed6740832b2b0f614abcaee7c8/1/6740832b2b0f614abcaee7c3.behavior.json- ✅ Fixed6740832b2b0f614abcaee7c8/1/6740832b2b0f614abcaee7c7.output.json- ✅ Fixed
Ollama Bot
6740832b2b0f614abcaee7c2/1/6740832b2b0f614abcaee7c0.property.json- ✅ Fixed6740832b2b0f614abcaee7c2/1/6740832b2b0f614abcaee7be.behavior.json- ✅ Fixed6740832b2b0f614abcaee7c2/1/6740832b2b0f614abcaee7c1.output.json- ✅ Fixed
Hugging Face Bot
6740832a2b0f614abcaee7aa/1/6740832a2b0f614abcaee7a8.property.json- ✅ Fixed6740832a2b0f614abcaee7aa/1/6740832a2b0f614abcaee7a5.behavior.json- ✅ Fixed6740832a2b0f614abcaee7aa/1/6740832a2b0f614abcaee7a9.output.json- ✅ Fixed
How It Works Now
User selects "Yes, enable tools" → Expression
truetriggersset_enable_builtin_toolsactionBot asks which tools to enable → Shows quick reply options
User selects quick reply:
"Enable all tools" → Expression
enable_all_tools→ Triggersset_empty_whitelist(empty array = all tools)"Calculator & Web Search" → Expression
tools_calc_web→ Triggersset_tools_calculator_websearch→ Sets["calculator","websearch"]"Calculator, Web, DateTime" → Expression
tools_calc_web_datetime→ Triggersset_tools_calculator_web_datetime→ Sets["calculator","websearch","datetime"]Custom input → User types JSON array → Triggers
set_tools_custom→ Takes value frommemory.current.input
Bot continues → Asks for conversation history limit and proceeds with bot creation
Benefits
✅ Configurable tool selection - Users can choose which tools to enable
✅ Flexible input - Supports both quick replies and custom JSON input
✅ Proper separation - Behavior rules match expressions, property actions set values
✅ Maintainable - Easy to add new tool combinations in the future
✅ Consistent - Same pattern across all LangChain connector bots
✅ No conflicts - Expressions and input mapping work together properly
Testing
All modified JSON files have been validated and contain no syntax errors.
Last updated
Was this helpful?