agent-framework-lib 0.6.2__tar.gz → 0.6.3__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.
Files changed (229) hide show
  1. {agent_framework_lib-0.6.2/agent_framework_lib.egg-info → agent_framework_lib-0.6.3}/PKG-INFO +8 -2
  2. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/__init__.py +2 -2
  3. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/context_budget.py +26 -12
  4. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/provider_calibration.py +57 -19
  5. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/builtin/__init__.py +14 -0
  6. agent_framework_lib-0.6.3/agent_framework/skills/builtin/drawio_skill.py +97 -0
  7. agent_framework_lib-0.6.3/agent_framework/skills/builtin/excel_skill.py +86 -0
  8. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/tools/__init__.py +7 -0
  9. agent_framework_lib-0.6.3/agent_framework/tools/drawio_tools.py +171 -0
  10. agent_framework_lib-0.6.3/agent_framework/tools/excel_tools.py +122 -0
  11. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3/agent_framework_lib.egg-info}/PKG-INFO +8 -2
  12. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework_lib.egg-info/SOURCES.txt +4 -0
  13. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework_lib.egg-info/requires.txt +9 -1
  14. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/pyproject.toml +14 -2
  15. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/ARCHITECTURE.md +0 -0
  16. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/LICENSE +0 -0
  17. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/MANIFEST.in +0 -0
  18. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/README.md +0 -0
  19. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/a2a/__init__.py +0 -0
  20. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/a2a/base.py +0 -0
  21. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/a2a/endpoints/__init__.py +0 -0
  22. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/a2a/endpoints/a2a_router.py +0 -0
  23. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/a2a/endpoints/agent_card_builder.py +0 -0
  24. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/a2a/endpoints/agent_card_skill_builder.py +0 -0
  25. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/a2a/endpoints/jsonrpc_dispatcher.py +0 -0
  26. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/a2a/endpoints/models_jsonrpc.py +0 -0
  27. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/a2a/endpoints/sse_wrapper.py +0 -0
  28. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/a2a/endpoints/translation_layer.py +0 -0
  29. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/a2a/models.py +0 -0
  30. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/a2a/providers/__init__.py +0 -0
  31. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/a2a/providers/elasticsearch_provider.py +0 -0
  32. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/a2a/providers/postgres_provider.py +0 -0
  33. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/chart_generation/llm_refinement_loop.py +0 -0
  34. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/__init__.py +0 -0
  35. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/activity_formatter.py +0 -0
  36. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/agent_interface.py +0 -0
  37. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/agent_provider.py +0 -0
  38. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/base_agent.py +0 -0
  39. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/context_summarizer.py +0 -0
  40. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/elasticsearch_config_provider.py +0 -0
  41. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/implementation_validator.py +0 -0
  42. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/knowledge_state.py +0 -0
  43. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/loop_detector.py +0 -0
  44. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/model_clients.py +0 -0
  45. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/model_config.py +0 -0
  46. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/model_router.py +0 -0
  47. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/models.py +0 -0
  48. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/rich_content_prompt_unsused_to_be_deleted.py +0 -0
  49. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/scratchpad_compressor.py +0 -0
  50. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/state_manager.py +0 -0
  51. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/step_display_config.py +0 -0
  52. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/core/streaming_parts_accumulator.py +0 -0
  53. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/implementations/__init__.py +0 -0
  54. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/implementations/budget_aware_agent.py +0 -0
  55. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/implementations/llamaindex_agent.py +0 -0
  56. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/implementations/llamaindex_memory_adapter.py +0 -0
  57. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/implementations/microsoft_agent.py +0 -0
  58. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/memory/__init__.py +0 -0
  59. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/memory/agent_mixin.py +0 -0
  60. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/memory/base.py +0 -0
  61. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/memory/config.py +0 -0
  62. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/memory/manager.py +0 -0
  63. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/memory/personalization.py +0 -0
  64. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/memory/providers/__init__.py +0 -0
  65. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/memory/providers/graphiti_provider.py +0 -0
  66. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/memory/providers/memori_provider.py +0 -0
  67. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/memory/tools.py +0 -0
  68. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/__init__.py +0 -0
  69. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/api_timing_tracker.py +0 -0
  70. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/elasticsearch_circuit_breaker.py +0 -0
  71. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/elasticsearch_logging.py +0 -0
  72. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/error_handling.py +0 -0
  73. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/error_logging.py +0 -0
  74. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/llm_auto_instrumentor.py +0 -0
  75. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/llm_metrics.py +0 -0
  76. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/llm_metrics_collector.py +0 -0
  77. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/llm_metrics_extractor.py +0 -0
  78. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/metrics_aggregator.py +0 -0
  79. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/metrics_config.py +0 -0
  80. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/observability_manager.py +0 -0
  81. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/otel_instrumentor.py +0 -0
  82. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/otel_logging_handler.py +0 -0
  83. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/otel_metrics_recorder.py +0 -0
  84. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/otel_setup.py +0 -0
  85. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/performance_monitor.py +0 -0
  86. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/progress_tracker.py +0 -0
  87. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/resource_manager.py +0 -0
  88. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/resource_metrics_collector.py +0 -0
  89. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/streaming_latency_tracer.py +0 -0
  90. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/timing_tracker.py +0 -0
  91. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/token_counter.py +0 -0
  92. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/monitoring/tracing_context.py +0 -0
  93. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/processing/__init__.py +0 -0
  94. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/processing/ai_content_management.py +0 -0
  95. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/processing/markdown_converter.py +0 -0
  96. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/processing/multimodal_integration.py +0 -0
  97. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/processing/rich_content_validation.py +0 -0
  98. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/py.typed +0 -0
  99. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/session/__init__.py +0 -0
  100. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/session/elasticsearch_session_storage.py +0 -0
  101. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/session/session_storage.py +0 -0
  102. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/__init__.py +0 -0
  103. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/agent_mixin.py +0 -0
  104. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/base.py +0 -0
  105. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/builtin/chart_skill.py +0 -0
  106. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/builtin/file_access_skill.py +0 -0
  107. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/builtin/file_skill.py +0 -0
  108. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/builtin/form_skill.py +0 -0
  109. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/builtin/image_display_skill.py +0 -0
  110. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/builtin/mermaid_skill.py +0 -0
  111. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/builtin/multimodal_skill.py +0 -0
  112. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/builtin/optionsblock_skill.py +0 -0
  113. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/builtin/pdf_skill.py +0 -0
  114. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/builtin/pdf_with_images_skill.py +0 -0
  115. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/builtin/table_skill.py +0 -0
  116. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/builtin/unified_pdf_skill.py +0 -0
  117. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/builtin/web_search_skill.py +0 -0
  118. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/discovery_prompt.py +0 -0
  119. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/skills/tools.py +0 -0
  120. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/storage/__init__.py +0 -0
  121. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/storage/file_storages.py +0 -0
  122. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/storage/file_system_management.py +0 -0
  123. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/storage/storage_optimizer.py +0 -0
  124. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/tools/adaptive_pdf_css.py +0 -0
  125. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/tools/base.py +0 -0
  126. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/tools/chart_tools.py +0 -0
  127. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/tools/file_access_tools.py +0 -0
  128. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/tools/file_tools.py +0 -0
  129. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/tools/html_content_analyzer.py +0 -0
  130. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/tools/mermaid_tools.py +0 -0
  131. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/tools/multimodal_tools.py +0 -0
  132. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/tools/pdf_image_scaler.py +0 -0
  133. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/tools/pdf_tools.py +0 -0
  134. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/tools/pdf_with_images_tool.py +0 -0
  135. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/tools/sizing_config.py +0 -0
  136. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/tools/tabledata_tools.py +0 -0
  137. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/tools/unified_pdf_tool.py +0 -0
  138. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/tools/web_search_tools.py +0 -0
  139. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/utils/__init__.py +0 -0
  140. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/utils/path_utils.py +0 -0
  141. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/utils/post_install.py +0 -0
  142. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/utils/session_title_generator.py +0 -0
  143. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/utils/source_detector.py +0 -0
  144. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/utils/special_blocks.py +0 -0
  145. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/__init__.py +0 -0
  146. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/admin_auth.py +0 -0
  147. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/admin_models.py +0 -0
  148. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/admin_router.py +0 -0
  149. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/admin_services.py +0 -0
  150. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/api_timing_middleware.py +0 -0
  151. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/A2A_GUIDE.md +0 -0
  152. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/CREATING_AGENTS.md +0 -0
  153. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/DOCKER_SETUP.md +0 -0
  154. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/Dockerfile +0 -0
  155. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/GETTING_STARTED.md +0 -0
  156. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/MEMORY_INSTALLATION.md +0 -0
  157. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/README.md +0 -0
  158. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/TOOLS_AND_MCP_GUIDE.md +0 -0
  159. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/api-reference.md +0 -0
  160. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/configuration.md +0 -0
  161. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/docker-compose.yml +0 -0
  162. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/examples/agent_example_multi_skills.py +0 -0
  163. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/examples/agent_with_file_storage.py +0 -0
  164. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/examples/agent_with_mcp.py +0 -0
  165. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/examples/agent_with_memory.py +0 -0
  166. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/examples/agent_with_memory_graphiti.py +0 -0
  167. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/examples/agent_with_memory_hybrid.py +0 -0
  168. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/examples/agent_with_memory_simple.py +0 -0
  169. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/examples/custom_framework_agent.py +0 -0
  170. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/examples/simple_agent.py +0 -0
  171. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/examples/skills_demo_agent.py +0 -0
  172. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/docs/installation-guide.md +0 -0
  173. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/documentation_generator.py +0 -0
  174. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/helper_agent.py +0 -0
  175. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/helper_ui.html +0 -0
  176. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/modern_ui.html +0 -0
  177. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/observability/kibana-llm-dashboard-setup.json +0 -0
  178. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/observability/kibana-resource-metrics-dashboard.json +0 -0
  179. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/otel_tracing_middleware.py +0 -0
  180. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/server.py +0 -0
  181. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework/web/test_app.html +0 -0
  182. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework_lib.egg-info/dependency_links.txt +0 -0
  183. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework_lib.egg-info/entry_points.txt +0 -0
  184. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/agent_framework_lib.egg-info/top_level.txt +0 -0
  185. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/A2A_GUIDE.md +0 -0
  186. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/ACTIVITY_OUTPUT_PART.md +0 -0
  187. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/ARCHITECTURE_DIAGRAM.md +0 -0
  188. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/CONCURRENCE_VS_PARALLELISME_GUIDE.md +0 -0
  189. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/CREATING_AGENTS.md +0 -0
  190. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/DOCKER_SETUP.md +0 -0
  191. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/ELASTICSEARCH_DATA_STRUCTURES.md +0 -0
  192. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/FILE_DOWNLOAD_LINKS.md +0 -0
  193. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/FILE_STORAGE_GUIDE.md +0 -0
  194. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/GETTING_STARTED.md +0 -0
  195. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/HISTORY_MESSAGE_FORMAT.md +0 -0
  196. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/IMPLEMENTATION_GUIDE_NEW_AGENT.md +0 -0
  197. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/MEMORY_INSTALLATION.md +0 -0
  198. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/MODIFICATIONS_CONCURRENCE.md +0 -0
  199. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/MULTIMODAL_TOOLS_GUIDE.md +0 -0
  200. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/OBSERVABILITY_GUIDE.md +0 -0
  201. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/PYPI_PUBLISHING.md +0 -0
  202. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/QA_STREAMING_LATENCY.md +0 -0
  203. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/SPEC_CROSS_MODEL_HISTORY_CONVERSION.md +0 -0
  204. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/STREAMING_EVENTS_FRONTEND.md +0 -0
  205. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/TOOLS_AND_MCP_GUIDE.md +0 -0
  206. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/api-reference.md +0 -0
  207. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/configuration.md +0 -0
  208. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/framework_audit_remarques.md +0 -0
  209. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/docs/installation-guide.md +0 -0
  210. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/examples/README.md +0 -0
  211. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/examples/agent_context_budget_test.py +0 -0
  212. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/examples/agent_example_multi_skills.py +0 -0
  213. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/examples/agent_exemple_test.py +0 -0
  214. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/examples/agent_training_with_apo.py +0 -0
  215. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/examples/agent_with_custom_tools_file_storage.py +0 -0
  216. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/examples/agent_with_file_storage.py +0 -0
  217. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/examples/agent_with_mcp.py +0 -0
  218. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/examples/agent_with_memory_graphiti.py +0 -0
  219. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/examples/agent_with_memory_hybrid.py +0 -0
  220. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/examples/agent_with_memory_simple.py +0 -0
  221. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/examples/agent_with_personalization.py +0 -0
  222. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/examples/biagenttest.py +0 -0
  223. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/examples/custom_framework_agent.py +0 -0
  224. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/examples/dependencies/docker-compose.yaml +0 -0
  225. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/examples/pyproject.toml +0 -0
  226. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/examples/simple_agent.py +0 -0
  227. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/examples/skills_demo_agent.py +0 -0
  228. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/setup.cfg +0 -0
  229. {agent_framework_lib-0.6.2 → agent_framework_lib-0.6.3}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-framework-lib
