fast-agent-mcp 0.2.27__tar.gz → 0.2.29__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 (199) hide show
  1. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/.gitignore +2 -2
  2. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/PKG-INFO +13 -8
  3. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/README.md +5 -3
  4. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/pyproject.toml +9 -5
  5. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/agent.py +1 -17
  6. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/base_agent.py +2 -0
  7. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/app.py +1 -1
  8. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/cli/commands/url_parser.py +7 -1
  9. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/config.py +3 -0
  10. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/context.py +7 -3
  11. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/agent_app.py +7 -2
  12. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/interactive_prompt.py +60 -53
  13. fast_agent_mcp-0.2.29/src/mcp_agent/llm/augmented_llm_slow.py +42 -0
  14. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/model_factory.py +74 -37
  15. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/provider_types.py +4 -3
  16. fast_agent_mcp-0.2.29/src/mcp_agent/llm/providers/augmented_llm_deepseek.py +79 -0
  17. fast_agent_mcp-0.2.29/src/mcp_agent/llm/providers/augmented_llm_google_native.py +459 -0
  18. fast_agent_mcp-0.2.27/src/mcp_agent/llm/providers/augmented_llm_google.py → fast_agent_mcp-0.2.29/src/mcp_agent/llm/providers/augmented_llm_google_oai.py +2 -2
  19. fast_agent_mcp-0.2.29/src/mcp_agent/llm/providers/google_converter.py +365 -0
  20. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/common.py +2 -2
  21. fast_agent_mcp-0.2.29/src/mcp_agent/mcp/helpers/server_config_helpers.py +23 -0
  22. fast_agent_mcp-0.2.29/src/mcp_agent/mcp/hf_auth.py +87 -0
  23. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/mcp_agent_client_session.py +63 -60
  24. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/mcp_aggregator.py +18 -3
  25. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/mcp_connection_manager.py +6 -5
  26. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/sampling.py +40 -10
  27. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp_server_registry.py +25 -7
  28. fast_agent_mcp-0.2.29/src/mcp_agent/tools/tool_definition.py +14 -0
  29. fast_agent_mcp-0.2.27/src/mcp_agent/llm/providers/augmented_llm_deepseek.py +0 -30
  30. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/LICENSE +0 -0
  31. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/azure-openai/fastagent.config.yaml +0 -0
  32. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/data-analysis/analysis-campaign.py +0 -0
  33. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/data-analysis/analysis.py +0 -0
  34. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/data-analysis/fastagent.config.yaml +0 -0
  35. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
  36. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/mcp/state-transfer/agent_one.py +0 -0
  37. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/mcp/state-transfer/agent_two.py +0 -0
  38. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
  39. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/mcp/vision-examples/example1.py +0 -0
  40. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/mcp/vision-examples/example2.py +0 -0
  41. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/mcp/vision-examples/example3.py +0 -0
  42. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/mcp/vision-examples/fastagent.config.yaml +0 -0
  43. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/otel/agent.py +0 -0
  44. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/otel/agent2.py +0 -0
  45. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/otel/docker-compose.yaml +0 -0
  46. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/otel/fastagent.config.yaml +0 -0
  47. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/researcher/fastagent.config.yaml +0 -0
  48. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/researcher/researcher-eval.py +0 -0
  49. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/researcher/researcher-imp.py +0 -0
  50. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/researcher/researcher.py +0 -0
  51. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/tensorzero/README.md +0 -0
  52. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/tensorzero/agent.py +0 -0
  53. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/tensorzero/docker-compose.yml +0 -0
  54. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/tensorzero/fastagent.config.yaml +0 -0
  55. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/tensorzero/image_demo.py +0 -0
  56. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/tensorzero/mcp_server/mcp_server.py +0 -0
  57. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/tensorzero/simple_agent.py +0 -0
  58. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/workflows/chaining.py +0 -0
  59. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/workflows/evaluator.py +0 -0
  60. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/workflows/fastagent.config.yaml +0 -0
  61. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/workflows/graded_report.md +0 -0
  62. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/workflows/human_input.py +0 -0
  63. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/workflows/orchestrator.py +0 -0
  64. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/workflows/parallel.py +0 -0
  65. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/workflows/router.py +0 -0
  66. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/workflows/short_story.md +0 -0
  67. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/examples/workflows/short_story.txt +0 -0
  68. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/__init__.py +0 -0
  69. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/__init__.py +0 -0
  70. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/workflow/__init__.py +0 -0
  71. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/workflow/chain_agent.py +0 -0
  72. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/workflow/evaluator_optimizer.py +0 -0
  73. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/workflow/orchestrator_agent.py +0 -0
  74. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/workflow/orchestrator_models.py +0 -0
  75. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/workflow/orchestrator_prompts.py +0 -0
  76. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/workflow/parallel_agent.py +0 -0
  77. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/workflow/router_agent.py +0 -0
  78. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/cli/__init__.py +0 -0
  79. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/cli/__main__.py +0 -0
  80. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/cli/commands/check_config.py +0 -0
  81. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/cli/commands/go.py +0 -0
  82. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/cli/commands/quickstart.py +0 -0
  83. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/cli/commands/setup.py +0 -0
  84. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/cli/main.py +0 -0
  85. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/cli/terminal.py +0 -0
  86. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/console.py +0 -0
  87. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/context_dependent.py +0 -0
  88. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/__init__.py +0 -0
  89. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/agent_types.py +0 -0
  90. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/direct_decorators.py +0 -0
  91. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/direct_factory.py +0 -0
  92. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/enhanced_prompt.py +0 -0
  93. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/error_handling.py +0 -0
  94. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/exceptions.py +0 -0
  95. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/fastagent.py +0 -0
  96. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/mcp_content.py +0 -0
  97. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/prompt.py +0 -0
  98. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/request_params.py +0 -0
  99. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/validation.py +0 -0
  100. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/event_progress.py +0 -0
  101. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/executor/__init__.py +0 -0
  102. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/executor/executor.py +0 -0
  103. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/executor/task_registry.py +0 -0
  104. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/executor/workflow_signal.py +0 -0
  105. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/human_input/__init__.py +0 -0
  106. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/human_input/handler.py +0 -0
  107. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/human_input/types.py +0 -0
  108. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/__init__.py +0 -0
  109. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/augmented_llm.py +0 -0
  110. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/augmented_llm_passthrough.py +0 -0
  111. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/augmented_llm_playback.py +0 -0
  112. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/memory.py +0 -0
  113. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/prompt_utils.py +0 -0
  114. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/provider_key_manager.py +0 -0
  115. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/__init__.py +0 -0
  116. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/anthropic_utils.py +0 -0
  117. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/augmented_llm_anthropic.py +0 -0
  118. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/augmented_llm_azure.py +0 -0
  119. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/augmented_llm_generic.py +0 -0
  120. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/augmented_llm_openai.py +0 -0
  121. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/augmented_llm_openrouter.py +0 -0
  122. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/augmented_llm_tensorzero.py +0 -0
  123. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/multipart_converter_anthropic.py +0 -0
  124. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/multipart_converter_openai.py +0 -0
  125. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/multipart_converter_tensorzero.py +0 -0
  126. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/openai_multipart.py +0 -0
  127. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/openai_utils.py +0 -0
  128. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/sampling_converter_anthropic.py +0 -0
  129. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/sampling_converter_openai.py +0 -0
  130. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/sampling_converter.py +0 -0
  131. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/sampling_format_converter.py +0 -0
  132. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/logging/__init__.py +0 -0
  133. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/logging/events.py +0 -0
  134. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/logging/json_serializer.py +0 -0
  135. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/logging/listeners.py +0 -0
  136. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/logging/logger.py +0 -0
  137. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/logging/rich_progress.py +0 -0
  138. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/logging/transport.py +0 -0
  139. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/__init__.py +0 -0
  140. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/gen_client.py +0 -0
  141. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/helpers/__init__.py +0 -0
  142. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/helpers/content_helpers.py +0 -0
  143. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/interfaces.py +0 -0
  144. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/logger_textio.py +0 -0
  145. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/mime_utils.py +0 -0
  146. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompt_message_multipart.py +0 -0
  147. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompt_render.py +0 -0
  148. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompt_serialization.py +0 -0
  149. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompts/__init__.py +0 -0
  150. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompts/__main__.py +0 -0
  151. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompts/prompt_constants.py +0 -0
  152. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompts/prompt_helpers.py +0 -0
  153. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompts/prompt_load.py +0 -0
  154. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompts/prompt_server.py +0 -0
  155. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompts/prompt_template.py +0 -0
  156. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/resource_utils.py +0 -0
  157. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp_server/__init__.py +0 -0
  158. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp_server/agent_server.py +0 -0
  159. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/progress_display.py +0 -0
  160. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/data-analysis/analysis-campaign.py +0 -0
  161. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/data-analysis/analysis.py +0 -0
  162. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/data-analysis/fastagent.config.yaml +0 -0
  163. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
  164. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/in_dev/agent_build.py +0 -0
  165. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/in_dev/css-LICENSE.txt +0 -0
  166. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/in_dev/slides.py +0 -0
  167. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/internal/agent.py +0 -0
  168. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/internal/fastagent.config.yaml +0 -0
  169. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/internal/history_transfer.py +0 -0
  170. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/internal/job.py +0 -0
  171. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/internal/prompt_category.py +0 -0
  172. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/internal/prompt_sizing.py +0 -0
  173. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/internal/simple.txt +0 -0
  174. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/internal/sizer.py +0 -0
  175. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/internal/social.py +0 -0
  176. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/mcp/state-transfer/agent_one.py +0 -0
  177. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/mcp/state-transfer/agent_two.py +0 -0
  178. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
  179. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
  180. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/prompting/__init__.py +0 -0
  181. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/prompting/agent.py +0 -0
  182. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/prompting/delimited_prompt.txt +0 -0
  183. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/prompting/fastagent.config.yaml +0 -0
  184. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/prompting/image_server.py +0 -0
  185. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/prompting/prompt1.txt +0 -0
  186. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/prompting/work_with_image.py +0 -0
  187. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/researcher/fastagent.config.yaml +0 -0
  188. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/researcher/researcher-eval.py +0 -0
  189. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/researcher/researcher-imp.py +0 -0
  190. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/researcher/researcher.py +0 -0
  191. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/workflows/chaining.py +0 -0
  192. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/workflows/evaluator.py +0 -0
  193. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/workflows/fastagent.config.yaml +0 -0
  194. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/workflows/human_input.py +0 -0
  195. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/workflows/orchestrator.py +0 -0
  196. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/workflows/parallel.py +0 -0
  197. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/workflows/router.py +0 -0
  198. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/workflows/short_story.txt +0 -0
  199. {fast_agent_mcp-0.2.27 → fast_agent_mcp-0.2.29}/src/mcp_agent/ui/console_display.py +0 -0
