Hi CheetahClaws team,
I'm trying to build a simple custom plugin/tool for the system but I'm unable to get it working. Could you please provide:
An official plugin development guide (how to structure plugins, register tools, how the auto-call / trigger mechanism works, etc.)
A complete working minimal example of a plugin that registers a tool.
What I'm trying to achieve
I want the LLM to automatically call a tool and reply with a cat emoji 🐱 whenever the user prompt contains the word "sample".
My current attempt which is not working:
"""
LLM can automatically call to reply with a cat emoji 🐱
when the user prompt contains the word "sample".
"""
from tool_registry import ToolDef
from typing import Dict, Any
def _sample_cat_tool(params: Dict[str, Any], config: Dict[str, Any]) -> str:
cat_emoji = "🐱"
reason = params.get("reason", "user mentioned 'sample' in prompt")
response = (
f"{cat_emoji} Meow! 'sample' was detected in ({reason})! "
f"{cat_emoji} {cat_emoji} {cat_emoji} !"
)
return response
TOOL_DEFS = [
ToolDef(
name="SampleCatEmoji",
schema={
"name": "SampleCatEmoji",
"description": (
"Automatically respond with a cute cat emoji 🐱 whenever the user's prompt "
"contains the word 'sample'."
),
"input_schema": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Explanation why the tool was triggered.",
"default": "prompt contains 'sample'"
}
},
"required": []
},
},
func=_sample_cat_tool,
read_only=True,
concurrent_safe=True,
),
]
I placed this file in the plugins folder (and also tried /plugin install sample@..... path ) but the tool is never called automatically.
a plugin example or official plugin development guide would be greatly appreciated.
Thanks!
Hi CheetahClaws team,
I'm trying to build a simple custom plugin/tool for the system but I'm unable to get it working. Could you please provide:
An official plugin development guide (how to structure plugins, register tools, how the auto-call / trigger mechanism works, etc.)
A complete working minimal example of a plugin that registers a tool.
What I'm trying to achieve
I want the LLM to automatically call a tool and reply with a cat emoji 🐱 whenever the user prompt contains the word "sample".
My current attempt which is not working:
I placed this file in the plugins folder (and also tried /plugin install sample@..... path ) but the tool is never called automatically.
a plugin example or official plugin development guide would be greatly appreciated.
Thanks!