3
- Version: 0.6.2
3
+ Version: 0.6.3
4
4
  Summary: A comprehensive Python framework for building and serving conversational AI agents with FastAPI
5
5
  Author-email: Sebastian Pavel <sebastian@cinco.ai>, Elliott Girard <elliott.girard@icloud.com>
6
6
  Maintainer-email: Sebastian Pavel <sebastian@cinco.ai>
@@ -65,6 +65,8 @@ Requires-Dist: falkordb>=1.0.0
65
65
  Requires-Dist: grpcio-status>=1.71.2
66
66
  Requires-Dist: nodeenv>=1.8.0
67
67
  Requires-Dist: asyncpg>=0.31.0
68
+ Requires-Dist: drawpyo>=0.2.5
69
+ Requires-Dist: openpyxl>=3.1.5
68
70
  Provides-Extra: llamaindex
69
71
  Requires-Dist: llama-index>=0.14.16; extra == "llamaindex"
70
72
  Requires-Dist: llama-index-core>=0.14.16; extra == "llamaindex"
@@ -77,6 +79,10 @@ Requires-Dist: llama-index-tools-mcp>=0.4.0; extra == "mcp"
77
79
  Provides-Extra: websearch
78
80
  Requires-Dist: ddgs>=8.0.0; extra == "websearch"