@@ -1,4 +1,4 @@
1
- s# Byte-compiled / optimized / DLL files
1
+ # Byte-compiled / optimized / DLL files
2
2
  __pycache__/
3
3
  *.py[cod]
4
4
  *$py.class
@@ -168,7 +168,7 @@ examples/mcp_root_test/test_data/*.png
168
168
  # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
169
169
  # and can be added to the global gitignore or merged into this file. For a more nuclear
170
170
  # option (not recommended) you can uncomment the following to ignore the entire idea folder.
171
- #.idea/
171
+ .idea/
172
172
  uv.lock
173
173
 
174
174
  # File generated from promptify script (to create an LLM-friendly prompt for the repo)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fast-agent-mcp
3
- Version: 0.2.27
3
+ Version: 0.2.29
4
4
  Summary: Define, Prompt and Test MCP enabled Agents and Workflows
5
5
  Author-email: Shaun Smith <fastagent@llmindset.co.uk>
6
6
  License: Apache License
@@ -213,14 +213,17 @@ Requires-Dist: a2a-types>=0.1.0
213
213
  Requires-Dist: aiohttp>=3.11.13
214
214
  Requires-Dist: anthropic>=0.49.0
215
215
  Requires-Dist: azure-identity>=1.14.0
216
+ Requires-Dist: deprecated>=1.2.18
216
217
  Requires-Dist: fastapi>=0.115.6
217
- Requires-Dist: mcp==1.9.1
218
+ Requires-Dist: google-genai
219
+ Requires-Dist: mcp==1.9.3
218
220
  Requires-Dist: openai>=1.63.2
219
221
  Requires-Dist: opentelemetry-distro>=0.50b0
220
222
  Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.29.0
221
- Requires-Dist: opentelemetry-instrumentation-anthropic>=0.39.3; python_version >= '3.10' and python_version < '4.0'
222
- Requires-Dist: opentelemetry-instrumentation-mcp>=0.40.3; python_version >= '3.10' and python_version < '4.0'
223
- Requires-Dist: opentelemetry-instrumentation-openai>=0.39.3; python_version >= '3.10' and python_version < '4.0'
223
+ Requires-Dist: opentelemetry-instrumentation-anthropic>=0.40.7; python_version >= '3.10' and python_version < '4.0'
224
+ Requires-Dist: opentelemetry-instrumentation-google-genai>=0.2b0
225
+ Requires-Dist: opentelemetry-instrumentation-mcp>=0.40.7; python_version >= '3.10' and python_version < '4.0'
226
+ Requires-Dist: opentelemetry-instrumentation-openai>=0.0.40.7; python_version >= '3.10' and python_version < '4.0'
224
227
  Requires-Dist: prompt-toolkit>=3.0.50
225
228
  Requires-Dist: pydantic-settings>=2.7.0
226
229
  Requires-Dist: pydantic>=2.10.4
@@ -284,11 +287,13 @@ Start by installing the [uv package manager](https://docs.astral.sh/uv/) for Pyt
284
287
 
285
288
  ```bash
286
289
  uv pip install fast-agent-mcp # install fast-agent!
287
-
288
- uv run fast-agent setup # create an example agent and config files
290
+ fast-agent go # start an interactive session
291
+ fast-agent go https://hf.co/mcp # with a remote MCP
292
+ fast-agent go --model=generic.qwen2.5 # use ollama qwen 2.5
293
+ fast-agent setup # create an example agent and config files
289
294
  uv run agent.py # run your first agent
290
295
  uv run agent.py --model=o3-mini.low # specify a model
291
- uv run fast-agent quickstart workflow # create "building effective agents" examples
296
+ fast-agent quickstart workflow # create "building effective agents" examples
292
297
  ```
293
298
 
294
299
  Other quickstart examples include a Researcher Agent (with Evaluator-Optimizer workflow) and Data Analysis Agent (similar to the ChatGPT experience), demonstrating MCP Roots support.
@@ -38,11 +38,13 @@ Start by installing the [uv package manager](https://docs.astral.sh/uv/) for Pyt
38
38
 
39
39
  ```bash
40
40
  uv pip install fast-agent-mcp # install fast-agent!
41
-
42
- uv run fast-agent setup # create an example agent and config files
41
+ fast-agent go # start an interactive session
42
+ fast-agent go https://hf.co/mcp # with a remote MCP
43
+ fast-agent go --model=generic.qwen2.5 # use ollama qwen 2.5
44
+ fast-agent setup # create an example agent and config files
43
45
  uv run agent.py # run your first agent
44
46
  uv run agent.py --model=o3-mini.low # specify a model
45
- uv run fast-agent quickstart workflow # create "building effective agents" examples
47
+ fast-agent quickstart workflow # create "building effective agents" examples
46
48
  ```
47
49
 
48
50
  Other quickstart examples include a Researcher Agent (with Evaluator-Optimizer workflow) and Data Analysis Agent (similar to the ChatGPT experience), demonstrating MCP Roots support.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fast-agent-mcp"
3
- version = "0.2.27"
3
+ version = "0.2.29"
4
4
  description = "Define, Prompt and Test MCP enabled Agents and Workflows"
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
@@ -15,7 +15,7 @@ classifiers = [
15
15
  requires-python = ">=3.10"
16
16
  dependencies = [
17
17
  "fastapi>=0.115.6",
18
- "mcp==1.9.1",
18
+ "mcp==1.9.3",
19
19
  "opentelemetry-distro>=0.50b0",
20
20
  "opentelemetry-exporter-otlp-proto-http>=1.29.0",
21
21
  "pydantic-settings>=2.7.0",
@@ -29,10 +29,14 @@ dependencies = [
29
29
  "prompt-toolkit>=3.0.50",
30
30
  "aiohttp>=3.11.13",
31
31
  "a2a-types>=0.1.0",
32
- "opentelemetry-instrumentation-openai>=0.39.3; python_version >= '3.10' and python_version < '4.0'",
33
- "opentelemetry-instrumentation-anthropic>=0.39.3; python_version >= '3.10' and python_version < '4.0'",
32
+ "opentelemetry-instrumentation-openai>=0.0.40.7; python_version >= '3.10' and python_version < '4.0'",
33
+ "opentelemetry-instrumentation-anthropic>=0.40.7; python_version >= '3.10' and python_version < '4.0'",
34
+ "opentelemetry-instrumentation-mcp>=0.40.7; python_version >= '3.10' and python_version < '4.0'",
35
+ "google-genai",
36
+ "opentelemetry-instrumentation-google-genai>=0.2b0",
34
37
  "tensorzero>=2025.4.7",
35
- "opentelemetry-instrumentation-mcp>=0.40.3; python_version >= '3.10' and python_version < '4.0'",
38
+ "opentelemetry-instrumentation-google-genai>=0.2b0",
39
+ "deprecated>=1.2.18",
36
40
  ]
37
41
 
38
42
  [project.optional-dependencies]
@@ -75,27 +75,11 @@ class Agent(BaseAgent):
75
75
  async def send_wrapper(message, agent_name):
76
76
  return await self.send(message)
77
77
 
78
- # Define wrapper for apply_prompt function
79
- async def apply_prompt_wrapper(prompt_name, args, agent_name):
80
- # Just apply the prompt directly
81
- return await self.apply_prompt(prompt_name, args)
82
-
83
- # Define wrapper for list_prompts function
84
- async def list_prompts_wrapper(agent_name):
85
- # Always call list_prompts on this agent regardless of agent_name
86
- return await self.list_prompts()
87
-
88
- # Define wrapper for list_resources function
89
- async def list_resources_wrapper(agent_name):
90
- # Always call list_resources on this agent regardless of agent_name
91
- return await self.list_resources()
92
-
93
78
  # Start the prompt loop with just this agent
94
79
  return await prompt.prompt_loop(
95
80
  send_func=send_wrapper,
96
81
  default_agent=agent_name_str,
97
82
  available_agents=[agent_name_str], # Only this agent
98
- apply_prompt_func=apply_prompt_wrapper,
99
- list_prompts_func=list_prompts_wrapper,
83
+ prompt_provider=self, # Pass self as the prompt provider since we implement the protocol
100
84
  default=default_prompt,
101
85
  )
@@ -456,6 +456,7 @@ class BaseAgent(MCPAggregator, AgentProtocol):
456
456
  self,
457
457
  prompt_name: str,
458
458
  arguments: Dict[str, str] | None = None,
459
+ agent_name: str | None = None,
459
460
  server_name: str | None = None,
460
461
  ) -> str:
461
462
  """
@@ -468,6 +469,7 @@ class BaseAgent(MCPAggregator, AgentProtocol):
468
469
  Args:
469
470
  prompt_name: The name of the prompt to apply
470
471
  arguments: Optional dictionary of string arguments to pass to the prompt template
472
+ agent_name: Optional agent name (ignored at this level, used by multi-agent apps)
471
473
  server_name: Optional name of the server to get the prompt from
472
474
 
473
475
  Returns:
@@ -119,7 +119,7 @@ class MCPApp:
119
119
  if self._initialized:
120
120
  return
121
121
 
122
- self._context = await initialize_context(self._config_or_path)
122
+ self._context = await initialize_context(self._config_or_path, store_globally=True)
123
123
 
124
124
  # Set the properties that were passed in the constructor
125
125
  self._context.human_input_handler = self._human_input_callback
@@ -8,6 +8,8 @@ import re
8
8
  from typing import Dict, List, Literal, Tuple
9
9
  from urllib.parse import urlparse
10
10
 
11
+ from mcp_agent.mcp.hf_auth import add_hf_auth_header
12
+
11
13
 
12
14
  def parse_server_url(
13
15
  url: str,
@@ -131,7 +133,11 @@ def parse_server_urls(
131
133
  result = []
132
134
  for url in url_list:
133
135
  server_name, transport_type, parsed_url = parse_server_url(url)
134
- result.append((server_name, transport_type, parsed_url, headers))
136
+
137
+ # Apply HuggingFace authentication if appropriate
138
+ final_headers = add_hf_auth_header(parsed_url, headers)
139
+
140
+ result.append((server_name, transport_type, parsed_url, final_headers))
135
141
 
136
142
  return result
137
143
 
@@ -291,6 +291,9 @@ class Settings(BaseSettings):
291
291
  Default model for agents. Format is provider.model_name.<reasoning_effort>, for example openai.o3-mini.low
292
292
  Aliases are provided for common models e.g. sonnet, haiku, gpt-4.1, o3-mini etc.
293
293
  """
294
+
295
+ auto_sampling: bool = True
296
+ """Enable automatic sampling model selection if not explicitly configured"""
294
297
 
295
298
  anthropic: AnthropicSettings | None = None
296
299
  """Settings for using Anthropic models in the fast-agent application"""
@@ -11,7 +11,9 @@ from mcp import ServerSession
11
11
  from opentelemetry import trace
12
12
  from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
13
13
  from opentelemetry.instrumentation.anthropic import AnthropicInstrumentor
14
- from opentelemetry.instrumentation.mcp import McpInstrumentor
14
+ from opentelemetry.instrumentation.google_genai import GoogleGenAiSdkInstrumentor
15
+
16
+ # from opentelemetry.instrumentation.mcp import McpInstrumentor
15
17
  from opentelemetry.instrumentation.openai import OpenAIInstrumentor
16
18
  from opentelemetry.propagate import set_global_textmap
17
19
  from opentelemetry.sdk.resources import Resource
@@ -112,7 +114,10 @@ async def configure_otel(config: "Settings") -> None:
112
114
  trace.set_tracer_provider(tracer_provider)
113
115
  AnthropicInstrumentor().instrument()
114
116
  OpenAIInstrumentor().instrument()
115
- McpInstrumentor().instrument()
117
+ GoogleGenAiSdkInstrumentor().instrument()
118
+
119
+
120
+ # McpInstrumentor().instrument()
116
121
 
117
122
 
118
123
  async def configure_logger(config: "Settings") -> None:
@@ -196,7 +201,6 @@ _global_context: Context | None = None
196
201
  def get_current_context() -> Context:
197
202
  """
198
203
  Synchronous initializer/getter for global application context.
199
- For async usage, use aget_current_context instead.
200
204
  """
201
205
  global _global_context
202
206
  if _global_context is None:
@@ -129,6 +129,12 @@ class AgentApp:
129
129
  Returns:
130
130
  Dictionary mapping server names to lists of available prompts
131
131
  """
132
+ if not agent_name:
133
+ results = {}
134
+ for agent in self._agents.values():
135
+ curr_prompts = await agent.list_prompts(server_name=server_name)
136
+ results.update(curr_prompts)
137
+ return results
132
138
  return await self._agent(agent_name).list_prompts(server_name=server_name)
133
139
 
134
140
  async def get_prompt(
@@ -262,7 +268,6 @@ class AgentApp:
262
268
  send_func=send_wrapper,
263
269
  default_agent=target_name, # Pass the agent name, not the agent object
264
270
  available_agents=list(self._agents.keys()),
265
- apply_prompt_func=self.apply_prompt,
266
- list_prompts_func=self.list_prompts,
271
+ prompt_provider=self, # Pass self as the prompt provider
267
272
  default=default_prompt,
268
273
  )
@@ -10,12 +10,13 @@ Usage:
10
10
  send_func=agent_app.send,
11
11
  default_agent="default_agent",
12
12
  available_agents=["agent1", "agent2"],
13
- apply_prompt_func=agent_app.apply_prompt
13
+ prompt_provider=agent_app
14
14
  )
15
15
  """
16
16
 
17
- from typing import Dict, List, Optional
17
+ from typing import Awaitable, Callable, Dict, List, Mapping, Optional, Protocol, Union
18
18
 
19
+ from mcp.types import Prompt, PromptMessage
19
20
  from rich import print as rich_print
20
21
  from rich.console import Console
21
22
  from rich.table import Table
@@ -28,8 +29,24 @@ from mcp_agent.core.enhanced_prompt import (
28
29
  handle_special_commands,
29
30
  )
30
31
  from mcp_agent.mcp.mcp_aggregator import SEP # Import SEP once at the top
32
+ from mcp_agent.mcp.prompt_message_multipart import PromptMessageMultipart
31
33
  from mcp_agent.progress_display import progress_display
32
34
 
35
+ # Type alias for the send function
36
+ SendFunc = Callable[[Union[str, PromptMessage, PromptMessageMultipart], str], Awaitable[str]]
37
+
38
+
39
+ class PromptProvider(Protocol):
40
+ """Protocol for objects that can provide prompt functionality."""
41
+
42
+ async def list_prompts(self, server_name: Optional[str] = None, agent_name: Optional[str] = None) -> Mapping[str, List[Prompt]]:
43
+ """List available prompts."""
44
+ ...
45
+
46
+ async def apply_prompt(self, prompt_name: str, arguments: Optional[Dict[str, str]] = None, agent_name: Optional[str] = None, **kwargs) -> str:
47
+ """Apply a prompt."""
48
+ ...
49
+
33
50
 
34
51
  class InteractivePrompt:
35
52
  """
@@ -48,22 +65,20 @@ class InteractivePrompt:
48
65
 
49
66
  async def prompt_loop(
50
67
  self,
51
- send_func,
68
+ send_func: SendFunc,
52
69
  default_agent: str,
53
70
  available_agents: List[str],
54
- apply_prompt_func=None,
55
- list_prompts_func=None,
71
+ prompt_provider: Optional[PromptProvider] = None,
56
72
  default: str = "",
57
73
  ) -> str:
58
74
  """
59
75
  Start an interactive prompt session.
60
76
 
61
77
  Args:
62
- send_func: Function to send messages to agents (signature: async (message, agent_name))
78
+ send_func: Function to send messages to agents
63
79
  default_agent: Name of the default agent to use
64
80
  available_agents: List of available agent names
65
- apply_prompt_func: Optional function to apply prompts (signature: async (name, args, agent))
66
- list_prompts_func: Optional function to list available prompts (signature: async (agent_name))
81
+ prompt_provider: Optional provider that implements list_prompts and apply_prompt
67
82
  default: Default message to use when user presses enter
68
83
 
69
84
  Returns:
@@ -110,13 +125,11 @@ class InteractivePrompt:
110
125
  rich_print(f"[red]Agent '{new_agent}' not found[/red]")
111
126
  continue
112
127
  # Keep the existing list_prompts handler for backward compatibility
113
- elif "list_prompts" in command_result and list_prompts_func:
114
- # Use the list_prompts_func directly
115
- await self._list_prompts(list_prompts_func, agent)
128
+ elif "list_prompts" in command_result and prompt_provider:
129
+ # Use the prompt_provider directly
130
+ await self._list_prompts(prompt_provider, agent)
116
131
  continue
117
- elif "select_prompt" in command_result and (
118
- list_prompts_func and apply_prompt_func
119
- ):
132
+ elif "select_prompt" in command_result and prompt_provider:
120
133
  # Handle prompt selection, using both list_prompts and apply_prompt
121
134
  prompt_name = command_result.get("prompt_name")
122
135
  prompt_index = command_result.get("prompt_index")
@@ -124,7 +137,7 @@ class InteractivePrompt:
124
137
  # If a specific index was provided (from /prompt <number>)
125
138
  if prompt_index is not None:
126
139
  # First get a list of all prompts to look up the index
127
- all_prompts = await self._get_all_prompts(list_prompts_func, agent)
140
+ all_prompts = await self._get_all_prompts(prompt_provider, agent)
128
141
  if not all_prompts:
129
142
  rich_print("[yellow]No prompts available[/yellow]")
130
143
  continue
@@ -135,8 +148,7 @@ class InteractivePrompt:
135
148
  selected_prompt = all_prompts[prompt_index - 1]
136
149
  # Use the already created namespaced_name to ensure consistency
137
150
  await self._select_prompt(
138
- list_prompts_func,
139
- apply_prompt_func,
151
+ prompt_provider,
140
152
  agent,
141
153
  selected_prompt["namespaced_name"],
142
154
  )
@@ -145,11 +157,11 @@ class InteractivePrompt:
145
157
  f"[red]Invalid prompt number: {prompt_index}. Valid range is 1-{len(all_prompts)}[/red]"
146
158
  )
147
159
  # Show the prompt list for convenience
148
- await self._list_prompts(list_prompts_func, agent)
160
+ await self._list_prompts(prompt_provider, agent)
149
161
  else:
150
162
  # Use the name-based selection
151
163
  await self._select_prompt(
152
- list_prompts_func, apply_prompt_func, agent, prompt_name
164
+ prompt_provider, agent, prompt_name
153
165
  )
154
166
  continue
155
167
 
@@ -171,21 +183,21 @@ class InteractivePrompt:
171
183
 
172
184
  return result
173
185
 
174
- async def _get_all_prompts(self, list_prompts_func, agent_name):
186
+ async def _get_all_prompts(self, prompt_provider: PromptProvider, agent_name: Optional[str] = None):
175
187
  """
176
188
  Get a list of all available prompts.
177
189
 
178
190
  Args:
179
- list_prompts_func: Function to get available prompts
180
- agent_name: Name of the agent
191
+ prompt_provider: Provider that implements list_prompts
192
+ agent_name: Optional agent name (for multi-agent apps)
181
193
 
182
194
  Returns:
183
195
  List of prompt info dictionaries, sorted by server and name
184
196
  """
185
197
  try:
186
- # Pass None instead of agent_name to get prompts from all servers
187
- # the agent_name parameter should never be used as a server name
188
- prompt_servers = await list_prompts_func(None)
198
+ # Call list_prompts on the provider
199
+ prompt_servers = await prompt_provider.list_prompts(server_name=None, agent_name=agent_name)
200
+
189
201
  all_prompts = []
190
202
 
191
203
  # Process the returned prompt servers
@@ -219,14 +231,18 @@ class InteractivePrompt:
219
231
  }
220
232
  )
221
233
  else:
234
+ # Handle Prompt objects from mcp.types
235
+ prompt_name = getattr(prompt, "name", str(prompt))
236
+ description = getattr(prompt, "description", "No description")
237
+ arguments = getattr(prompt, "arguments", [])
222
238
  all_prompts.append(
223
239
  {
224
240
  "server": server_name,
225
- "name": str(prompt),
226
- "namespaced_name": f"{server_name}{SEP}{str(prompt)}",
227
- "description": "No description",
228
- "arg_count": 0,
229
- "arguments": [],
241
+ "name": prompt_name,
242
+ "namespaced_name": f"{server_name}{SEP}{prompt_name}",
243
+ "description": description,
244
+ "arg_count": len(arguments),
245
+ "arguments": arguments,
230
246
  }
231
247
  )
232
248
 
@@ -244,27 +260,22 @@ class InteractivePrompt:
244
260
  rich_print(f"[dim]{traceback.format_exc()}[/dim]")
245
261
  return []
246
262
 
247
- async def _list_prompts(self, list_prompts_func, agent_name) -> None:
263
+ async def _list_prompts(self, prompt_provider: PromptProvider, agent_name: str) -> None:
248
264
  """
249
265
  List available prompts for an agent.
250
266
 
251
267
  Args:
252
- list_prompts_func: Function to get available prompts
268
+ prompt_provider: Provider that implements list_prompts
253
269
  agent_name: Name of the agent
254
270
  """
255
- from rich import print as rich_print
256
- from rich.console import Console
257
- from rich.table import Table
258
-
259
271
  console = Console()
260
272
 
261
273
  try:
262
274
  # Directly call the list_prompts function for this agent
263
275
  rich_print(f"\n[bold]Fetching prompts for agent [cyan]{agent_name}[/cyan]...[/bold]")
264
276
 
265
- # Get all prompts using the helper function - pass None as server name
266
- # to get prompts from all available servers
267
- all_prompts = await self._get_all_prompts(list_prompts_func, None)
277
+ # Get all prompts using the helper function
278
+ all_prompts = await self._get_all_prompts(prompt_provider, agent_name)
268
279
 
269
280
  if all_prompts:
270
281
  # Create a table for better display
@@ -300,28 +311,24 @@ class InteractivePrompt:
300
311
  rich_print(f"[dim]{traceback.format_exc()}[/dim]")
301
312
 
302
313
  async def _select_prompt(
303
- self, list_prompts_func, apply_prompt_func, agent_name, requested_name=None
314
+ self, prompt_provider: PromptProvider, agent_name: str, requested_name: Optional[str] = None
304
315
  ) -> None:
305
316
  """
306
317
  Select and apply a prompt.
307
318
 
308
319
  Args:
309
- list_prompts_func: Function to get available prompts
310
- apply_prompt_func: Function to apply prompts
320
+ prompt_provider: Provider that implements list_prompts and apply_prompt
311
321
  agent_name: Name of the agent
312
322
  requested_name: Optional name of the prompt to apply
313
323
  """
314
- # We already imported these at the top
315
- from rich import print as rich_print
316
-
317
324
  console = Console()
318
325
 
319
326
  try:
320
- # Get all available prompts directly from the list_prompts function
327
+ # Get all available prompts directly from the prompt provider
321
328
  rich_print(f"\n[bold]Fetching prompts for agent [cyan]{agent_name}[/cyan]...[/bold]")
322
- # IMPORTANT: list_prompts_func gets MCP server prompts, not agent prompts
323
- # So we pass None to get prompts from all servers, not using agent_name as server name
324
- prompt_servers = await list_prompts_func(None)
329
+
330
+ # Call list_prompts on the provider
331
+ prompt_servers = await prompt_provider.list_prompts(server_name=None, agent_name=agent_name)
325
332
 
326
333
  if not prompt_servers:
327
334
  rich_print("[yellow]No prompts available for this agent[/yellow]")
@@ -344,7 +351,7 @@ class InteractivePrompt:
344
351
  for prompt in prompts:
345
352
  # Get basic prompt info
346
353
  prompt_name = getattr(prompt, "name", "Unknown")
347
- description = getattr(prompt, "description", "No description")
354
+ prompt_description = getattr(prompt, "description", "No description")
348
355
 
349
356
  # Extract argument information
350
357
  arg_names = []
@@ -380,7 +387,7 @@ class InteractivePrompt:
380
387
  "server": server_name,
381
388
  "name": prompt_name,
382
389
  "namespaced_name": namespaced_name,
383
- "description": description,
390
+ "description": prompt_description,
384
391
  "arg_count": len(arg_names),
385
392
  "arg_names": arg_names,
386
393
  "required_args": required_args,
@@ -542,8 +549,8 @@ class InteractivePrompt:
542
549
  namespaced_name = selected_prompt["namespaced_name"]
543
550
  rich_print(f"\n[bold]Applying prompt [cyan]{namespaced_name}[/cyan]...[/bold]")
544
551
 
545
- # Call apply_prompt function with the prompt name and arguments
546
- await apply_prompt_func(namespaced_name, arg_values, agent_name)
552
+ # Call apply_prompt on the provider with the prompt name and arguments
553
+ await prompt_provider.apply_prompt(namespaced_name, arg_values, agent_name)
547
554
 
548
555
  except Exception as e:
549
556
  import traceback
@@ -0,0 +1,42 @@
1
+ import asyncio
2
+ from typing import Any, List, Optional, Union
3
+
4
+ from mcp_agent.llm.augmented_llm import (
5
+ MessageParamT,
6
+ RequestParams,
7
+ )
8
+ from mcp_agent.llm.augmented_llm_passthrough import PassthroughLLM
9
+ from mcp_agent.llm.provider_types import Provider
10
+ from mcp_agent.mcp.prompt_message_multipart import PromptMessageMultipart
11
+
12
+
13
+ class SlowLLM(PassthroughLLM):
14
+ """
15
+ A specialized LLM implementation that sleeps for 3 seconds before responding like PassthroughLLM.
16
+
17
+ This is useful for testing scenarios where you want to simulate slow responses
18
+ or for debugging timing-related issues in parallel workflows.
19
+ """
20
+
21
+ def __init__(
22
+ self, provider=Provider.FAST_AGENT, name: str = "Slow", **kwargs: dict[str, Any]
23
+ ) -> None:
24
+ super().__init__(name=name, provider=provider, **kwargs)
25
+
26
+ async def generate_str(
27
+ self,
28
+ message: Union[str, MessageParamT, List[MessageParamT]],
29
+ request_params: Optional[RequestParams] = None,
30
+ ) -> str:
31
+ """Sleep for 3 seconds then return the input message as a string."""
32
+ await asyncio.sleep(3)
33
+ return await super().generate_str(message, request_params)
34
+
35
+ async def _apply_prompt_provider_specific(
36
+ self,
37
+ multipart_messages: List["PromptMessageMultipart"],
38
+ request_params: RequestParams | None = None,
39
+ ) -> PromptMessageMultipart:
40
+ """Sleep for 3 seconds then apply prompt like PassthroughLLM."""
41
+ await asyncio.sleep(3)
42
+ return await super()._apply_prompt_provider_specific(multipart_messages, request_params)