agentcrew-ai 0.8.13__tar.gz → 0.9.0__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.
- agentcrew_ai-0.9.0/AgentCrew/__init__.py +1 -0
- agentcrew_ai-0.9.0/AgentCrew/app.py +405 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/main_docker.py +1 -30
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/local_agent.py +2 -2
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/message/command_processor.py +33 -8
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/message/handler.py +5 -1
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/completers.py +1 -1
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/console_ui.py +6 -11
- agentcrew_ai-0.9.0/AgentCrew/modules/console/conversation_browser/__init__.py +9 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/console/conversation_browser/browser.py +84 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/console/conversation_browser/browser_input_handler.py +279 -0
- agentcrew_ai-0.8.13/AgentCrew/modules/console/conversation_browser.py → agentcrew_ai-0.9.0/AgentCrew/modules/console/conversation_browser/browser_ui.py +249 -163
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/conversation_handler.py +34 -1
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/display_handlers.py +123 -7
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/command_handler.py +137 -29
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/themes/README.md +30 -14
- agentcrew_ai-0.9.0/AgentCrew/modules/gui/themes/__init__.py +4 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/gui/themes/atom_light.yaml +1287 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/gui/themes/catppuccin.yaml +1276 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/gui/themes/dracula.yaml +1262 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/gui/themes/nord.yaml +1267 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/gui/themes/saigontech.yaml +1268 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/gui/themes/style_provider.py +234 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/gui/themes/theme_loader.py +379 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/gui/themes/unicorn.yaml +1276 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/configs/global_settings.py +3 -4
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/llm/constants.py +13 -4
- agentcrew_ai-0.9.0/AgentCrew/setup.py +470 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/MANIFEST.in +1 -0
- {agentcrew_ai-0.8.13/agentcrew_ai.egg-info → agentcrew_ai-0.9.0}/PKG-INFO +1 -1
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0/agentcrew_ai.egg-info}/PKG-INFO +1 -1
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/agentcrew_ai.egg-info/SOURCES.txt +12 -7
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/pyproject.toml +1 -1
- agentcrew_ai-0.8.13/AgentCrew/__init__.py +0 -1
- agentcrew_ai-0.8.13/AgentCrew/app.py +0 -1004
- agentcrew_ai-0.8.13/AgentCrew/modules/gui/themes/__init__.py +0 -3
- agentcrew_ai-0.8.13/AgentCrew/modules/gui/themes/atom_light.py +0 -1365
- agentcrew_ai-0.8.13/AgentCrew/modules/gui/themes/catppuccin.py +0 -1404
- agentcrew_ai-0.8.13/AgentCrew/modules/gui/themes/dracula.py +0 -1372
- agentcrew_ai-0.8.13/AgentCrew/modules/gui/themes/nord.py +0 -1365
- agentcrew_ai-0.8.13/AgentCrew/modules/gui/themes/saigontech.py +0 -1359
- agentcrew_ai-0.8.13/AgentCrew/modules/gui/themes/style_provider.py +0 -422
- agentcrew_ai-0.8.13/AgentCrew/modules/gui/themes/unicorn.py +0 -1372
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/assets/agentcrew_logo.png +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/main.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/adapters.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/agent_cards.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/common/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/common/client/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/common/client/card_resolver.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/common/client/client.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/common/server/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/common/server/auth_middleware.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/common/server/task_manager.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/common/server/utils.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/errors.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/registry.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/server.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/task_manager.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/base.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/example.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/manager.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/remote_agent.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/tools/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/tools/ask.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/tools/delegate.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/tools/transfer.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/anthropic/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/anthropic/service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/chrome_manager.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/element_extractor.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/click_element.js +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/draw_element_boxes.js +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/extract_clickable_elements.js +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/extract_elements_by_text.js +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/extract_input_elements.js +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/extract_scrollable_elements.js +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/filter_hidden_elements.js +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/focus_and_clear_element.js +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/remove_element_boxes.js +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/scroll_to_element.js +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/trigger_input_events.js +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js_loader.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/tool.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/consolidation.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/file_handler.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/history.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/message/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/message/base.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/message/conversation.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/message/tool_manager.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/message_handler.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/clipboard/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/clipboard/service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/clipboard/tool.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/file_search_service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/grep_service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/parsers/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/parsers/base.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/parsers/cpp_parser.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/parsers/csharp_parser.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/parsers/generic_parser.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/parsers/go_parser.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/parsers/java_parser.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/parsers/javascript_parser.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/parsers/kotlin_parser.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/parsers/php_parser.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/parsers/python_parser.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/parsers/ruby_parser.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/parsers/rust_parser.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/tool.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/command_execution/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/command_execution/constants.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/command_execution/service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/command_execution/tool.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/command_execution/types.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/config/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/config/config_management.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/command_handlers.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/confirmation_handler.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/constants.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/diff_display.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/input_handler.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/tool_display.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/ui_effects.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/utils.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/custom_llm/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/custom_llm/copilot_response_service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/custom_llm/deepinfra_service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/custom_llm/github_copilot_service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/custom_llm/service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/file_editing/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/file_editing/safety_validator.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/file_editing/search_replace_engine.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/file_editing/service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/file_editing/tool.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/file_editing/tree_sitter_checker.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/google/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/google/native_service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/google/service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/groq/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/groq/service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/chat_components.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/completers.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/conversation_components.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/input_components.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/keyboard_handler.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/menu_components.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/message_handlers.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/tool_handlers.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/ui_state_manager.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/qt_ui.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/utils/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/utils/macos_clipboard.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/utils/strings.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/utils/wins_clipboard.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/config_window.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/configs/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/configs/agent_config.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/configs/custom_llm_provider.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/configs/mcp_config.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/configs/save_worker.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/diff_widget.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/history_sidebar.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/json_editor.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/loading_overlay.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/markdown_editor.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/message_bubble.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/paste_aware_textedit.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/system_message.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/token_usage.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/tool_widget.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/worker.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/image_generation/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/image_generation/service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/image_generation/tool.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/llm/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/llm/base.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/llm/model_registry.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/llm/service_manager.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/llm/types.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/mcpclient/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/mcpclient/auth.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/mcpclient/config.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/mcpclient/manager.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/mcpclient/service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/mcpclient/tool.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/memory/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/memory/base_service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/memory/chroma_service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/memory/context_persistent.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/memory/github_copilot_ef.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/memory/google_genai_ef.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/memory/tool.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/memory/voyageai_ef.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/openai/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/openai/response_service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/openai/service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/prompts/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/prompts/constants.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/tools/README.md +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/tools/registration.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/tools/registry.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/voice/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/voice/audio_handler.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/voice/base.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/voice/deepinfra_service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/voice/elevenlabs_service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/voice/text_cleaner.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/web_search/__init__.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/web_search/service.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/web_search/tool.py +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/CONTRIBUTING.md +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/LICENSE +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/README.md +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/agentcrew_ai.egg-info/dependency_links.txt +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/agentcrew_ai.egg-info/entry_points.txt +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/agentcrew_ai.egg-info/requires.txt +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/agentcrew_ai.egg-info/top_level.txt +0 -0
- {agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/setup.cfg +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.9.0"
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
3
|
+
import json
|
|
4
|
+
import asyncio
|
|
5
|
+
import functools
|
|
6
|
+
import nest_asyncio
|
|
7
|
+
from typing import Optional, Dict, Any, List
|
|
8
|
+
|
|
9
|
+
import click
|
|
10
|
+
|
|
11
|
+
from AgentCrew.setup import ApplicationSetup, PROVIDER_LIST
|
|
12
|
+
from AgentCrew.modules.config import ConfigManagement
|
|
13
|
+
from AgentCrew.modules.llm.service_manager import ServiceManager
|
|
14
|
+
from AgentCrew.modules.agents.local_agent import LocalAgent
|
|
15
|
+
|
|
16
|
+
nest_asyncio.apply()
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def common_options(func):
|
|
20
|
+
@click.option(
|
|
21
|
+
"--provider",
|
|
22
|
+
type=click.Choice(PROVIDER_LIST),
|
|
23
|
+
default=None,
|
|
24
|
+
help="LLM provider to use (claude, groq, openai, google, github_copilot, or deepinfra)",
|
|
25
|
+
)
|
|
26
|
+
@click.option(
|
|
27
|
+
"--agent-config",
|
|
28
|
+
default=None,
|
|
29
|
+
help="Path/URL to the agent configuration file.",
|
|
30
|
+
)
|
|
31
|
+
@click.option(
|
|
32
|
+
"--mcp-config", default=None, help="Path to the mcp servers configuration file."
|
|
33
|
+
)
|
|
34
|
+
@click.option(
|
|
35
|
+
"--memory-llm",
|
|
36
|
+
type=click.Choice(
|
|
37
|
+
["claude", "groq", "openai", "google", "deepinfra", "github_copilot"]
|
|
38
|
+
),
|
|
39
|
+
default=None,
|
|
40
|
+
help="LLM Model use for analyzing and processing memory",
|
|
41
|
+
)
|
|
42
|
+
@click.option(
|
|
43
|
+
"--memory-path", default=None, help="Path to the memory database location"
|
|
44
|
+
)
|
|
45
|
+
@functools.wraps(func)
|
|
46
|
+
def wrapper(*args, **kwargs):
|
|
47
|
+
return func(*args, **kwargs)
|
|
48
|
+
|
|
49
|
+
return wrapper
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class AgentCrewApplication:
|
|
53
|
+
def __init__(self):
|
|
54
|
+
self.config_manager = ConfigManagement()
|
|
55
|
+
self.setup = ApplicationSetup(self.config_manager)
|
|
56
|
+
self.setup.load_api_keys_from_config()
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def services(self) -> Optional[Dict[str, Any]]:
|
|
60
|
+
return self.setup.services
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
def agent_manager(self):
|
|
64
|
+
return self.setup.agent_manager
|
|
65
|
+
|
|
66
|
+
def run_console(
|
|
67
|
+
self,
|
|
68
|
+
provider: Optional[str] = None,
|
|
69
|
+
agent_config: Optional[str] = None,
|
|
70
|
+
mcp_config: Optional[str] = None,
|
|
71
|
+
memory_llm: Optional[str] = None,
|
|
72
|
+
with_voice: bool = False,
|
|
73
|
+
) -> None:
|
|
74
|
+
from AgentCrew.modules.console import ConsoleUI
|
|
75
|
+
from AgentCrew.modules.chat import MessageHandler
|
|
76
|
+
from AgentCrew.modules.mcpclient import MCPSessionManager
|
|
77
|
+
|
|
78
|
+
try:
|
|
79
|
+
if provider is None:
|
|
80
|
+
provider = self.setup.detect_provider()
|
|
81
|
+
if provider is None:
|
|
82
|
+
raise ValueError(
|
|
83
|
+
"No LLM API key found. Please set either ANTHROPIC_API_KEY, GEMINI_API_KEY, OPENAI_API_KEY, GROQ_API_KEY, or DEEPINFRA_API_KEY"
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
services = self.setup.setup_services(provider, memory_llm)
|
|
87
|
+
|
|
88
|
+
if mcp_config:
|
|
89
|
+
os.environ["MCP_CONFIG_PATH"] = mcp_config
|
|
90
|
+
|
|
91
|
+
self.setup.setup_agents(services, agent_config)
|
|
92
|
+
self.setup.restore_last_agent()
|
|
93
|
+
|
|
94
|
+
message_handler = MessageHandler(
|
|
95
|
+
services["memory"], services["context_persistent"], with_voice
|
|
96
|
+
)
|
|
97
|
+
global_config = self.config_manager.read_global_config_data()
|
|
98
|
+
|
|
99
|
+
ui = ConsoleUI(
|
|
100
|
+
message_handler,
|
|
101
|
+
global_config.get("global_settings", {}).get("swap_enter", False),
|
|
102
|
+
)
|
|
103
|
+
ui.start()
|
|
104
|
+
except Exception as e:
|
|
105
|
+
import traceback
|
|
106
|
+
|
|
107
|
+
print(traceback.format_exc())
|
|
108
|
+
click.echo(f"❌ Error: {str(e)}", err=True)
|
|
109
|
+
finally:
|
|
110
|
+
MCPSessionManager.get_instance().cleanup()
|
|
111
|
+
|
|
112
|
+
def run_gui(
|
|
113
|
+
self,
|
|
114
|
+
provider: Optional[str] = None,
|
|
115
|
+
agent_config: Optional[str] = None,
|
|
116
|
+
mcp_config: Optional[str] = None,
|
|
117
|
+
memory_llm: Optional[str] = None,
|
|
118
|
+
with_voice: bool = False,
|
|
119
|
+
) -> None:
|
|
120
|
+
from PySide6.QtCore import QCoreApplication
|
|
121
|
+
from PySide6.QtCore import Qt
|
|
122
|
+
from PySide6.QtWidgets import QApplication
|
|
123
|
+
from AgentCrew.modules.gui import ChatWindow
|
|
124
|
+
from AgentCrew.modules.chat import MessageHandler
|
|
125
|
+
from AgentCrew.modules.mcpclient import MCPSessionManager
|
|
126
|
+
|
|
127
|
+
try:
|
|
128
|
+
if provider is None:
|
|
129
|
+
provider = self.setup.detect_provider()
|
|
130
|
+
if provider is None:
|
|
131
|
+
from AgentCrew.modules.gui.widgets.config_window import ConfigWindow
|
|
132
|
+
|
|
133
|
+
app = QApplication(sys.argv)
|
|
134
|
+
config_window = ConfigWindow()
|
|
135
|
+
config_window.tab_widget.setCurrentIndex(3)
|
|
136
|
+
config_window.show()
|
|
137
|
+
sys.exit(app.exec())
|
|
138
|
+
|
|
139
|
+
services = self.setup.setup_services(provider, memory_llm)
|
|
140
|
+
|
|
141
|
+
if mcp_config:
|
|
142
|
+
os.environ["MCP_CONFIG_PATH"] = mcp_config
|
|
143
|
+
|
|
144
|
+
self.setup.setup_agents(services, agent_config)
|
|
145
|
+
self.setup.restore_last_agent()
|
|
146
|
+
|
|
147
|
+
message_handler = MessageHandler(
|
|
148
|
+
services["memory"], services["context_persistent"], with_voice
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
QCoreApplication.setAttribute(Qt.ApplicationAttribute.AA_UseOpenGLES)
|
|
152
|
+
app = QApplication(sys.argv)
|
|
153
|
+
chat_window = ChatWindow(message_handler)
|
|
154
|
+
chat_window.show()
|
|
155
|
+
sys.exit(app.exec())
|
|
156
|
+
except Exception as e:
|
|
157
|
+
import traceback
|
|
158
|
+
|
|
159
|
+
print(traceback.format_exc())
|
|
160
|
+
click.echo(f"❌ Error: {str(e)}", err=True)
|
|
161
|
+
finally:
|
|
162
|
+
MCPSessionManager.get_instance().cleanup()
|
|
163
|
+
|
|
164
|
+
def run_server(
|
|
165
|
+
self,
|
|
166
|
+
host: str = "0.0.0.0",
|
|
167
|
+
port: int = 41241,
|
|
168
|
+
base_url: Optional[str] = None,
|
|
169
|
+
provider: Optional[str] = None,
|
|
170
|
+
model_id: Optional[str] = None,
|
|
171
|
+
agent_config: Optional[str] = None,
|
|
172
|
+
api_key: Optional[str] = None,
|
|
173
|
+
mcp_config: Optional[str] = None,
|
|
174
|
+
memory_llm: Optional[str] = None,
|
|
175
|
+
) -> None:
|
|
176
|
+
from AgentCrew.modules.a2a.server import A2AServer
|
|
177
|
+
from AgentCrew.modules.mcpclient import MCPSessionManager
|
|
178
|
+
|
|
179
|
+
try:
|
|
180
|
+
if not base_url:
|
|
181
|
+
base_url = f"http://{host}:{port}"
|
|
182
|
+
|
|
183
|
+
if provider is None:
|
|
184
|
+
provider = self.setup.detect_provider()
|
|
185
|
+
if provider is None:
|
|
186
|
+
raise ValueError(
|
|
187
|
+
"No LLM API key found. Please set either ANTHROPIC_API_KEY, GEMINI_API_KEY, OPENAI_API_KEY, GROQ_API_KEY, or DEEPINFRA_API_KEY"
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
services = self.setup.setup_services(
|
|
191
|
+
provider, memory_llm, need_memory=False
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
if mcp_config:
|
|
195
|
+
os.environ["MCP_CONFIG_PATH"] = mcp_config
|
|
196
|
+
|
|
197
|
+
os.environ["AGENTCREW_DISABLE_GUI"] = "true"
|
|
198
|
+
|
|
199
|
+
self.setup.setup_agents(services, agent_config, provider, model_id)
|
|
200
|
+
|
|
201
|
+
if self.agent_manager is None:
|
|
202
|
+
raise ValueError("Agent manager is not initialized")
|
|
203
|
+
|
|
204
|
+
self.agent_manager.enforce_transfer = False
|
|
205
|
+
|
|
206
|
+
server = A2AServer(
|
|
207
|
+
agent_manager=self.agent_manager,
|
|
208
|
+
host=host,
|
|
209
|
+
port=port,
|
|
210
|
+
base_url=base_url,
|
|
211
|
+
api_key=api_key,
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
click.echo(f"Starting A2A server on {host}:{port}")
|
|
215
|
+
click.echo(
|
|
216
|
+
f"Available agents: {', '.join(self.agent_manager.agents.keys())}"
|
|
217
|
+
)
|
|
218
|
+
server.start()
|
|
219
|
+
except Exception as e:
|
|
220
|
+
import traceback
|
|
221
|
+
|
|
222
|
+
print(traceback.format_exc())
|
|
223
|
+
click.echo(f"❌ Error: {str(e)}", err=True)
|
|
224
|
+
finally:
|
|
225
|
+
MCPSessionManager.get_instance().cleanup()
|
|
226
|
+
|
|
227
|
+
def _parse_output_schema(self, schema_input: str) -> tuple[str, dict]:
|
|
228
|
+
try:
|
|
229
|
+
from AgentCrew.modules.prompts.constants import SCHEMA_ENFORCEMENT_PROMPT
|
|
230
|
+
|
|
231
|
+
if os.path.exists(schema_input):
|
|
232
|
+
with open(schema_input, "r", encoding="utf-8") as f:
|
|
233
|
+
schema_dict = json.load(f)
|
|
234
|
+
else:
|
|
235
|
+
schema_dict = json.loads(schema_input)
|
|
236
|
+
|
|
237
|
+
schema_json = json.dumps(schema_dict, indent=2)
|
|
238
|
+
|
|
239
|
+
enforcement_prompt = SCHEMA_ENFORCEMENT_PROMPT.replace(
|
|
240
|
+
"{schema_json}", schema_json
|
|
241
|
+
)
|
|
242
|
+
return enforcement_prompt, schema_dict
|
|
243
|
+
|
|
244
|
+
except json.JSONDecodeError as e:
|
|
245
|
+
raise ValueError(f"Invalid JSON schema: {e}")
|
|
246
|
+
except Exception as e:
|
|
247
|
+
raise ValueError(f"Failed to load output schema: {e}")
|
|
248
|
+
|
|
249
|
+
def _validate_response_against_schema(
|
|
250
|
+
self, response: str, schema_dict: Dict[str, Any]
|
|
251
|
+
) -> tuple[bool, Optional[str]]:
|
|
252
|
+
from jsonschema import validate, ValidationError
|
|
253
|
+
|
|
254
|
+
try:
|
|
255
|
+
response_json = json.loads(response)
|
|
256
|
+
except json.JSONDecodeError as e:
|
|
257
|
+
return (
|
|
258
|
+
False,
|
|
259
|
+
f"Response is not valid JSON: {e}\n\nResponse received:\n{response[:500]}",
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
try:
|
|
263
|
+
validate(instance=response_json, schema=schema_dict)
|
|
264
|
+
return True, None
|
|
265
|
+
except ValidationError as e:
|
|
266
|
+
error_details = (
|
|
267
|
+
"JSON Schema Validation Error:\n"
|
|
268
|
+
f" - Path: {' -> '.join(str(p) for p in e.path) if e.path else 'root'}\n"
|
|
269
|
+
f" - Error: {e.message}\n"
|
|
270
|
+
f" - Failed value: {json.dumps(e.instance, indent=2)}\n"
|
|
271
|
+
)
|
|
272
|
+
if e.schema_path:
|
|
273
|
+
error_details += (
|
|
274
|
+
f" - Schema path: {' -> '.join(str(p) for p in e.schema_path)}\n"
|
|
275
|
+
)
|
|
276
|
+
return False, error_details
|
|
277
|
+
|
|
278
|
+
def run_job(
|
|
279
|
+
self,
|
|
280
|
+
agent: str,
|
|
281
|
+
task: str,
|
|
282
|
+
files: Optional[List[str]] = None,
|
|
283
|
+
provider: Optional[str] = None,
|
|
284
|
+
model_id: Optional[str] = None,
|
|
285
|
+
agent_config: Optional[str] = None,
|
|
286
|
+
mcp_config: Optional[str] = None,
|
|
287
|
+
memory_llm: Optional[str] = None,
|
|
288
|
+
output_schema: Optional[str] = None,
|
|
289
|
+
) -> str:
|
|
290
|
+
from AgentCrew.modules.chat import MessageHandler
|
|
291
|
+
from AgentCrew.modules.mcpclient import MCPSessionManager
|
|
292
|
+
from AgentCrew.modules.llm.model_registry import ModelRegistry
|
|
293
|
+
|
|
294
|
+
try:
|
|
295
|
+
if provider is None:
|
|
296
|
+
provider = self.setup.detect_provider()
|
|
297
|
+
if provider is None:
|
|
298
|
+
raise ValueError(
|
|
299
|
+
"No LLM API key found. Please set either ANTHROPIC_API_KEY, GEMINI_API_KEY, OPENAI_API_KEY, GROQ_API_KEY, or DEEPINFRA_API_KEY"
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
services = self.setup.setup_services(
|
|
303
|
+
provider, memory_llm, need_memory=False
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
if mcp_config:
|
|
307
|
+
os.environ["MCP_CONFIG_PATH"] = mcp_config
|
|
308
|
+
|
|
309
|
+
os.environ["AGENTCREW_DISABLE_GUI"] = "true"
|
|
310
|
+
|
|
311
|
+
self.setup.setup_agents(services, agent_config)
|
|
312
|
+
|
|
313
|
+
llm_manager = ServiceManager.get_instance()
|
|
314
|
+
|
|
315
|
+
llm_service = llm_manager.get_service(provider)
|
|
316
|
+
if model_id:
|
|
317
|
+
llm_service.model = model_id
|
|
318
|
+
|
|
319
|
+
if self.agent_manager is None:
|
|
320
|
+
raise ValueError("Agent manager is not initialized")
|
|
321
|
+
|
|
322
|
+
self.agent_manager.update_llm_service(llm_service)
|
|
323
|
+
|
|
324
|
+
for local_agent in self.agent_manager.agents:
|
|
325
|
+
if isinstance(local_agent, LocalAgent):
|
|
326
|
+
local_agent.is_remoting_mode = True
|
|
327
|
+
|
|
328
|
+
self.agent_manager.enforce_transfer = False
|
|
329
|
+
self.agent_manager.one_turn_process = True
|
|
330
|
+
|
|
331
|
+
current_agent = self.agent_manager.get_local_agent(agent)
|
|
332
|
+
|
|
333
|
+
if current_agent:
|
|
334
|
+
schema_dict = None
|
|
335
|
+
if output_schema:
|
|
336
|
+
schema_prompt, schema_dict = self._parse_output_schema(
|
|
337
|
+
output_schema
|
|
338
|
+
)
|
|
339
|
+
if "structured_output" in ModelRegistry.get_model_capabilities(
|
|
340
|
+
f"{provider}/{model_id}"
|
|
341
|
+
):
|
|
342
|
+
current_agent.llm.structured_output = schema_dict
|
|
343
|
+
else:
|
|
344
|
+
current_agent.set_custom_system_prompt(schema_prompt)
|
|
345
|
+
|
|
346
|
+
self.agent_manager.select_agent(current_agent.name)
|
|
347
|
+
|
|
348
|
+
message_handler = MessageHandler(
|
|
349
|
+
services["memory"], services["context_persistent"]
|
|
350
|
+
)
|
|
351
|
+
message_handler.is_non_interactive = True
|
|
352
|
+
message_handler.agent = current_agent
|
|
353
|
+
|
|
354
|
+
if files:
|
|
355
|
+
for file_path in files:
|
|
356
|
+
asyncio.run(
|
|
357
|
+
message_handler.process_user_input(f"/file {file_path}")
|
|
358
|
+
)
|
|
359
|
+
|
|
360
|
+
max_attempts = 4
|
|
361
|
+
attempt = 0
|
|
362
|
+
response = None
|
|
363
|
+
|
|
364
|
+
asyncio.run(message_handler.process_user_input(task))
|
|
365
|
+
|
|
366
|
+
while attempt < max_attempts:
|
|
367
|
+
attempt += 1
|
|
368
|
+
response, _, _ = asyncio.run(
|
|
369
|
+
message_handler.get_assistant_response()
|
|
370
|
+
)
|
|
371
|
+
if not output_schema or not schema_dict:
|
|
372
|
+
break
|
|
373
|
+
|
|
374
|
+
if response is None:
|
|
375
|
+
asyncio.run(
|
|
376
|
+
message_handler.process_user_input(
|
|
377
|
+
"No response was generated. Please try again."
|
|
378
|
+
)
|
|
379
|
+
)
|
|
380
|
+
continue
|
|
381
|
+
|
|
382
|
+
success, retry_message = self._validate_response_against_schema(
|
|
383
|
+
response, schema_dict
|
|
384
|
+
)
|
|
385
|
+
if success:
|
|
386
|
+
break
|
|
387
|
+
else:
|
|
388
|
+
if retry_message:
|
|
389
|
+
asyncio.run(
|
|
390
|
+
message_handler.process_user_input(retry_message)
|
|
391
|
+
)
|
|
392
|
+
|
|
393
|
+
MCPSessionManager.get_instance().cleanup()
|
|
394
|
+
return response.strip() if response else ""
|
|
395
|
+
else:
|
|
396
|
+
raise ValueError(f"Agent '{agent}' not found")
|
|
397
|
+
|
|
398
|
+
except Exception:
|
|
399
|
+
import traceback
|
|
400
|
+
|
|
401
|
+
print(traceback.format_exc())
|
|
402
|
+
raise
|
|
403
|
+
|
|
404
|
+
def login(self) -> bool:
|
|
405
|
+
return self.setup.login()
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import click
|
|
2
2
|
import os
|
|
3
3
|
import sys
|
|
4
|
+
from AgentCrew.app import common_options
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
def _custom_unraisable_hook(unraisable):
|
|
@@ -48,36 +49,6 @@ def cli():
|
|
|
48
49
|
)
|
|
49
50
|
|
|
50
51
|
|
|
51
|
-
def common_options(func):
|
|
52
|
-
import functools
|
|
53
|
-
|
|
54
|
-
@click.option(
|
|
55
|
-
"--provider",
|
|
56
|
-
type=click.Choice(PROVIDER_LIST),
|
|
57
|
-
default=None,
|
|
58
|
-
help="LLM provider to use (claude, groq, openai, google, github_copilot, or deepinfra)",
|
|
59
|
-
)
|
|
60
|
-
@click.option(
|
|
61
|
-
"--agent-config", default=None, help="Path/URL to the agent configuration file."
|
|
62
|
-
)
|
|
63
|
-
@click.option(
|
|
64
|
-
"--mcp-config", default=None, help="Path to the mcp servers configuration file."
|
|
65
|
-
)
|
|
66
|
-
@click.option(
|
|
67
|
-
"--memory-llm",
|
|
68
|
-
type=click.Choice(
|
|
69
|
-
["claude", "groq", "openai", "google", "deepinfra", "github_copilot"]
|
|
70
|
-
),
|
|
71
|
-
default=None,
|
|
72
|
-
help="LLM Model use for analyzing and processing memory",
|
|
73
|
-
)
|
|
74
|
-
@functools.wraps(func)
|
|
75
|
-
def wrapper(*args, **kwargs):
|
|
76
|
-
return func(*args, **kwargs)
|
|
77
|
-
|
|
78
|
-
return wrapper
|
|
79
|
-
|
|
80
|
-
|
|
81
52
|
def cli_prod():
|
|
82
53
|
if sys.argv[1] == "--version":
|
|
83
54
|
click.echo(f"AgentCrew version: {get_current_version()}")
|
|
@@ -672,7 +672,7 @@ Whenever condition on `when` clause in a **Behavior** matches, tailor your respo
|
|
|
672
672
|
adaptive_messages["content"].append(
|
|
673
673
|
{
|
|
674
674
|
"type": "text",
|
|
675
|
-
"text": f"
|
|
675
|
+
"text": f"cwd `{os.getcwd()}` structure:\n{dir_structure}",
|
|
676
676
|
}
|
|
677
677
|
)
|
|
678
678
|
|
|
@@ -763,7 +763,7 @@ Whenever condition on `when` clause in a **Behavior** matches, tailor your respo
|
|
|
763
763
|
continue
|
|
764
764
|
|
|
765
765
|
if is_shrinkable and i < shrink_threshold:
|
|
766
|
-
msg["content"] = "[
|
|
766
|
+
msg["content"] = "[PRUNED]"
|
|
767
767
|
continue
|
|
768
768
|
|
|
769
769
|
# Check if content starts with [UNIQUE]
|
{agentcrew_ai-0.8.13 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/message/command_processor.py
RENAMED
|
@@ -43,14 +43,8 @@ class CommandProcessor:
|
|
|
43
43
|
return CommandResult(handled=True, clear_flag=True)
|
|
44
44
|
elif user_input.lower().startswith("/copy"):
|
|
45
45
|
return await self._handle_copy_command(user_input)
|
|
46
|
-
elif user_input.lower()
|
|
47
|
-
self.
|
|
48
|
-
"debug_requested", self.message_handler.agent.clean_history
|
|
49
|
-
)
|
|
50
|
-
self.message_handler._notify(
|
|
51
|
-
"debug_requested", self.message_handler.streamline_messages
|
|
52
|
-
)
|
|
53
|
-
return CommandResult(handled=True, clear_flag=True)
|
|
46
|
+
elif user_input.lower().startswith("/debug"):
|
|
47
|
+
return self._handle_debug_command(user_input)
|
|
54
48
|
elif user_input.lower().startswith("/think "):
|
|
55
49
|
try:
|
|
56
50
|
budget = user_input[7:].strip()
|
|
@@ -759,6 +753,37 @@ class CommandProcessor:
|
|
|
759
753
|
self.message_handler._notify("voice_recording_completed", None)
|
|
760
754
|
return CommandResult(handled=True, clear_flag=True)
|
|
761
755
|
|
|
756
|
+
def _handle_debug_command(self, user_input: str) -> CommandResult:
|
|
757
|
+
"""Handle /debug command with optional filtering.
|
|
758
|
+
|
|
759
|
+
Usage:
|
|
760
|
+
/debug - Show both agent and chat messages
|
|
761
|
+
/debug agent - Show only agent messages
|
|
762
|
+
/debug chat - Show only chat/streamline messages
|
|
763
|
+
"""
|
|
764
|
+
parts = user_input.lower().split()
|
|
765
|
+
filter_type = parts[1] if len(parts) > 1 else None
|
|
766
|
+
|
|
767
|
+
if filter_type and filter_type not in ("agent", "chat"):
|
|
768
|
+
self.message_handler._notify(
|
|
769
|
+
"error", f"Invalid filter '{filter_type}'. Use 'agent' or 'chat'."
|
|
770
|
+
)
|
|
771
|
+
return CommandResult(handled=True, clear_flag=True)
|
|
772
|
+
|
|
773
|
+
if filter_type is None or filter_type == "agent":
|
|
774
|
+
self.message_handler._notify(
|
|
775
|
+
"debug_requested",
|
|
776
|
+
{"type": "agent", "messages": self.message_handler.agent.clean_history},
|
|
777
|
+
)
|
|
778
|
+
|
|
779
|
+
if filter_type is None or filter_type == "chat":
|
|
780
|
+
self.message_handler._notify(
|
|
781
|
+
"debug_requested",
|
|
782
|
+
{"type": "chat", "messages": self.message_handler.streamline_messages},
|
|
783
|
+
)
|
|
784
|
+
|
|
785
|
+
return CommandResult(handled=True, clear_flag=True)
|
|
786
|
+
|
|
762
787
|
def _handle_toggle_transfer_command(self, user_input: str) -> CommandResult:
|
|
763
788
|
"""Handle /toggle_transfer command to toggle the enforce_transfer property of agent_manager."""
|
|
764
789
|
try:
|
|
@@ -470,9 +470,13 @@ class MessageHandler(Observable):
|
|
|
470
470
|
if isinstance(e, BadRequestError):
|
|
471
471
|
if e.code == "model_max_prompt_tokens_exceeded":
|
|
472
472
|
from AgentCrew.modules.agents import LocalAgent
|
|
473
|
+
from AgentCrew.modules.llm.model_registry import ModelRegistry
|
|
473
474
|
|
|
474
475
|
if isinstance(self.agent, LocalAgent):
|
|
475
|
-
|
|
476
|
+
max_token = ModelRegistry.get_model_limit(
|
|
477
|
+
self.agent.get_model()
|
|
478
|
+
)
|
|
479
|
+
self.agent.input_tokens_usage = max_token
|
|
476
480
|
return await self.get_assistant_response()
|
|
477
481
|
if self.current_user_input:
|
|
478
482
|
self.conversation_manager.store_conversation_turn(
|
|
@@ -174,7 +174,7 @@ class ChatCompleter(Completer):
|
|
|
174
174
|
),
|
|
175
175
|
(
|
|
176
176
|
"/debug",
|
|
177
|
-
"Show debug
|
|
177
|
+
"Show debug info (usage: /debug [agent|chat])",
|
|
178
178
|
),
|
|
179
179
|
("/think", "Set thinking budget (usage: /think <budget>)"),
|
|
180
180
|
(
|
|
@@ -71,14 +71,6 @@ class ConsoleUI(Observer):
|
|
|
71
71
|
self.conversation_handler = ConversationHandler(self)
|
|
72
72
|
self.command_handlers = CommandHandlers(self)
|
|
73
73
|
|
|
74
|
-
def _get_conversation_history(self, conversation_id: str):
|
|
75
|
-
"""Get conversation history for preview in browser."""
|
|
76
|
-
if self.message_handler.persistent_service:
|
|
77
|
-
return self.message_handler.persistent_service.get_conversation_history(
|
|
78
|
-
conversation_id
|
|
79
|
-
)
|
|
80
|
-
return None
|
|
81
|
-
|
|
82
74
|
def listen(self, event: str, data: Any = None):
|
|
83
75
|
"""
|
|
84
76
|
Update method required by the Observer interface. Handles events from the MessageHandler.
|
|
@@ -223,8 +215,10 @@ class ConsoleUI(Observer):
|
|
|
223
215
|
)
|
|
224
216
|
elif event == "conversations_listed":
|
|
225
217
|
self.display_handlers.display_conversations(
|
|
226
|
-
data
|
|
227
|
-
|
|
218
|
+
data,
|
|
219
|
+
get_history_callback=self.conversation_handler.get_conversation_history,
|
|
220
|
+
delete_callback=self.conversation_handler.delete_conversations,
|
|
221
|
+
)
|
|
228
222
|
self.conversation_handler.update_cached_conversations(data)
|
|
229
223
|
elif event == "conversation_loaded":
|
|
230
224
|
loaded_text = Text("Loaded conversation: ", style=RICH_STYLE_YELLOW)
|
|
@@ -466,7 +460,8 @@ class ConsoleUI(Observer):
|
|
|
466
460
|
try:
|
|
467
461
|
selected_id = self.display_handlers.display_conversations(
|
|
468
462
|
conversations,
|
|
469
|
-
get_history_callback=self.
|
|
463
|
+
get_history_callback=self.conversation_handler.get_conversation_history,
|
|
464
|
+
delete_callback=self.conversation_handler.delete_conversations,
|
|
470
465
|
)
|
|
471
466
|
if selected_id:
|
|
472
467
|
self.conversation_handler.handle_load_conversation(
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from .browser import ConversationBrowser
|
|
2
|
+
from .browser_ui import ConversationBrowserUI
|
|
3
|
+
from .browser_input_handler import ConversationBrowserInputHandler
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"ConversationBrowser",
|
|
7
|
+
"ConversationBrowserUI",
|
|
8
|
+
"ConversationBrowserInputHandler",
|
|
9
|
+
]
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"""Conversation browser with split-panel interface.
|
|
2
|
+
|
|
3
|
+
Provides Rich-based UI for listing and loading conversations with preview.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
from typing import List, Dict, Any, Optional, Callable
|
|
9
|
+
|
|
10
|
+
from rich.console import Console
|
|
11
|
+
from rich.text import Text
|
|
12
|
+
|
|
13
|
+
from ..constants import RICH_STYLE_YELLOW
|
|
14
|
+
from .browser_ui import ConversationBrowserUI
|
|
15
|
+
from .browser_input_handler import ConversationBrowserInputHandler
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class ConversationBrowser:
|
|
19
|
+
"""Interactive conversation browser with split-panel layout.
|
|
20
|
+
|
|
21
|
+
This class orchestrates the UI rendering and input handling components
|
|
22
|
+
to provide a complete interactive conversation browsing experience.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
def __init__(
|
|
26
|
+
self,
|
|
27
|
+
console: Console,
|
|
28
|
+
get_conversation_history: Optional[
|
|
29
|
+
Callable[[str], List[Dict[str, Any]]]
|
|
30
|
+
] = None,
|
|
31
|
+
on_delete: Optional[Callable[[List[str]], bool]] = None,
|
|
32
|
+
):
|
|
33
|
+
"""Initialize the conversation browser.
|
|
34
|
+
|
|
35
|
+
Args:
|
|
36
|
+
console: Rich console for rendering
|
|
37
|
+
get_conversation_history: Optional callback to fetch full conversation history
|
|
38
|
+
on_delete: Optional callback to delete conversations by IDs. Returns True if successful.
|
|
39
|
+
"""
|
|
40
|
+
self._console = console
|
|
41
|
+
self._ui = ConversationBrowserUI(
|
|
42
|
+
console=console,
|
|
43
|
+
get_conversation_history=get_conversation_history,
|
|
44
|
+
)
|
|
45
|
+
self._input_handler = ConversationBrowserInputHandler(
|
|
46
|
+
ui=self._ui,
|
|
47
|
+
on_delete=on_delete,
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
def set_conversations(self, conversations: List[Dict[str, Any]]):
|
|
51
|
+
"""Set the conversations list to browse."""
|
|
52
|
+
self._ui.set_conversations(conversations)
|
|
53
|
+
|
|
54
|
+
def get_selected_conversation_id(self) -> Optional[str]:
|
|
55
|
+
"""Get the ID of the currently selected conversation."""
|
|
56
|
+
return self._ui.get_selected_conversation_id()
|
|
57
|
+
|
|
58
|
+
def get_selected_conversation_index(self) -> int:
|
|
59
|
+
"""Get the 1-based index of the currently selected conversation."""
|
|
60
|
+
return self._ui.get_selected_conversation_index()
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
def ui(self) -> ConversationBrowserUI:
|
|
64
|
+
"""Access the UI component directly."""
|
|
65
|
+
return self._ui
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def input_handler(self) -> ConversationBrowserInputHandler:
|
|
69
|
+
"""Access the input handler component directly."""
|
|
70
|
+
return self._input_handler
|
|
71
|
+
|
|
72
|
+
def show(self) -> Optional[str]:
|
|
73
|
+
"""Show the interactive conversation browser.
|
|
74
|
+
|
|
75
|
+
Returns:
|
|
76
|
+
The ID of the selected conversation, or None if cancelled.
|
|
77
|
+
"""
|
|
78
|
+
if not self._ui.conversations:
|
|
79
|
+
self._console.print(
|
|
80
|
+
Text("No conversations available.", style=RICH_STYLE_YELLOW)
|
|
81
|
+
)
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
return self._input_handler.run()
|