79
81
  Provides-Extra: microsoft
82
+ Provides-Extra: excel
83
+ Requires-Dist: openpyxl>=3.1.0; extra == "excel"
84
+ Provides-Extra: drawio
85
+ Requires-Dist: drawpyo>=0.1.0; extra == "drawio"
80
86
  Provides-Extra: dev
81
87
  Requires-Dist: pytest>=8.4.0; extra == "dev"
82
88
  Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
@@ -133,7 +139,7 @@ Requires-Dist: traceloop-sdk>=0.30.0; extra == "observability"
133
139
  Provides-Extra: monitoring
134
140
  Requires-Dist: psutil>=5.9.0; extra == "monitoring"
135
141
  Provides-Extra: all
136
- Requires-Dist: agent-framework-lib[dev,elasticsearch,gcp,graphiti-all,llamaindex,mcp,memory,microsoft,minio,mongodb,monitoring,multimodal,observability,postgresql,s3,websearch]; extra == "all"
142
+ Requires-Dist: agent-framework-lib[dev,drawio,elasticsearch,excel,gcp,graphiti-all,llamaindex,mcp,memory,microsoft,minio,mongodb,monitoring,multimodal,observability,postgresql,s3,websearch]; extra == "all"
137
143
  Dynamic: license-file
138
144
 
139
145
  # Agent Framework Library
@@ -32,7 +32,7 @@ Example Usage:
32
32
  create_basic_agent_server(MyAgent, port=8000)
