dao-ai 0.1.4__tar.gz → 0.1.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dao_ai-0.1.4 → dao_ai-0.1.6}/CHANGELOG.md +34 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/PKG-INFO +1 -1
- dao_ai-0.1.6/config/examples/02_mcp/README.md +281 -0
- dao_ai-0.1.6/config/examples/02_mcp/filtered_mcp.yaml +327 -0
- dao_ai-0.1.6/config/examples/12_middleware/README.md +1253 -0
- dao_ai-0.1.6/config/examples/12_middleware/context_management.yaml +327 -0
- dao_ai-0.1.6/config/examples/12_middleware/limit_middleware.yaml +299 -0
- dao_ai-0.1.6/config/examples/12_middleware/pii_middleware.yaml +384 -0
- dao_ai-0.1.6/config/examples/12_middleware/retry_middleware.yaml +313 -0
- dao_ai-0.1.6/config/examples/12_middleware/tool_selector_middleware.yaml +321 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/docs/cli-reference.md +116 -0
- dao_ai-0.1.6/docs/configuration-reference.md +345 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/docs/examples.md +10 -1
- {dao_ai-0.1.4 → dao_ai-0.1.6}/docs/key-capabilities.md +30 -20
- {dao_ai-0.1.4 → dao_ai-0.1.6}/docs/python-api.md +26 -8
- {dao_ai-0.1.4 → dao_ai-0.1.6}/pyproject.toml +1 -1
- {dao_ai-0.1.4 → dao_ai-0.1.6}/schemas/model_config_schema.json +114 -6
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/cli.py +329 -17
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/config.py +56 -3
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/middleware/__init__.py +38 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/middleware/assertions.py +3 -3
- dao_ai-0.1.6/src/dao_ai/middleware/context_editing.py +230 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/middleware/core.py +4 -4
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/middleware/guardrails.py +3 -3
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/middleware/human_in_the_loop.py +3 -2
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/middleware/message_validation.py +4 -4
- dao_ai-0.1.6/src/dao_ai/middleware/model_call_limit.py +77 -0
- dao_ai-0.1.6/src/dao_ai/middleware/model_retry.py +121 -0
- dao_ai-0.1.6/src/dao_ai/middleware/pii.py +157 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/middleware/summarization.py +1 -1
- dao_ai-0.1.6/src/dao_ai/middleware/tool_call_limit.py +210 -0
- dao_ai-0.1.6/src/dao_ai/middleware/tool_retry.py +174 -0
- dao_ai-0.1.6/src/dao_ai/middleware/tool_selector.py +129 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/nodes.py +5 -12
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/orchestration/supervisor.py +6 -5
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/prompts.py +2 -60
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/tools/__init__.py +3 -1
- dao_ai-0.1.6/src/dao_ai/tools/mcp.py +554 -0
- dao_ai-0.1.6/tests/dao_ai/middleware/test_context_editing.py +187 -0
- dao_ai-0.1.6/tests/dao_ai/middleware/test_model_call_limit.py +102 -0
- dao_ai-0.1.6/tests/dao_ai/middleware/test_model_retry.py +127 -0
- dao_ai-0.1.6/tests/dao_ai/middleware/test_pii.py +205 -0
- dao_ai-0.1.6/tests/dao_ai/middleware/test_tool_call_limit.py +228 -0
- dao_ai-0.1.6/tests/dao_ai/middleware/test_tool_retry.py +152 -0
- dao_ai-0.1.6/tests/dao_ai/middleware/test_tool_selector.py +193 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_assertions_middleware.py +12 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_chat_history.py +12 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_databricks.py +90 -78
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_human_in_the_loop.py +17 -7
- dao_ai-0.1.6/tests/dao_ai/test_mcp_filtering.py +256 -0
- dao_ai-0.1.6/tests/dao_ai/test_mcp_filtering_integration.py +513 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_message_validation_middleware.py +3 -0
- dao_ai-0.1.4/config/examples/02_mcp/README.md +0 -132
- dao_ai-0.1.4/config/examples/12_middleware/README.md +0 -467
- dao_ai-0.1.4/docs/configuration-reference.md +0 -170
- dao_ai-0.1.4/src/dao_ai/tools/mcp.py +0 -263
- {dao_ai-0.1.4 → dao_ai-0.1.6}/.gitignore +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/.python-version +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/CONTRIBUTING.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/LICENSE +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/Makefile +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/README.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/01_getting_started/README.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/01_getting_started/minimal.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/02_mcp/custom_mcp.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/02_mcp/external_mcp.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/02_mcp/managed_mcp.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/02_mcp/slack_integration.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/03_reranking/README.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/03_reranking/vector_search_with_reranking.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/04_genie/README.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/04_genie/genie_basic.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/04_genie/genie_lru_cache.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/04_genie/genie_semantic_cache.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/04_genie/genie_with_conversation_id.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/05_memory/README.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/05_memory/conversation_summarization.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/05_memory/in_memory_basic.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/05_memory/lakebase_persistence.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/05_memory/postgres_persistence.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/06_on_behalf_of_user/README.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/06_on_behalf_of_user/obo_basic.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/07_human_in_the_loop/README.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/07_human_in_the_loop/human_in_the_loop.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/08_guardrails/README.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/08_guardrails/guardrails_basic.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/09_structured_output/README.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/09_structured_output/structured_output.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/10_agent_integrations/README.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/10_agent_integrations/agent_bricks.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/10_agent_integrations/kasal.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/11_prompt_engineering/README.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/11_prompt_engineering/prompt_optimization.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/11_prompt_engineering/prompt_registry.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/12_middleware/combined_middleware.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/12_middleware/custom_field_validation.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/12_middleware/logging_middleware.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/13_orchestration/README.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/13_orchestration/supervisor_pattern.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/13_orchestration/swarm_pattern.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/14_basic_tools/README.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/14_basic_tools/sql_tool_example.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/15_complete_applications/README.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/15_complete_applications/brick_store.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/15_complete_applications/deep_research.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/15_complete_applications/executive_assistant.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/15_complete_applications/genie_and_genie_mcp.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/15_complete_applications/genie_vector_search_hybrid.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/15_complete_applications/hardware_store.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/15_complete_applications/hardware_store_lakebase.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/15_complete_applications/hardware_store_swarm.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/15_complete_applications/quick_serve_restaurant.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/15_complete_applications/reservations_system.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/config/examples/README.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/appointments.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/appointments_data.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/brand_rep_demo_data.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/brand_rep_demo_queries.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/brand_rep_demo_tables.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/brand_rep_demo_validation.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/customers.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/customers_data.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/dim_stores.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/dim_stores_data.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/employee_performance.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/employee_performance_data.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/employee_tasks.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/employee_tasks_data.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/inventory.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/inventory_data.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/managers.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/managers_data.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/product_data.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/products.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/dais2025/task_assignments.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/hardware_store/inventory.snappy.parquet +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/hardware_store/inventory.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/hardware_store/products.snappy.parquet +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/hardware_store/products.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/quick_serve_restaurant/.gitkeep +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/quick_serve_restaurant/fulfil_item_orders.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/quick_serve_restaurant/items_description.csv +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/quick_serve_restaurant/items_description.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/quick_serve_restaurant/items_raw.csv +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/quick_serve_restaurant/items_raw.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/quick_serve_restaurant/orders_raw.csv +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/data/quick_serve_restaurant/orders_raw.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/databricks.yaml.template +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/docs/architecture.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/docs/contributing.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/docs/faq.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/docs/hardware_store/README.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/docs/hardware_store/retail_supervisor.png +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/docs/hardware_store/retail_swarm.png +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/docs/images/genie.png +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/docs/quick_serve_restaurant/.gitkeep +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/docs/quick_serve_restaurant/quick-serve-restaurant.png +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/docs/why-dao.md +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/environment.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/examples/dais2025/examples.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/examples/deep_research/examples.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/examples/executive_assistant/examples.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/examples/hardware_store/examples.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/examples/quick_serve_restaurant/.gitkeep +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/examples/quick_serve_restaurant/examples.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/dais2025/extract_store_numbers.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/dais2025/find_inventory_by_sku.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/dais2025/find_inventory_by_upc.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/dais2025/find_product_by_sku.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/dais2025/find_product_by_upc.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/dais2025/find_store_by_number.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/dais2025/find_store_inventory_by_sku.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/dais2025/find_store_inventory_by_upc.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/hardware_store/find_inventory_by_sku.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/hardware_store/find_inventory_by_upc.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/hardware_store/find_product_by_sku.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/hardware_store/find_product_by_upc.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/hardware_store/find_store_inventory_by_sku.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/hardware_store/find_store_inventory_by_upc.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/quick_serve_restaurant/.gitkeep +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/quick_serve_restaurant/insert_coffee_order.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/quick_serve_restaurant/lookup_items_by_descriptions.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/quick_serve_restaurant/match_historical_item_order_by_date.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/functions/quick_serve_restaurant/match_item_by_description_and_price.sql +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/notebooks/01_ingest_and_transform.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/notebooks/02_provision_vector_search.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/notebooks/03_provision_lakebase.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/notebooks/04_unity_catalog_tools.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/notebooks/05_deploy_agent.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/notebooks/06_generate_evaluation_data.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/notebooks/07_run_evaluation.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/notebooks/08_run_examples.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/notebooks/09_evaluate_inferences.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/notebooks/10_optimize_prompts.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/notebooks/99_scratchpad.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/requirements.txt +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/schemas/bundle_config_schema.json +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dais2025/__init__.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dais2025/models.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dais2025/tools/__init__.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dais2025/tools/customer.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dais2025/tools/employee.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dais2025/tools/executive.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dais2025/tools/genie.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dais2025/tools/inventory.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dais2025/tools/models.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dais2025/tools/store.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/__init__.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/agent_as_code.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/catalog.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/genie/__init__.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/genie/cache/__init__.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/genie/cache/base.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/genie/cache/core.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/genie/cache/lru.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/genie/cache/semantic.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/genie/core.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/graph.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/hooks/__init__.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/hooks/core.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/logging.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/memory/__init__.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/memory/base.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/memory/core.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/memory/databricks.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/memory/postgres.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/messages.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/middleware/base.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/models.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/optimization.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/orchestration/__init__.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/orchestration/core.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/orchestration/swarm.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/providers/__init__.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/providers/base.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/providers/databricks.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/state.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/tools/agent.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/tools/core.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/tools/email.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/tools/genie.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/tools/memory.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/tools/python.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/tools/search.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/tools/slack.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/tools/sql.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/tools/time.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/tools/unity_catalog.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/tools/vector_search.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/types.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/utils.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/src/dao_ai/vector_search.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/config/test_model_config.yaml +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/conftest.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_agent_response_format.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_catalog.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_config.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_function_parsing.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_genie.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_genie_conversation_ids_in_outputs.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_genie_databricks_integration.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_genie_room_model.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_guardrail_retry.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_hitl_config_model.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_hitl_responses_agent.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_hooks.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_inference.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_inference_integration.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_input_output_structure.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_interrupt_type.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_llm_interrupt_handling.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_mcp.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_mcp_function_model.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_messages.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_models.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_optimization.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_postgres_integration.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_prompt_optimizations.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_prompts.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_reranking.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_reranking_integration.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_resources_model_genie_integration.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_response_format.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_responses_agent_structured_output_unit.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_semantic_cache_context.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_sql_tool.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_sql_tool_integration.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_state.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_summarization_inference.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_swarm_middleware.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_tools.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_types.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_unity_catalog.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_utils.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_utils_type_from_fqn.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/test_vector_search.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/dao_ai/weather_server_mcp.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/hardware_store/.gitkeep +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/hardware_store/test_graph.py +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/images/doritos_upc.png +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/images/lays_upc.png +0 -0
- {dao_ai-0.1.4 → dao_ai-0.1.6}/tests/quick_serve_restaurant/.gitkeep +0 -0
|
@@ -7,6 +7,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Added
|
|
11
|
+
- **MCP Tool Filtering**: Control which tools are loaded from MCP servers
|
|
12
|
+
- `include_tools`: Optional allowlist with glob pattern support (e.g., `["query_*", "list_*"]`)
|
|
13
|
+
- `exclude_tools`: Optional denylist with glob pattern support (e.g., `["drop_*", "delete_*"]`)
|
|
14
|
+
- Precedence: exclude always overrides include for maximum security
|
|
15
|
+
- Pattern syntax: `*` (any chars), `?` (single char), `[abc]` (char set), `[!abc]` (negation)
|
|
16
|
+
- Use cases: Security (block dangerous operations), performance (reduce context), access control
|
|
17
|
+
- New example config: `config/examples/02_mcp/filtered_mcp.yaml` with 6 filtering strategies
|
|
18
|
+
- Comprehensive documentation in configuration reference and MCP README
|
|
19
|
+
|
|
20
|
+
- **CLI: list-mcp-tools Command**: Discover and inspect MCP tools from configuration
|
|
21
|
+
- Lists all available tools from configured MCP servers with full details
|
|
22
|
+
- Shows tool descriptions (no truncation), parameters, types, and requirements
|
|
23
|
+
- Pretty-printed schemas in readable format (53% more compact than JSON)
|
|
24
|
+
- Filter statistics: total available, included, and excluded tool counts
|
|
25
|
+
- `--apply-filters` flag: Show only tools that will be loaded (respects include/exclude)
|
|
26
|
+
- Aggregated output: Collects all data before display (no logging interference)
|
|
27
|
+
- Detailed exclusion reasons: Shows why tools are filtered out
|
|
28
|
+
- Use cases: Discovery, debugging, validation, planning, documentation
|
|
29
|
+
|
|
30
|
+
- **AnyVariable Support for Additional Fields**: More configuration flexibility
|
|
31
|
+
- `SchemaModel.catalog_name` and `SchemaModel.schema_name` now support AnyVariable
|
|
32
|
+
- `DatabricksAppModel.url` now supports AnyVariable
|
|
33
|
+
- Allows environment variables, Databricks secrets, and fallback chains
|
|
34
|
+
- Benefits: Environment flexibility, security, portability, backwards compatible
|
|
35
|
+
- Examples: `{env: CATALOG_NAME}`, `{scope: secrets, secret: url}`, composite fallbacks
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
- **Refactored Dynamic Prompt Creation**: Simplified and improved `prompts.py`
|
|
39
|
+
- Consolidated redundant prompt creation logic into single `make_prompt()` function
|
|
40
|
+
- Removed unused `create_prompt_middleware()` function (dead code)
|
|
41
|
+
- Cleaner context field handling with generic loop over all context attributes
|
|
42
|
+
- More maintainable codebase with reduced duplication
|
|
43
|
+
|
|
10
44
|
## [0.1.0] - 2025-12-19
|
|
11
45
|
|
|
12
46
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dao-ai
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Summary: DAO AI: A modular, multi-agent orchestration framework for complex AI workflows. Supports agent handoff, tool integration, and dynamic configuration via YAML.
|
|
5
5
|
Project-URL: Homepage, https://github.com/natefleming/dao-ai
|
|
6
6
|
Project-URL: Documentation, https://natefleming.github.io/dao-ai
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# 02. Tools
|
|
2
|
+
|
|
3
|
+
**Integrate with external services and Databricks capabilities**
|
|
4
|
+
|
|
5
|
+
This category demonstrates how to connect your agents to various tools and services. Each example focuses on a specific tool integration pattern.
|
|
6
|
+
|
|
7
|
+
## Examples
|
|
8
|
+
|
|
9
|
+
| File | Description | Prerequisites |
|
|
10
|
+
|------|-------------|---------------|
|
|
11
|
+
| `slack_integration.yaml` | Slack messaging integration | Slack workspace, bot token |
|
|
12
|
+
| `custom_mcp.yaml` | Custom MCP integration (JIRA example) | JIRA instance, API token |
|
|
13
|
+
| `managed_mcp.yaml` | Managed Model Context Protocol integration | MCP server |
|
|
14
|
+
| `external_mcp.yaml` | External MCP with Unity Catalog connections | Unity Catalog, MCP connection |
|
|
15
|
+
| `filtered_mcp.yaml` | MCP tool filtering examples | MCP server with multiple tools |
|
|
16
|
+
| `genie_with_conversation_id.yaml` | Genie with conversation tracking | Genie space |
|
|
17
|
+
|
|
18
|
+
## What You'll Learn
|
|
19
|
+
|
|
20
|
+
- **External service integration** - Connect to Slack, JIRA, and other services
|
|
21
|
+
- **Model Context Protocol (MCP)** - Standardized tool integration
|
|
22
|
+
- **Unity Catalog connections** - Secure credential management
|
|
23
|
+
- **Vector Search** - Semantic search and RAG patterns
|
|
24
|
+
- **Reranking** - Improve search relevance with FlashRank
|
|
25
|
+
- **Conversation tracking** - Maintain context across interactions
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
### Test Slack integration
|
|
30
|
+
```bash
|
|
31
|
+
# Set your Slack token
|
|
32
|
+
export SLACK_BOT_TOKEN="xoxb-your-token"
|
|
33
|
+
|
|
34
|
+
dao-ai chat -c config/examples/02_mcp/slack_integration.yaml
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Example: *"Send a message to #general saying 'Hello from DAO AI!'"*
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
Example: *"Find documentation about configuring agents"*
|
|
41
|
+
|
|
42
|
+
## Integration Patterns
|
|
43
|
+
|
|
44
|
+
### External APIs (Slack, JIRA)
|
|
45
|
+
- **Authentication**: Tokens stored in environment variables or Databricks Secrets
|
|
46
|
+
- **Tool definition**: Factory functions create tools from credentials
|
|
47
|
+
- **Usage**: Agent calls tools based on natural language requests
|
|
48
|
+
|
|
49
|
+
### Model Context Protocol (MCP)
|
|
50
|
+
- **Standardized interface**: Consistent pattern for external integrations
|
|
51
|
+
- **Server-based**: MCP servers expose tools to agents
|
|
52
|
+
- **UC Connections**: Secure credential management via Unity Catalog
|
|
53
|
+
|
|
54
|
+
### Vector Search & RAG
|
|
55
|
+
- **Semantic search**: Find relevant information using embeddings
|
|
56
|
+
- **Reranking**: Improve precision with FlashRank post-processing
|
|
57
|
+
- **Context injection**: Retrieved content added to agent prompts
|
|
58
|
+
|
|
59
|
+
### MCP Tool Filtering
|
|
60
|
+
- **Security**: Block dangerous operations (drop, delete, execute DDL)
|
|
61
|
+
- **Performance**: Load only relevant tools to reduce context size
|
|
62
|
+
- **Access Control**: Filter tools based on user permissions
|
|
63
|
+
- **Cost Optimization**: Minimize token usage by reducing tool set
|
|
64
|
+
|
|
65
|
+
## MCP Tool Filtering
|
|
66
|
+
|
|
67
|
+
MCP servers can expose many tools. Use `include_tools` and `exclude_tools` to control which tools are loaded from the server.
|
|
68
|
+
|
|
69
|
+
### Why Filter Tools?
|
|
70
|
+
|
|
71
|
+
**Security**
|
|
72
|
+
- Block dangerous operations (drop_table, delete_data, execute_ddl)
|
|
73
|
+
- Prevent unauthorized access to sensitive functions
|
|
74
|
+
- Enforce principle of least privilege
|
|
75
|
+
|
|
76
|
+
**Performance**
|
|
77
|
+
- Reduce context window usage
|
|
78
|
+
- Faster agent responses with fewer tools to consider
|
|
79
|
+
- Lower token costs per request
|
|
80
|
+
|
|
81
|
+
**Usability**
|
|
82
|
+
- Agents make better decisions with focused tool sets
|
|
83
|
+
- Reduce tool confusion and selection errors
|
|
84
|
+
- Clearer audit trails of available operations
|
|
85
|
+
|
|
86
|
+
### Filtering Options
|
|
87
|
+
|
|
88
|
+
#### 1. Include Tools (Allowlist)
|
|
89
|
+
Load only specified tools - most secure approach:
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
function:
|
|
93
|
+
type: mcp
|
|
94
|
+
sql: true
|
|
95
|
+
include_tools:
|
|
96
|
+
- execute_query # Exact name
|
|
97
|
+
- list_tables # Exact name
|
|
98
|
+
- "query_*" # Pattern: all query tools
|
|
99
|
+
- "get_*" # Pattern: all getter tools
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
#### 2. Exclude Tools (Denylist)
|
|
103
|
+
Load all tools except specified ones - flexible approach:
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
function:
|
|
107
|
+
type: mcp
|
|
108
|
+
sql: true
|
|
109
|
+
exclude_tools:
|
|
110
|
+
- "drop_*" # Pattern: block all drop operations
|
|
111
|
+
- "delete_*" # Pattern: block all delete operations
|
|
112
|
+
- execute_ddl # Exact name
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
#### 3. Hybrid Filtering
|
|
116
|
+
Combine include and exclude for fine-grained control:
|
|
117
|
+
|
|
118
|
+
```yaml
|
|
119
|
+
function:
|
|
120
|
+
type: mcp
|
|
121
|
+
functions: *schema
|
|
122
|
+
include_tools:
|
|
123
|
+
- "query_*" # Start with all query tools
|
|
124
|
+
- "list_*" # And all list tools
|
|
125
|
+
exclude_tools:
|
|
126
|
+
- "*_sensitive" # But exclude sensitive ones
|
|
127
|
+
- "*_admin" # And admin functions
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Important:** `exclude_tools` always takes precedence over `include_tools`
|
|
131
|
+
|
|
132
|
+
### Pattern Syntax
|
|
133
|
+
|
|
134
|
+
Supports glob patterns (from Python's `fnmatch`):
|
|
135
|
+
|
|
136
|
+
| Pattern | Description | Examples |
|
|
137
|
+
|---------|-------------|----------|
|
|
138
|
+
| `*` | Matches any characters | `query_*` matches `query_sales`, `query_inventory` |
|
|
139
|
+
| `?` | Matches single character | `tool_?` matches `tool_a`, `tool_b` but not `tool_ab` |
|
|
140
|
+
| `[abc]` | Matches any char in set | `tool_[123]` matches `tool_1`, `tool_2`, `tool_3` |
|
|
141
|
+
| `[!abc]` | Matches any char NOT in set | `tool_[!abc]` matches `tool_d`, `tool_1` |
|
|
142
|
+
|
|
143
|
+
### Common Filtering Patterns
|
|
144
|
+
|
|
145
|
+
**Read-Only SQL Access**
|
|
146
|
+
```yaml
|
|
147
|
+
include_tools: ["query_*", "list_*", "describe_*", "show_*", "get_*"]
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**Block Dangerous Operations**
|
|
151
|
+
```yaml
|
|
152
|
+
exclude_tools: ["drop_*", "delete_*", "truncate_*", "execute_ddl", "alter_*"]
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Development Mode (Safe Defaults)**
|
|
156
|
+
```yaml
|
|
157
|
+
exclude_tools: ["drop_*", "truncate_*", "execute_ddl"]
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Admin Functions Only**
|
|
161
|
+
```yaml
|
|
162
|
+
include_tools: ["admin_*", "manage_*", "configure_*"]
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**No Sensitive Data Access**
|
|
166
|
+
```yaml
|
|
167
|
+
exclude_tools: ["*_sensitive", "*_secret", "*_password", "*_credential"]
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Examples in filtered_mcp.yaml
|
|
171
|
+
|
|
172
|
+
The `filtered_mcp.yaml` file demonstrates 6 different filtering strategies:
|
|
173
|
+
|
|
174
|
+
1. **sql_safe_tools**: Explicit allowlist of safe operations
|
|
175
|
+
2. **sql_readonly**: Block all write operations with patterns
|
|
176
|
+
3. **functions_filtered**: Hybrid filtering with include + exclude
|
|
177
|
+
4. **query_tools_only**: Pattern-based inclusion for consistency
|
|
178
|
+
5. **minimal_tools**: Maximum security with only 3 tools
|
|
179
|
+
6. **dev_tools**: Development mode blocking only critical operations
|
|
180
|
+
|
|
181
|
+
### Best Practices
|
|
182
|
+
|
|
183
|
+
1. **Start with allowlist (include_tools) for production** - safest approach
|
|
184
|
+
2. **Use denylist (exclude_tools) for development** - more flexible
|
|
185
|
+
3. **Test your filters** - verify correct tools are loaded via logging
|
|
186
|
+
4. **Document your reasoning** - why are you filtering these tools?
|
|
187
|
+
5. **Use patterns for consistency** - avoid maintaining long lists
|
|
188
|
+
6. **Review regularly** - as MCP servers change, update filters
|
|
189
|
+
|
|
190
|
+
### Testing Filters
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
# Test with filtered MCP configuration
|
|
194
|
+
dao-ai chat -c config/examples/02_mcp/filtered_mcp.yaml
|
|
195
|
+
|
|
196
|
+
# Try these commands to verify filtering:
|
|
197
|
+
# 1. "List all available tools" - see what's loaded
|
|
198
|
+
# 2. "Drop the users table" - should fail (tool not available)
|
|
199
|
+
# 3. "Query sales data" - should work (read operation)
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
The logs will show:
|
|
203
|
+
- Original tool count from MCP server
|
|
204
|
+
- Filtered tool count after include/exclude
|
|
205
|
+
- Final list of available tools
|
|
206
|
+
|
|
207
|
+
## Prerequisites
|
|
208
|
+
|
|
209
|
+
### For Slack (`slack_integration.yaml`)
|
|
210
|
+
- Slack workspace with bot created
|
|
211
|
+
- Bot token with appropriate scopes
|
|
212
|
+
- Channel access for the bot
|
|
213
|
+
|
|
214
|
+
### For Custom MCP (`custom_mcp.yaml`)
|
|
215
|
+
- JIRA instance URL
|
|
216
|
+
- API token or OAuth credentials
|
|
217
|
+
- Project permissions
|
|
218
|
+
|
|
219
|
+
### For MCP (`managed_mcp.yaml`, `external_mcp.yaml`)
|
|
220
|
+
- MCP server running and accessible
|
|
221
|
+
- For external MCP: Unity Catalog connection configured
|
|
222
|
+
|
|
223
|
+
- Databricks Vector Search index configured
|
|
224
|
+
- Embedding model endpoint
|
|
225
|
+
- FlashRank installed (for reranking)
|
|
226
|
+
|
|
227
|
+
### For Genie (`genie_with_conversation_id.yaml`)
|
|
228
|
+
- Genie space with tables
|
|
229
|
+
- Conversation tracking enabled
|
|
230
|
+
|
|
231
|
+
## Security Best Practices
|
|
232
|
+
|
|
233
|
+
🔒 **Never commit credentials** to configuration files
|
|
234
|
+
|
|
235
|
+
**Best practices:**
|
|
236
|
+
- Use environment variables for development
|
|
237
|
+
- Use Databricks Secrets for production
|
|
238
|
+
- Use Unity Catalog connections for enterprise deployments
|
|
239
|
+
- Rotate credentials regularly
|
|
240
|
+
|
|
241
|
+
**Example credential management:**
|
|
242
|
+
```yaml
|
|
243
|
+
variables:
|
|
244
|
+
slack_token: &slack_token
|
|
245
|
+
options:
|
|
246
|
+
- env: SLACK_BOT_TOKEN # Development
|
|
247
|
+
- scope: secrets # Production
|
|
248
|
+
secret: slack_bot_token
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Next Steps
|
|
252
|
+
|
|
253
|
+
After mastering tool integrations:
|
|
254
|
+
|
|
255
|
+
👉 **04_genie/** - Optimize tool calls with caching
|
|
256
|
+
👉 **05_memory/** - Add conversation persistence
|
|
257
|
+
👉 **07_human_in_the_loop/** - Add approval workflows for sensitive operations
|
|
258
|
+
|
|
259
|
+
## Troubleshooting
|
|
260
|
+
|
|
261
|
+
**"Authentication failed"**
|
|
262
|
+
- Verify credentials are set correctly
|
|
263
|
+
- Check token/API key has required permissions
|
|
264
|
+
- Ensure Databricks Secrets scope exists
|
|
265
|
+
|
|
266
|
+
**"Tool not found"**
|
|
267
|
+
- Verify tool factory function is correctly configured
|
|
268
|
+
- Check tool name matches agent configuration
|
|
269
|
+
- Review tool registration in logs
|
|
270
|
+
|
|
271
|
+
**"Vector search index not accessible"**
|
|
272
|
+
- Confirm index exists and is active
|
|
273
|
+
- Verify Unity Catalog permissions
|
|
274
|
+
- Check embedding model endpoint is serving
|
|
275
|
+
|
|
276
|
+
## Related Documentation
|
|
277
|
+
|
|
278
|
+
- [Tool Development Guide](../../../docs/contributing.md#adding-a-new-tool)
|
|
279
|
+
- [Unity Catalog Connections](../../../docs/configuration-reference.md)
|
|
280
|
+
- [MCP Documentation](https://modelcontextprotocol.io/)
|
|
281
|
+
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
# yaml-language-server: $schema=../../../schemas/model_config_schema.json
|
|
2
|
+
#
|
|
3
|
+
# Example: Filtering MCP Server Tools
|
|
4
|
+
#
|
|
5
|
+
# This example demonstrates how to control which tools are loaded from
|
|
6
|
+
# MCP servers using include_tools and exclude_tools with glob pattern support.
|
|
7
|
+
#
|
|
8
|
+
# Use Cases:
|
|
9
|
+
# - Security: Block dangerous operations (drop, delete, execute_ddl)
|
|
10
|
+
# - Performance: Load only relevant tools to reduce context size
|
|
11
|
+
# - Access Control: Filter tools based on user permissions
|
|
12
|
+
# - Cost Optimization: Minimize token usage by reducing tool set
|
|
13
|
+
#
|
|
14
|
+
# Pattern Syntax:
|
|
15
|
+
# - * matches any characters: "query_*" matches "query_sales", "query_inventory"
|
|
16
|
+
# - ? matches single character: "tool_?" matches "tool_a", "tool_b"
|
|
17
|
+
# - [abc] matches any char in set: "tool_[123]" matches "tool_1", "tool_2"
|
|
18
|
+
# - [!abc] matches any char NOT in set
|
|
19
|
+
#
|
|
20
|
+
# Precedence: exclude_tools ALWAYS overrides include_tools
|
|
21
|
+
#
|
|
22
|
+
# =============================================================================
|
|
23
|
+
# ENVIRONMENT VARIABLES
|
|
24
|
+
# =============================================================================
|
|
25
|
+
|
|
26
|
+
variables:
|
|
27
|
+
client_id: &client_id
|
|
28
|
+
options:
|
|
29
|
+
- env: RETAIL_AI_DATABRICKS_CLIENT_ID
|
|
30
|
+
- scope: retail_ai
|
|
31
|
+
secret: RETAIL_AI_DATABRICKS_CLIENT_ID
|
|
32
|
+
|
|
33
|
+
client_secret: &client_secret
|
|
34
|
+
options:
|
|
35
|
+
- env: RETAIL_AI_DATABRICKS_CLIENT_SECRET
|
|
36
|
+
- scope: retail_ai
|
|
37
|
+
secret: RETAIL_AI_DATABRICKS_CLIENT_SECRET
|
|
38
|
+
|
|
39
|
+
workspace_host: &workspace_host
|
|
40
|
+
options:
|
|
41
|
+
- env: RETAIL_AI_DATABRICKS_HOST
|
|
42
|
+
- scope: retail_ai
|
|
43
|
+
secret: RETAIL_AI_DATABRICKS_HOST
|
|
44
|
+
|
|
45
|
+
# =============================================================================
|
|
46
|
+
# SCHEMAS
|
|
47
|
+
# =============================================================================
|
|
48
|
+
|
|
49
|
+
schemas:
|
|
50
|
+
retail_schema: &retail_schema
|
|
51
|
+
catalog_name: retail_consumer_goods
|
|
52
|
+
schema_name: hardware_store
|
|
53
|
+
|
|
54
|
+
# =============================================================================
|
|
55
|
+
# RESOURCES
|
|
56
|
+
# =============================================================================
|
|
57
|
+
|
|
58
|
+
resources:
|
|
59
|
+
llms:
|
|
60
|
+
default_llm: &default_llm
|
|
61
|
+
name: databricks-claude-sonnet-4
|
|
62
|
+
temperature: 0.1
|
|
63
|
+
|
|
64
|
+
# =============================================================================
|
|
65
|
+
# TOOLS - MCP WITH FILTERING
|
|
66
|
+
# =============================================================================
|
|
67
|
+
|
|
68
|
+
tools:
|
|
69
|
+
# ---------------------------------------------------------------------------
|
|
70
|
+
# Example 1: Include Specific Tools Only (Allowlist)
|
|
71
|
+
# ---------------------------------------------------------------------------
|
|
72
|
+
# Best for: Maximum security, explicit control
|
|
73
|
+
# Use when: You want to be very explicit about what's allowed
|
|
74
|
+
|
|
75
|
+
sql_safe_tools: &sql_safe_tools
|
|
76
|
+
name: sql_safe
|
|
77
|
+
function:
|
|
78
|
+
type: mcp
|
|
79
|
+
sql: true # Serverless DBSQL MCP
|
|
80
|
+
client_id: *client_id
|
|
81
|
+
client_secret: *client_secret
|
|
82
|
+
workspace_host: *workspace_host
|
|
83
|
+
# Only load these specific tools - nothing else
|
|
84
|
+
include_tools:
|
|
85
|
+
- execute_query # Exact match
|
|
86
|
+
- list_tables # Exact match
|
|
87
|
+
- describe_table # Exact match
|
|
88
|
+
- get_* # Pattern: all getters
|
|
89
|
+
- show_* # Pattern: all show operations
|
|
90
|
+
|
|
91
|
+
# ---------------------------------------------------------------------------
|
|
92
|
+
# Example 2: Exclude Dangerous Tools (Denylist)
|
|
93
|
+
# ---------------------------------------------------------------------------
|
|
94
|
+
# Best for: General purpose with safety guardrails
|
|
95
|
+
# Use when: You want most tools but need to block specific ones
|
|
96
|
+
|
|
97
|
+
sql_readonly: &sql_readonly
|
|
98
|
+
name: sql_readonly
|
|
99
|
+
function:
|
|
100
|
+
type: mcp
|
|
101
|
+
sql: true
|
|
102
|
+
client_id: *client_id
|
|
103
|
+
client_secret: *client_secret
|
|
104
|
+
workspace_host: *workspace_host
|
|
105
|
+
# Load all tools EXCEPT these dangerous ones
|
|
106
|
+
exclude_tools:
|
|
107
|
+
- drop_* # Block all drop operations
|
|
108
|
+
- delete_* # Block all delete operations
|
|
109
|
+
- truncate_* # Block all truncate operations
|
|
110
|
+
- execute_ddl # Block DDL execution
|
|
111
|
+
- alter_* # Block all alter operations
|
|
112
|
+
|
|
113
|
+
# ---------------------------------------------------------------------------
|
|
114
|
+
# Example 3: Hybrid Filtering (Include + Exclude)
|
|
115
|
+
# ---------------------------------------------------------------------------
|
|
116
|
+
# Best for: Fine-grained control
|
|
117
|
+
# Use when: You want specific categories but with exceptions
|
|
118
|
+
|
|
119
|
+
functions_filtered: &functions_filtered
|
|
120
|
+
name: functions_filtered
|
|
121
|
+
function:
|
|
122
|
+
type: mcp
|
|
123
|
+
functions: *retail_schema # UC Functions MCP
|
|
124
|
+
client_id: *client_id
|
|
125
|
+
client_secret: *client_secret
|
|
126
|
+
workspace_host: *workspace_host
|
|
127
|
+
# Start with these categories
|
|
128
|
+
include_tools:
|
|
129
|
+
- query_* # All query functions
|
|
130
|
+
- get_* # All getter functions
|
|
131
|
+
- list_* # All list functions
|
|
132
|
+
# But exclude sensitive ones
|
|
133
|
+
exclude_tools:
|
|
134
|
+
- *_sensitive # Exclude anything with "_sensitive"
|
|
135
|
+
- *_admin # Exclude admin functions
|
|
136
|
+
- get_secret_* # Exclude secret getters
|
|
137
|
+
|
|
138
|
+
# ---------------------------------------------------------------------------
|
|
139
|
+
# Example 4: Pattern-Based Inclusion
|
|
140
|
+
# ---------------------------------------------------------------------------
|
|
141
|
+
# Best for: Consistent naming conventions
|
|
142
|
+
# Use when: Your tools follow predictable patterns
|
|
143
|
+
|
|
144
|
+
query_tools_only: &query_tools_only
|
|
145
|
+
name: query_tools
|
|
146
|
+
function:
|
|
147
|
+
type: mcp
|
|
148
|
+
sql: true
|
|
149
|
+
client_id: *client_id
|
|
150
|
+
client_secret: *client_secret
|
|
151
|
+
workspace_host: *workspace_host
|
|
152
|
+
# Only read operations with patterns
|
|
153
|
+
include_tools:
|
|
154
|
+
- query_* # All queries
|
|
155
|
+
- list_* # All lists
|
|
156
|
+
- describe_* # All describe operations
|
|
157
|
+
- show_* # All show operations
|
|
158
|
+
|
|
159
|
+
# ---------------------------------------------------------------------------
|
|
160
|
+
# Example 5: Maximum Security (Very Restrictive)
|
|
161
|
+
# ---------------------------------------------------------------------------
|
|
162
|
+
# Best for: High-security environments
|
|
163
|
+
# Use when: You need maximum control and auditability
|
|
164
|
+
|
|
165
|
+
minimal_tools: &minimal_tools
|
|
166
|
+
name: minimal_safe_tools
|
|
167
|
+
function:
|
|
168
|
+
type: mcp
|
|
169
|
+
sql: true
|
|
170
|
+
client_id: *client_id
|
|
171
|
+
client_secret: *client_secret
|
|
172
|
+
workspace_host: *workspace_host
|
|
173
|
+
# Only these 3 specific tools, nothing else
|
|
174
|
+
include_tools:
|
|
175
|
+
- execute_query
|
|
176
|
+
- list_tables
|
|
177
|
+
- describe_table
|
|
178
|
+
|
|
179
|
+
# ---------------------------------------------------------------------------
|
|
180
|
+
# Example 6: Block Only Critical Operations
|
|
181
|
+
# ---------------------------------------------------------------------------
|
|
182
|
+
# Best for: Development/testing with safety nets
|
|
183
|
+
# Use when: You want flexibility but need to prevent disasters
|
|
184
|
+
|
|
185
|
+
dev_tools: &dev_tools
|
|
186
|
+
name: dev_sql_tools
|
|
187
|
+
function:
|
|
188
|
+
type: mcp
|
|
189
|
+
sql: true
|
|
190
|
+
client_id: *client_id
|
|
191
|
+
client_secret: *client_secret
|
|
192
|
+
workspace_host: *workspace_host
|
|
193
|
+
# Allow everything except the really dangerous stuff
|
|
194
|
+
exclude_tools:
|
|
195
|
+
- drop_* # Can't drop anything
|
|
196
|
+
- truncate_* # Can't truncate
|
|
197
|
+
- execute_ddl # Can't run arbitrary DDL
|
|
198
|
+
|
|
199
|
+
# =============================================================================
|
|
200
|
+
# AGENTS
|
|
201
|
+
# =============================================================================
|
|
202
|
+
|
|
203
|
+
agents:
|
|
204
|
+
# ---------------------------------------------------------------------------
|
|
205
|
+
# Safe SQL Agent (Read-Only)
|
|
206
|
+
# ---------------------------------------------------------------------------
|
|
207
|
+
# Can only query, list, and describe - no modifications
|
|
208
|
+
|
|
209
|
+
safe_sql_agent: &safe_sql_agent
|
|
210
|
+
name: safe_sql_agent
|
|
211
|
+
description: |
|
|
212
|
+
SQL agent with read-only access.
|
|
213
|
+
Can query data and inspect schema, but cannot modify anything.
|
|
214
|
+
model: *default_llm
|
|
215
|
+
tools:
|
|
216
|
+
- *sql_safe_tools
|
|
217
|
+
prompt: |
|
|
218
|
+
You are a helpful SQL assistant with read-only access to the database.
|
|
219
|
+
You can query data, list tables, and describe schemas.
|
|
220
|
+
You CANNOT modify, delete, or drop any data or structures.
|
|
221
|
+
|
|
222
|
+
# ---------------------------------------------------------------------------
|
|
223
|
+
# Query-Focused Agent
|
|
224
|
+
# ---------------------------------------------------------------------------
|
|
225
|
+
# Specialized for data analysis queries only
|
|
226
|
+
|
|
227
|
+
analyst_agent: &analyst_agent
|
|
228
|
+
name: data_analyst
|
|
229
|
+
description: |
|
|
230
|
+
Data analyst agent specialized in querying and analyzing data.
|
|
231
|
+
Only has access to query and inspection tools.
|
|
232
|
+
model: *default_llm
|
|
233
|
+
tools:
|
|
234
|
+
- *query_tools_only
|
|
235
|
+
prompt: |
|
|
236
|
+
You are a data analyst.
|
|
237
|
+
Help users write and execute SQL queries to answer their questions.
|
|
238
|
+
Focus on data analysis and insights.
|
|
239
|
+
|
|
240
|
+
# ---------------------------------------------------------------------------
|
|
241
|
+
# Development Agent (With Safety Rails)
|
|
242
|
+
# ---------------------------------------------------------------------------
|
|
243
|
+
# Most tools available but critical operations blocked
|
|
244
|
+
|
|
245
|
+
dev_agent: &dev_agent
|
|
246
|
+
name: dev_assistant
|
|
247
|
+
description: |
|
|
248
|
+
Development assistant with most SQL tools available.
|
|
249
|
+
Dangerous operations (drop, truncate, DDL) are blocked for safety.
|
|
250
|
+
model: *default_llm
|
|
251
|
+
tools:
|
|
252
|
+
- *dev_tools
|
|
253
|
+
prompt: |
|
|
254
|
+
You are a database development assistant.
|
|
255
|
+
You can help with queries, data manipulation, and schema inspection.
|
|
256
|
+
Note: Drop, truncate, and DDL operations are disabled for safety.
|
|
257
|
+
|
|
258
|
+
# ---------------------------------------------------------------------------
|
|
259
|
+
# High-Security Agent (Minimal Access)
|
|
260
|
+
# ---------------------------------------------------------------------------
|
|
261
|
+
# Only 3 specific tools for maximum security
|
|
262
|
+
|
|
263
|
+
secure_agent: &secure_agent
|
|
264
|
+
name: secure_query_agent
|
|
265
|
+
description: |
|
|
266
|
+
Highly restricted agent with only 3 tools.
|
|
267
|
+
For use in high-security or audited environments.
|
|
268
|
+
model: *default_llm
|
|
269
|
+
tools:
|
|
270
|
+
- *minimal_tools
|
|
271
|
+
prompt: |
|
|
272
|
+
You are a database query assistant with restricted access.
|
|
273
|
+
You can only execute SELECT queries, list tables, and describe schemas.
|
|
274
|
+
All operations are logged and audited.
|
|
275
|
+
|
|
276
|
+
# ---------------------------------------------------------------------------
|
|
277
|
+
# Functions Agent with Filtering
|
|
278
|
+
# ---------------------------------------------------------------------------
|
|
279
|
+
# UC Functions with sensitive/admin functions excluded
|
|
280
|
+
|
|
281
|
+
functions_agent: &functions_agent
|
|
282
|
+
name: functions_assistant
|
|
283
|
+
description: |
|
|
284
|
+
Assistant with access to Unity Catalog functions.
|
|
285
|
+
Sensitive and admin functions are excluded for safety.
|
|
286
|
+
model: *default_llm
|
|
287
|
+
tools:
|
|
288
|
+
- *functions_filtered
|
|
289
|
+
prompt: |
|
|
290
|
+
You are an assistant that can call Unity Catalog functions.
|
|
291
|
+
You have access to query, get, and list functions.
|
|
292
|
+
Sensitive and administrative functions are not available.
|
|
293
|
+
|
|
294
|
+
# =============================================================================
|
|
295
|
+
# APPLICATION CONFIGURATION
|
|
296
|
+
# =============================================================================
|
|
297
|
+
|
|
298
|
+
app_name: filtered_mcp_example
|
|
299
|
+
entry_agent: safe_sql_agent
|
|
300
|
+
|
|
301
|
+
# =============================================================================
|
|
302
|
+
# USAGE NOTES
|
|
303
|
+
# =============================================================================
|
|
304
|
+
#
|
|
305
|
+
# Testing Filters:
|
|
306
|
+
# 1. Run with safe_sql_agent - try to call drop_table (should not be available)
|
|
307
|
+
# 2. Run with dev_agent - verify you can query but not drop
|
|
308
|
+
# 3. Run with secure_agent - verify only 3 tools are available
|
|
309
|
+
#
|
|
310
|
+
# Pattern Examples:
|
|
311
|
+
# - "query_*" matches: query_sales, query_inventory, query_anything
|
|
312
|
+
# - "get_?" matches: get_a, get_1, but NOT get_ab
|
|
313
|
+
# - "*_admin" matches: user_admin, table_admin, delete_admin
|
|
314
|
+
# - "[!s]*" matches: anything NOT starting with 's'
|
|
315
|
+
#
|
|
316
|
+
# Best Practices:
|
|
317
|
+
# 1. Use include_tools for maximum security (allowlist)
|
|
318
|
+
# 2. Use exclude_tools for general purpose with safety (denylist)
|
|
319
|
+
# 3. Combine both for fine-grained control
|
|
320
|
+
# 4. Test your filters - use logging to verify which tools are loaded
|
|
321
|
+
# 5. Document why you're filtering (security, performance, access control)
|
|
322
|
+
#
|
|
323
|
+
# Common Patterns:
|
|
324
|
+
# - Read-only SQL: include_tools: ["query_*", "list_*", "describe_*", "show_*"]
|
|
325
|
+
# - Block dangerous: exclude_tools: ["drop_*", "delete_*", "truncate_*", "execute_ddl"]
|
|
326
|
+
# - Admin only: exclude_tools: ["*_user", "*_public"]
|
|
327
|
+
# - No sensitive: exclude_tools: ["*_sensitive", "*_secret", "*_password"]
|