Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions flexus_client_kit/ckit_integrations_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ async def _init_widget(rcx, setup):
integr_prompt=fi_widget.PRINT_WIDGET_PROMPT,
))

elif name == "ask_questions":
from flexus_client_kit.integrations import fi_question
async def _init_question(rcx, setup):
return None
result.append(IntegrationRecord(
integr_name=name,
integr_tools=[fi_question.ASK_QUESTIONS_TOOL],
integr_init=_init_question,
integr_setup_handlers=lambda obj, rcx: [rcx.on_tool_call("ask_questions")(fi_question.handle_ask_questions)],
integr_prompt=fi_question.ASK_QUESTIONS_PROMPT,
))

elif name == "gmail":
from flexus_client_kit.integrations import fi_gmail
async def _init_gmail(rcx, setup):
Expand Down
17 changes: 17 additions & 0 deletions flexus_client_kit/integrations/fi_question.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@
from flexus_client_kit import ckit_cloudtool


ASK_QUESTIONS_PROMPT = """
## Asking Questions

When asking the user to choose from options, use `ask_questions` instead of numbered lists. This renders interactive UI.

All questions appear together with a single "Send" button.
Do not call multiple `ask_questions` and try not to mix with other actions and tools.

Bad usage (don't do this):
- Single yes/no question like "Does this match what you want?"

Good usage:
- Initial requirements gathering (multiple questions at once)
- Collecting several configuration options together
"""


ASK_QUESTIONS_TOOL = ckit_cloudtool.CloudTool(
strict=False,
name="ask_questions",
Expand Down
1 change: 1 addition & 0 deletions flexus_simple_bots/karen/karen_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"skills",
"flexus_policy_document",
"print_widget",
"ask_questions",
"erp[meta, data, crud, csv_import]",
"crm[manage_contact, manage_deal, log_activity, verify_email]",
"magic_desk",
Expand Down
4 changes: 2 additions & 2 deletions flexus_simple_bots/karen/karen_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

TOOLS_DEFAULT = {
"flexus_policy_document", "mongo_store", "flexus_fetch_skill", "print_widget",
"crm_automation", "flexus_schedule",
"ask_questions", "crm_automation", "flexus_schedule",
"shopify", "shopify_cart",
"erp_table_meta", "erp_table_data", "erp_table_crud", "erp_csv_import",
"repo_reader", "support_collection_status", "explore_a_question",
Expand All @@ -33,7 +33,7 @@

TOOLS_SUPPORT_AND_SALES = {
"flexus_policy_document", "mongo_store", "flexus_fetch_skill",
"product_catalog", "shopify_cart",
"ask_questions", "product_catalog", "shopify_cart",
"manage_crm_contact", "manage_crm_deal", "log_crm_activity", "verify_email",
"email_reply",
"magic_desk", "slack", "telegram", "discord",
Expand Down
5 changes: 5 additions & 0 deletions flexus_simple_bots/karen/karen_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@
* Populated by External Data Source (such as web crawler, unstructured ingest)
* Searchable by calling flexus_vector_search() that gives you snippets as search results, you normally follow up
with a flexus_read_original() call to read more text around the snippet


## Gathering Requirements

When you need to gather requirements or improve the knowledge base, fetch the `collect-support-knowledge-base` skill.
"""

# The user asks how to populate it, fetch the `setting-up-external-knowledge-base` skill for guidance.
Expand Down