33
33
  ```
34
34
 
35
- Version: 0.6.2
35
+ Version: 0.6.3
36
36
  Author: Cinco AI Team
37
37
  License: MIT
38
38
  """
@@ -88,7 +88,7 @@ def _auto_setup_dependencies() -> None:
88
88
  # Track if auto-setup has been done
89
89
  _AUTO_SETUP_DONE = False
90
90
 
91
- __version__ = "0.6.2"
91
+ __version__ = "0.6.3"
92
92
  __author__ = "Cinco AI Team"
93
93
  __license__ = "MIT"
94
94
  __email__ = "sebastian@cinco.ai"
@@ -107,6 +107,7 @@ class BudgetSnapshot:
107
107
  tool_definition_multiplier: float = 1.0
108
108
  raw_tool_tokens: int = 0
109
109
  estimated_tool_tokens: int = 0
110
+ tool_fixed_overhead: int = 0
110
111
 
111
112
 
112
113
  class ContextBudgetManager:
@@ -140,6 +141,7 @@ class ContextBudgetManager:
140
141
  self._tool_definition_tokens = 0
141
142
  self._raw_tool_tokens = 0
142
143
  self._tool_definition_multiplier = 1.0
144
+ self._tool_fixed_overhead = 0
143
145
 
144
146
  # Resolution order: explicit parameter > env var > class constant
145
147
  def _resolve(param, env_key, default):
@@ -248,18 +250,19 @@ class ContextBudgetManager:
248
250
  total = self._token_counter.count_tokens(message.content or "").count
249
251
  return total
250
252
 
251
- # Anthropic (et d'autres providers) sérialisent les tool definitions avec un
252
- # wrapping XML/JSON lourd qui multiplie le coût en tokens par rapport à ce que
253
- # tiktoken estime sur le JSON brut. Empiriquement, le ratio est ~14x pour
254
- # Anthropic. On utilise 15x comme marge de sécurité.
255
- TOOL_DEFINITION_MULTIPLIER = 15
253
+ # Les providers sérialisent les tool definitions avec un wrapping qui ajoute
254
+ # un overhead par rapport au JSON brut. Le modèle de calibration utilise :
255
+ # estimated_tokens = raw_tokens * multiplier + fixed_overhead
256
+ # Voir provider_calibration.py pour les valeurs par provider.
257
+ TOOL_DEFINITION_MULTIPLIER = 1.4 # Anthropic default, overridden per-provider
256
258
 
257
259
  def set_sacred_zone(self, system_prompt: str, tool_definitions: str) -> int:
258
260
  """Compte et enregistre les tokens de la Zone Sacrée.
259
261
 
260
262
  Le system prompt est compté tel quel (tiktoken est fiable pour du texte).
261
- Les tool definitions reçoivent un multiplicateur calibré par provider car
262
- les providers sérialisent les définitions avec un wrapping lourd.
263
+ Les tool definitions reçoivent un multiplicateur calibré par provider
264
+ (wrapping XML/JSON) plus un overhead fixe (system prompt tool-use injecté
265
+ par le provider).
263
266
 
264
267
  Args:
265
268
  system_prompt: Prompt système complet (agent + skills + mémoire passive).
@@ -273,16 +276,25 @@ class ContextBudgetManager:
273
276
  self._tool_definition_multiplier = ProviderCalibrationRegistry.get_multiplier(
274
277
  self._model_name
275
278
  )
276
- self._tool_definition_tokens = int(
277
- self._raw_tool_tokens * self._tool_definition_multiplier
279
+ self._tool_fixed_overhead = ProviderCalibrationRegistry.get_fixed_overhead(
280
+ self._model_name
278
281
  )
282
+ # estimated = raw * multiplier + fixed_overhead (only if tools are present)
283
+ if self._raw_tool_tokens > 0:
284
+ self._tool_definition_tokens = (
285
+ int(self._raw_tool_tokens * self._tool_definition_multiplier)
286
+ + self._tool_fixed_overhead
287
+ )
288
+ else:
289
+ self._tool_definition_tokens = 0
279
290
  self._sacred_zone_tokens = self._prompt_tokens + self._tool_definition_tokens
280
291
  logger.info(
281
- "Sacred zone: %d tokens (prompt=%d, tools=%d raw * %.1fx = %d)",
292
+ "Sacred zone: %d tokens (prompt=%d, tools=%d raw * %.1fx + %d overhead = %d)",
282
293
  self._sacred_zone_tokens,
283
294
  self._prompt_tokens,
284
295
  self._raw_tool_tokens,
285
296
  self._tool_definition_multiplier,
297
+ self._tool_fixed_overhead if self._raw_tool_tokens > 0 else 0,
286
298
  self._tool_definition_tokens,
287
299
  )
288
300
  if self._sacred_zone_tokens > 0.65 * self._context_window:
@@ -354,7 +366,8 @@ class ContextBudgetManager:
354
366
  model_name=self._model_name,
355
367
  tool_definition_multiplier=self._tool_definition_multiplier,
356
368
  raw_tool_tokens=self._raw_tool_tokens,
357
- estimated_tool_tokens=int(self._raw_tool_tokens * self._tool_definition_multiplier),
369
+ estimated_tool_tokens=self._tool_definition_tokens,
370
+ tool_fixed_overhead=self._tool_fixed_overhead,
358
371
  )
359
372
 
360
373
  async def enforce_budget(
@@ -593,7 +606,8 @@ class ContextBudgetManager:
593
606
  model_name=self._model_name,
594
607
  tool_definition_multiplier=self._tool_definition_multiplier,
595
608
  raw_tool_tokens=self._raw_tool_tokens,
596
- estimated_tool_tokens=int(self._raw_tool_tokens * self._tool_definition_multiplier),
609
+ estimated_tool_tokens=self._tool_definition_tokens,
610
+ tool_fixed_overhead=self._tool_fixed_overhead,
597
611
  )
598
612
 
599
613
  async def truncate_query_if_needed(
@@ -1,8 +1,16 @@
1
- """Provider-specific token calibration for tool definition multipliers.
1
+ """Provider-specific token calibration for tool definition overhead.
2
2
 
3
- Provides empirically measured multipliers that account for the overhead
4
- each LLM provider adds when serializing tool definitions (XML wrapping,
5
- JSON function-calling format, etc.).
3
+ Provides calibration factors that account for the overhead each LLM provider
4
+ adds when serializing tool definitions. The model uses a fixed overhead
5
+ (provider system prompt for tool-use) plus a multiplier on the raw tool
6
+ definition tokens (XML/JSON wrapping per tool).
7
+
8
+ Previous calibration (2025-01) used a single 15x multiplier for Anthropic,
9
+ which was based on per-tool count_tokens calls that double-counted the shared
10
+ system overhead. See: https://www.async-let.com/posts/claude-code-mcp-token-reporting
11
+
12
+ Current calibration (2026-03) uses overhead + multiplier, measured against
13
+ Anthropic's batch count_tokens endpoint and OpenAI's tiktoken validation.
6
14
  """
7
15
 
8
16
  from __future__ import annotations
@@ -19,6 +27,7 @@ class ProviderCalibration:
19
27
 
20
28
  provider_name: str
21
29
  tool_definition_multiplier: float
30
+ fixed_overhead_tokens: int
22
31
  source: str
23
32
  measured_date: str
24
33
  notes: str = ""
@@ -27,35 +36,46 @@ class ProviderCalibration:
27
36
  class ProviderCalibrationRegistry:
28
37
  """Registry of per-provider token calibration data.
29
38
 
30
- Resolves the appropriate tool-definition multiplier for a given model
39
+ Resolves the appropriate tool-definition overhead for a given model
31
40
  by detecting the provider from the model name.
41
+
42
+ The total estimated tool tokens = raw_tokens * multiplier + fixed_overhead.
32
43
  """
33
44
 
34
45
  CALIBRATIONS: dict[str, ProviderCalibration] = {
35
46
  "anthropic": ProviderCalibration(
36
47
  provider_name="anthropic",
37
- tool_definition_multiplier=15.0,
38
- source="empirical_measurement_2025-01",
39
- measured_date="2025-01",
40
- notes="Heavy XML/JSON wrapping for Anthropic tool definitions",
48
+ tool_definition_multiplier=1.4,
49
+ fixed_overhead_tokens=350,
50
+ source="batch_count_tokens_measurement_2026-03",
51
+ measured_date="2026-03",
52
+ notes=(
53
+ "Anthropic injects a hidden tool-use system prompt (~350 tokens) "
54
+ "and wraps each tool in XML. The 1.4x multiplier accounts for "
55
+ "XML wrapping overhead on the raw JSON schema. Previous 15x was "
56
+ "based on per-tool counting that repeated the system overhead."
57
+ ),
41
58
  ),
42
59
  "openai": ProviderCalibration(
43
60
  provider_name="openai",
44
- tool_definition_multiplier=3.0,
45
- source="empirical_measurement_2025-01",
46
- measured_date="2025-01",
47
- notes="OpenAI function-calling format, moderate overhead",
61
+ tool_definition_multiplier=1.1,
62
+ fixed_overhead_tokens=100,
63
+ source="tiktoken_validation_2026-03",
64
+ measured_date="2026-03",
65
+ notes="OpenAI function-calling format, minimal overhead over JSON schema",
48
66
  ),
49
67
  "google": ProviderCalibration(
50
68
  provider_name="google",
51
- tool_definition_multiplier=4.0,
52
- source="empirical_measurement_2025-01",
53
- measured_date="2025-01",
54
- notes="Gemini tool-use format, overhead similar to OpenAI",
69
+ tool_definition_multiplier=1.2,
70
+ fixed_overhead_tokens=150,
71
+ source="estimated_2026-03",
72
+ measured_date="2026-03",
73
+ notes="Gemini tool-use format, similar to OpenAI with slight extra wrapping",
55
74
  ),
56
75
  }
57
76
 
58
- DEFAULT_MULTIPLIER: float = 5.0
77
+ DEFAULT_MULTIPLIER: float = 1.5
78
+ DEFAULT_FIXED_OVERHEAD: int = 200
59
79
 
60
80
  # Prefix-to-provider mapping for model name detection
61
81
  _PROVIDER_PREFIXES: dict[str, str] = {
@@ -105,7 +125,7 @@ class ProviderCalibrationRegistry:
105
125
  def get_multiplier(cls, model_name: str) -> float:
106
126
  """Resolve the tool-definition multiplier for a model.
107
127
 
108
- Falls back to DEFAULT_MULTIPLIER (5.0) and logs INFO when the
128
+ Falls back to DEFAULT_MULTIPLIER and logs INFO when the
109
129
  provider is not recognized.
110
130
 
111
131
  Args:
@@ -124,3 +144,21 @@ class ProviderCalibrationRegistry:
124
144
  cls.DEFAULT_MULTIPLIER,
125
145
  )
126
146
  return cls.DEFAULT_MULTIPLIER
147
+
148
+ @classmethod
149
+ def get_fixed_overhead(cls, model_name: str) -> int:
150
+ """Resolve the fixed tool-use overhead tokens for a model.
151
+
152
+ This accounts for the hidden system prompt that providers inject
153
+ when tools are present (e.g. Anthropic's tool-use preamble).
154
+
155
+ Args:
156
+ model_name: Name of the LLM model.
157
+
158
+ Returns:
159
+ Fixed overhead in tokens, or the default.
160
+ """
161
+ calibration = cls.get_calibration(model_name)
162
+ if calibration is not None:
163
+ return calibration.fixed_overhead_tokens
164
+ return cls.DEFAULT_FIXED_OVERHEAD
@@ -67,6 +67,10 @@ from .form_skill import create_form_skill, FORM_INSTRUCTIONS
67
67
  from .optionsblock_skill import create_optionsblock_skill, OPTIONSBLOCK_INSTRUCTIONS
68
68
  from .image_display_skill import create_image_display_skill, IMAGE_DISPLAY_INSTRUCTIONS
69
69
 
70
+ # Excel and Draw.io skills
71
+ from .excel_skill import create_excel_skill, EXCEL_INSTRUCTIONS
72
+ from .drawio_skill import create_drawio_skill, DRAWIO_INSTRUCTIONS
73
+
70
74
 
71
75
  def get_all_builtin_skills() -> list[Skill]:
72
76
  """
@@ -102,6 +106,10 @@ def get_all_builtin_skills() -> list[Skill]:
102
106
  skills.append(create_optionsblock_skill())
103
107
  skills.append(create_image_display_skill())
104
108
 
109
+ # Excel and Draw.io skills
110
+ skills.append(create_excel_skill())
111
+ skills.append(create_drawio_skill())
112
+
105
113
  return skills
106
114
 
107
115
 
@@ -146,4 +154,10 @@ __all__ = [
146
154
  "FORM_INSTRUCTIONS",
147
155
  "OPTIONSBLOCK_INSTRUCTIONS",
148
156
  "IMAGE_DISPLAY_INSTRUCTIONS",
157
+ # Excel and Draw.io skill creators
158
+ "create_excel_skill",
159
+ "create_drawio_skill",
160
+ # Excel and Draw.io instruction constants
161
+ "EXCEL_INSTRUCTIONS",
162
+ "DRAWIO_INSTRUCTIONS",
149
163
  ]
@@ -0,0 +1,97 @@
1
+ """
2
+ Draw.io Skill - diagram generation capability.
3
+
4
+ Wraps CreateDrawioTool with instructions for generating .drawio XML files.
5
+ """
6
+
7
+ from ..base import Skill, SkillCategory, SkillMetadata
8
+ from ...tools.drawio_tools import CreateDrawioTool
9
+
10
+
11
+ DRAWIO_INSTRUCTIONS = """
12
+ ## Draw.io Diagram Generation
13
+
14
+ Use the `create_drawio_file` tool to generate `.drawio` diagram files that open in Draw.io or diagrams.net.
15
+
16
+ ### Tool Parameters
17
+
18
+ - `filename` (str): Target filename, e.g. `"architecture.drawio"`
19
+ - `title` (str): Diagram page title
20
+ - `nodes` (list): Shape/element definitions. Each node has:
21
+ - `id` (str): Unique identifier (used by edges)
22
+ - `label` (str): Display text inside the shape
23
+ - `shape` (str, optional): One of `rectangle`, `rounded`, `ellipse`, `diamond`, `parallelogram` (default: `rectangle`)
24
+ - `x` (int, optional): X position in pixels
25
+ - `y` (int, optional): Y position in pixels
26
+ - `edges` (list): Connection definitions. Each edge has:
27
+ - `source` (str): Source node `id`
28
+ - `target` (str): Target node `id`
29
+ - `label` (str, optional): Label displayed on the edge
30
+
31
+ ### Supported Shapes
32
+
33
+ | Shape | Description |
34
+ |---|---|
35
+ | `rectangle` | Standard rectangle (default) |
36
+ | `rounded` | Rectangle with rounded corners |
37
+ | `ellipse` | Oval / circle |
38
+ | `diamond` | Diamond / decision shape |
39
+ | `parallelogram` | Parallelogram (input/output) |
40
+
41
+ ### Example — Flowchart
42
+
43
+ ```json
44
+ {
45
+ "filename": "order_flow.drawio",
46
+ "title": "Order Processing Flow",
47
+ "nodes": [
48
+ {"id": "start", "label": "Start", "shape": "ellipse", "x": 100, "y": 50},
49
+ {"id": "check", "label": "Check Stock?", "shape": "diamond", "x": 100, "y": 180},
50
+ {"id": "ship", "label": "Ship Order", "shape": "rectangle", "x": 50, "y": 320},
51
+ {"id": "notify", "label": "Notify Customer", "shape": "rounded", "x": 200, "y": 320},
52
+ {"id": "end", "label": "End", "shape": "ellipse", "x": 125, "y": 460}
53
+ ],
54
+ "edges": [
55
+ {"source": "start", "target": "check"},
56
+ {"source": "check", "target": "ship", "label": "In Stock"},
57
+ {"source": "check", "target": "notify", "label": "Out of Stock"},
58
+ {"source": "ship", "target": "end"},
59
+ {"source": "notify", "target": "end"}
60
+ ]
61
+ }
62
+ ```
63
+
64
+ ### Notes
65
+
66
+ - All edge `source` and `target` values must match an existing node `id`.
67
+ - Requires `drawpyo` to be installed (`uv add drawpyo`).
68
+ - Generated files open directly in Draw.io (https://app.diagrams.net) or diagrams.net.
69
+ """
70
+
71
+
72
+ def create_drawio_skill() -> Skill:
73
+ """
74
+ Create the Draw.io diagram generation skill.
75
+
76
+ Returns:
77
+ Skill instance for Draw.io file generation.
78
+ """
79
+ skill = Skill(
80
+ metadata=SkillMetadata(
81
+ name="drawio",
82
+ description="Generate .drawio diagram files for flowcharts, architecture diagrams, and more.",
83
+ trigger_patterns=["drawio", "diagram", "flowchart", "architecture diagram", "draw.io"],
84
+ category=SkillCategory.VISUALIZATION,
85
+ version="1.0.0",
86
+ ),
87
+ instructions=DRAWIO_INSTRUCTIONS,
88
+ tools=[CreateDrawioTool()],
89
+ dependencies=[],
90
+ config={},
91
+ )
92
+ skill._display_name = "Génération de diagrammes Draw.io"
93
+ skill._display_icon = "🗂️"
94
+ return skill
95
+
96
+
97
+ __all__ = ["create_drawio_skill", "DRAWIO_INSTRUCTIONS"]
@@ -0,0 +1,86 @@
1
+ """
2
+ Excel Skill - spreadsheet generation capability.
3
+
4
+ Wraps CreateExcelTool with instructions for generating .xlsx files.
5
+ """
6
+
7
+ from ..base import Skill, SkillCategory, SkillMetadata
8
+ from ...tools.excel_tools import CreateExcelTool
9
+
10
+
11
+ EXCEL_INSTRUCTIONS = """
12
+ ## Excel Spreadsheet Generation
13
+
14
+ Use the `create_excel_file` tool to generate `.xlsx` spreadsheet files.
15
+
16
+ ### Tool Parameters
17
+
18
+ - `filename` (str): Target filename, e.g. `"report.xlsx"`
19
+ - `sheets` (list): One or more sheet definitions. Each sheet has:
20
+ - `name` (str): Sheet tab name
21
+ - `headers` (list[str]): Column header labels
22
+ - `rows` (list[list]): Data rows — each row is a list of cell values
23
+ - `bold_header` (bool, optional): Apply bold formatting to the header row (default: `false`)
24
+
25
+ ### Example
26
+
27
+ ```json
28
+ {
29
+ "filename": "sales_report.xlsx",
30
+ "sheets": [
31
+ {
32
+ "name": "Q1 Sales",
33
+ "headers": ["Month", "Revenue", "Units"],
34
+ "rows": [
35
+ ["January", 12500, 250],
36
+ ["February", 15000, 300],
37
+ ["March", 11000, 220]
38
+ ],
39
+ "bold_header": true
40
+ },
41
+ {
42
+ "name": "Summary",
43
+ "headers": ["Metric", "Value"],
44
+ "rows": [
45
+ ["Total Revenue", 38500],
46
+ ["Total Units", 770]
47
+ ]
48
+ }
49
+ ]
50
+ }
51
+ ```
52
+
53
+ ### Notes
54
+
55
+ - Multiple sheets are supported in a single call.
56
+ - Row length does not need to match header count — short rows leave trailing cells empty.
57
+ - Requires `openpyxl` to be installed (`uv add openpyxl`).
58
+ """
59
+
60
+
61
+ def create_excel_skill() -> Skill:
62
+ """
63
+ Create the Excel spreadsheet generation skill.
64
+
65
+ Returns:
66
+ Skill instance for Excel file generation.
67
+ """
68
+ skill = Skill(
69
+ metadata=SkillMetadata(
70
+ name="excel",
71
+ description="Generate .xlsx Excel spreadsheet files with multiple sheets and formatting.",
72
+ trigger_patterns=["excel", "spreadsheet", "xlsx", "tableau"],
73
+ category=SkillCategory.DOCUMENT,
74
+ version="1.0.0",
75
+ ),
76
+ instructions=EXCEL_INSTRUCTIONS,
77
+ tools=[CreateExcelTool()],
78
+ dependencies=[],
79
+ config={},
80
+ )
81
+ skill._display_name = "Génération de fichiers Excel"
82
+ skill._display_icon = "📊"
83
+ return skill
84
+
85
+
86
+ __all__ = ["create_excel_skill", "EXCEL_INSTRUCTIONS"]
@@ -132,6 +132,10 @@ from .unified_pdf_tool import CreateUnifiedPDFTool
132
132
  # Web search tools
133
133
  from .web_search_tools import WebSearchTool, WebNewsSearchTool
134
134
 
135
+ # Excel and Draw.io tools (optional dependencies)
136
+ from .excel_tools import CreateExcelTool
137
+ from .drawio_tools import CreateDrawioTool
138
+
135
139
  # Adaptive image sizing components
136
140
  from .sizing_config import ImageSizingConfig, ImageDimensionCalculator
137
141
  from .pdf_image_scaler import PDFImageScaler
@@ -161,6 +165,9 @@ __all__ = [
161
165
  # Web search tools
162
166
  "WebSearchTool",
163
167
  "WebNewsSearchTool",
168
+ # Excel and Draw.io tools
169
+ "CreateExcelTool",
170
+ "CreateDrawioTool",
164
171
  # Adaptive image sizing
165
172
  "ImageSizingConfig",
166
173
  "ImageDimensionCalculator",
@@ -0,0 +1,171 @@
1
+ """
2
+ Draw.io diagram generation tool for creating .drawio XML files.
3
+ """
4
+
5
+ import logging
6
+ import os
7
+ import tempfile
8
+ from collections.abc import Callable
9
+
10
+ from .base import AgentTool, ToolDependencyError
11
+
12
+
13
+ try:
14
+ import drawpyo
15
+ DRAWPYO_AVAILABLE = True
16
+ except ImportError:
17
+ DRAWPYO_AVAILABLE = False
18
+
19
+ logger = logging.getLogger(__name__)
20
+
21
+ # Mapping from user-facing shape names to drawpyo style attributes
22
+ SHAPE_STYLES: dict[str, dict] = {
23
+ "rectangle": {},
24
+ "rounded": {"rounded": 1},
25
+ "ellipse": {"shape": "ellipse"},
26
+ "diamond": {"shape": "rhombus"},
27
+ "parallelogram": {"shape": "parallelogram"},
28
+ }
29
+
30
+ DEFAULT_SHAPE = "rectangle"
31
+ DEFAULT_NODE_WIDTH = 120
32
+ DEFAULT_NODE_HEIGHT = 60
33
+ DEFAULT_X_STEP = 160
34
+ DEFAULT_Y = 100
35
+
36
+
37
+ class CreateDrawioTool(AgentTool):
38
+ """Tool for creating Draw.io .drawio diagram files."""
39
+
40
+ def get_tool_function(self) -> Callable:
41
+ """Return the Draw.io file creation function."""
42
+
43
+ async def create_drawio_file(
44
+ filename: str,
45
+ title: str,
46
+ nodes: list[dict],
47
+ edges: list[dict],
48
+ ) -> str:
49
+ """
50
+ Create a Draw.io .drawio diagram file.
51
+
52
+ Node definition fields:
53
+ - id (str): Unique node identifier
54
+ - label (str): Display text
55
+ - shape (str, optional): rectangle|rounded|ellipse|diamond|parallelogram (default: rectangle)
56
+ - x (int, optional): X position
57
+ - y (int, optional): Y position
58
+
59
+ Edge definition fields:
60
+ - source (str): Source node id
61
+ - target (str): Target node id
62
+ - label (str, optional): Edge label text
63
+
64
+ Args:
65
+ filename: Target filename for the .drawio file (e.g. "diagram.drawio")
66
+ title: Diagram title / page name
67
+ nodes: List of node definitions
68
+ edges: List of edge definitions
69
+
70
+ Returns:
71
+ Markdown download link on success, or an error string on failure.
72
+ """
73
+ self._ensure_initialized()
74
+
75
+ if not filename or not filename.strip():
76
+ return "Error: Filename cannot be empty"
77
+
78
+ if not nodes:
79
+ return "Error: Nodes list cannot be empty"
80
+
81
+ # Validate edge references
82
+ node_ids = {n["id"] for n in nodes}
83
+ for edge in edges:
84
+ for field in ("source", "target"):
85
+ ref = edge.get(field)
86
+ if ref not in node_ids:
87
+ return f"Error: Edge references unknown node id '{ref}'"
88
+
89
+ if not DRAWPYO_AVAILABLE:
90
+ raise ToolDependencyError(
91
+ "drawpyo is not installed. Install it with: uv add drawpyo"
92
+ )
93
+
94
+ if not self.file_storage:
95
+ raise ToolDependencyError(
96
+ "File storage is not available. Ensure set_context() was called "
97
+ "with a valid file_storage instance."
98
+ )
99
+
100
+ try:
101
+ with tempfile.TemporaryDirectory() as tmpdir:
102
+ f = drawpyo.File()
103
+ f.file_path = tmpdir
104
+ f.file_name = filename
105
+ page = drawpyo.Page(file=f, name=title or "Page-1")
106
+
107
+ node_objects: dict[str, object] = {}
108
+ for idx, node_def in enumerate(nodes):
109
+ obj = drawpyo.diagram.Object(
110
+ value=node_def.get("label", ""),
111
+ page=page,
112
+ )
113
+ obj.geometry.width = DEFAULT_NODE_WIDTH
114
+ obj.geometry.height = DEFAULT_NODE_HEIGHT
115
+ obj.geometry.x = node_def.get("x", idx * DEFAULT_X_STEP)
116
+ obj.geometry.y = node_def.get("y", DEFAULT_Y)
117
+
118
+ shape = node_def.get("shape", DEFAULT_SHAPE)
119
+ style_attrs = SHAPE_STYLES.get(shape, SHAPE_STYLES[DEFAULT_SHAPE])
120
+ for attr, val in style_attrs.items():
121
+ setattr(obj, attr, val)
122
+
123
+ node_objects[node_def["id"]] = obj
124
+
125
+ for edge_def in edges:
126
+ src = node_objects[edge_def["source"]]
127
+ tgt = node_objects[edge_def["target"]]
128
+ edge_obj = drawpyo.diagram.Edge(source=src, target=tgt, page=page)
129
+ label = edge_def.get("label")
130
+ if label:
131
+ edge_obj.label = label
132
+
133
+ f.write()
134
+
135
+ filepath = os.path.join(tmpdir, filename)
136
+ with open(filepath, "rb") as fh:
137
+ content_bytes = fh.read()
138
+
139
+ file_id = await self.file_storage.store_file(
140
+ content=content_bytes,
141
+ filename=filename,
142
+ user_id=self.current_user_id,
143
+ session_id=self.current_session_id,
144
+ is_generated=True,
145
+ mime_type="application/xml",
146
+ tags=["agent-created"],
147
+ )
148
+
149
+ if hasattr(self.file_storage, "get_download_url"):
150
+ try:
151
+ download_url = await self.file_storage.get_download_url(file_id)
152
+ except Exception as url_error:
153
+ logger.warning(f"Failed to get download URL: {url_error}")
154
+ download_url = f"/files/{file_id}/download"
155
+ else:
156
+ download_url = f"/files/{file_id}/download"
157
+
158
+ logger.info(f"Created Draw.io file '{filename}' with ID: {file_id}")
159
+ return f"File '{filename}' created!\n\n[{filename}]({download_url})"
160
+
161
+ except ToolDependencyError:
162
+ raise
163
+ except Exception as e:
164
+ error_msg = f"Failed to create Draw.io file '{filename}': {e}"
165
+ logger.error(error_msg)
166
+ return f"Error: {error_msg}"
167
+
168
+ return create_drawio_file
169
+
170
+
171
+ __all__ = ["CreateDrawioTool"]