Entry:
python skills/ima-knowledge-base/scripts/ima_kb_tool.py <command> ...
Execution Rules
- When the user says "search, check, find, see if there's", first
search-kb - By default return hit snippets directly, do not pile up fields
search-kbWhat is being searched is content, not the knowledge base list- When the user provides
kb-idorkb-name, add targeting parameters - By default prefer
--keyword, use only when explicitly combining multiple words into a single search string--query - For broad searches it is suggested to add
--show 5 --limit 10; if the knowledge base is very large, add--search-pages 2or higher
View a single result
- By default first
show-kb-hit - Only when the hit looks like an image, screenshot, OCR document, menu image, or
show-kb-hitis too short, useinspect-kb-hit - A
--keyword "推荐 菜单 餐厅 美食"will be split into multiple searches, and the same title may appear repeatedly - After a broad search, priority for stable locating: narrower keywords >
--title>--media-id>--pick
Common Commands
python skills/ima-knowledge-base/scripts/ima_kb_tool.py search-kb --keyword "orslow"
python skills/ima-knowledge-base/scripts/ima_kb_tool.py search-kb --keyword "推荐 菜单 餐厅 美食" --show 5 --limit 10
python skills/ima-knowledge-base/scripts/ima_kb_tool.py search-kb --kb-name "个人知识库" --keyword "菜单"
python skills/ima-knowledge-base/scripts/ima_kb_tool.py show-kb-hit --keyword "orslow" --pick 1
python skills/ima-knowledge-base/scripts/ima_kb_tool.py inspect-kb-hit --keyword "orslow" --pick 1
python skills/ima-knowledge-base/scripts/ima_kb_tool.py list-kb
python skills/ima-knowledge-base/scripts/ima_kb_tool.py list-kb-items --kb-name "个人知识库" --limit 20
python skills/ima-knowledge-base/scripts/ima_kb_tool.py upload-file --kb-name "个人知识库" --file "/path/to/report.pdf"
python skills/ima-knowledge-base/scripts/ima_kb_tool.py import-url --kb-name "个人知识库" --url "https://example.com"
Recommendation-type Questions
When the user asks "what recommendations are in the knowledge base":
- First do a broad search:
search-kb --keyword "推荐 菜单 餐厅 美食" --show 5 --limit 10 - If hits are too mixed, add object words, e.g.
search-kb --keyword "orslow 推荐" - After locking a single item first
show-kb-hit - Only when OCR-extended snippets are needed
inspect-kb-hit
Write Safety
upload-file、import-urlwill actually write to the knowledge base; before execution, first confirm the target knowledge base- When configuration is needed, check
scripts/config.jsonandconfig.help.md
How to Configure
Download the latest IMA client (e.g. Android), after logging in click "Me" --> Claw Configuration --> copy the client_id and api_key parameters, provide them to CountBot and it will automatically call the file editing tool to modify config.json.