fast-agent-mcp 0.1.10__tar.gz → 0.1.12__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 (167) hide show
  1. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/PKG-INFO +36 -38
  2. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/README.md +34 -36
  3. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/pyproject.toml +2 -2
  4. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/agents/agent.py +1 -24
  5. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/app.py +0 -5
  6. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/config.py +9 -0
  7. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/context.py +0 -2
  8. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/core/agent_app.py +29 -0
  9. fast_agent_mcp-0.1.12/src/mcp_agent/core/agent_types.py +43 -0
  10. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/core/decorators.py +1 -2
  11. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/core/error_handling.py +1 -1
  12. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/core/factory.py +2 -3
  13. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/core/mcp_content.py +2 -3
  14. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/core/proxies.py +3 -0
  15. fast_agent_mcp-0.1.12/src/mcp_agent/core/request_params.py +43 -0
  16. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/core/types.py +4 -2
  17. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/core/validation.py +14 -15
  18. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/logging/transport.py +2 -2
  19. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp/gen_client.py +4 -4
  20. fast_agent_mcp-0.1.12/src/mcp_agent/mcp/interfaces.py +186 -0
  21. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp/mcp_agent_client_session.py +10 -2
  22. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp/mcp_aggregator.py +12 -3
  23. fast_agent_mcp-0.1.12/src/mcp_agent/mcp/sampling.py +140 -0
  24. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp/stdio.py +1 -2
  25. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp_server/__init__.py +1 -1
  26. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/internal/agent.py +1 -1
  27. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/internal/fastagent.config.yaml +3 -0
  28. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/prompting/__init__.py +1 -1
  29. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/ui/console_display.py +2 -2
  30. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/evaluator_optimizer/evaluator_optimizer.py +2 -2
  31. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/llm/augmented_llm.py +42 -102
  32. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/llm/augmented_llm_anthropic.py +4 -3
  33. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/llm/augmented_llm_openai.py +4 -3
  34. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/llm/augmented_llm_passthrough.py +119 -37
  35. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/llm/model_factory.py +1 -1
  36. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/llm/prompt_utils.py +42 -28
  37. fast_agent_mcp-0.1.12/src/mcp_agent/workflows/llm/providers/multipart_converter_anthropic.py +452 -0
  38. fast_agent_mcp-0.1.12/src/mcp_agent/workflows/llm/providers/multipart_converter_openai.py +471 -0
  39. fast_agent_mcp-0.1.12/src/mcp_agent/workflows/llm/providers/sampling_converter_anthropic.py +59 -0
  40. fast_agent_mcp-0.1.12/src/mcp_agent/workflows/llm/providers/sampling_converter_openai.py +31 -0
  41. fast_agent_mcp-0.1.12/src/mcp_agent/workflows/llm/sampling_converter.py +124 -0
  42. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/llm/sampling_format_converter.py +0 -17
  43. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/router/router_base.py +10 -10
  44. fast_agent_mcp-0.1.10/src/mcp_agent/core/agent_types.py +0 -16
  45. fast_agent_mcp-0.1.10/src/mcp_agent/workflows/llm/llm_selector.py +0 -345
  46. fast_agent_mcp-0.1.10/src/mcp_agent/workflows/llm/providers/multipart_converter_anthropic.py +0 -348
  47. fast_agent_mcp-0.1.10/src/mcp_agent/workflows/llm/providers/multipart_converter_openai.py +0 -426
  48. fast_agent_mcp-0.1.10/src/mcp_agent/workflows/llm/providers/sampling_converter_anthropic.py +0 -258
  49. fast_agent_mcp-0.1.10/src/mcp_agent/workflows/llm/providers/sampling_converter_openai.py +0 -229
  50. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/.gitignore +0 -0
  51. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/LICENSE +0 -0
  52. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/__init__.py +0 -0
  53. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/agents/__init__.py +0 -0
  54. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/cli/__init__.py +0 -0
  55. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/cli/__main__.py +0 -0
  56. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/cli/commands/bootstrap.py +0 -0
  57. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/cli/commands/config.py +0 -0
  58. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/cli/commands/setup.py +0 -0
  59. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/cli/main.py +0 -0
  60. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/cli/terminal.py +0 -0
  61. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/console.py +0 -0
  62. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/context_dependent.py +0 -0
  63. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/core/__init__.py +0 -0
  64. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/core/agent_utils.py +0 -0
  65. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/core/enhanced_prompt.py +0 -0
  66. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/core/exceptions.py +0 -0
  67. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/core/fastagent.py +0 -0
  68. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/core/prompt.py +0 -0
  69. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/eval/__init__.py +0 -0
  70. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/event_progress.py +0 -0
  71. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/executor/__init__.py +0 -0
  72. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/executor/decorator_registry.py +0 -0
  73. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/executor/executor.py +0 -0
  74. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/executor/task_registry.py +0 -0
  75. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/executor/temporal.py +0 -0
  76. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/executor/workflow.py +0 -0
  77. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/executor/workflow_signal.py +0 -0
  78. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/human_input/__init__.py +0 -0
  79. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/human_input/handler.py +0 -0
  80. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/human_input/types.py +0 -0
  81. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/logging/__init__.py +0 -0
  82. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/logging/events.py +0 -0
  83. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/logging/json_serializer.py +0 -0
  84. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/logging/listeners.py +0 -0
  85. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/logging/logger.py +0 -0
  86. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/logging/rich_progress.py +0 -0
  87. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/logging/tracing.py +0 -0
  88. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp/__init__.py +0 -0
  89. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp/mcp_activity.py +0 -0
  90. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp/mcp_agent_server.py +0 -0
  91. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp/mcp_connection_manager.py +0 -0
  92. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp/mime_utils.py +0 -0
  93. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp/prompt_message_multipart.py +0 -0
  94. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp/prompt_serialization.py +0 -0
  95. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp/prompts/__init__.py +0 -0
  96. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp/prompts/__main__.py +0 -0
  97. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp/prompts/prompt_server.py +0 -0
  98. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp/prompts/prompt_template.py +0 -0
  99. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp/resource_utils.py +0 -0
  100. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp_server/agent_server.py +0 -0
  101. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/mcp_server_registry.py +0 -0
  102. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/progress_display.py +0 -0
  103. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/data-analysis/analysis-campaign.py +0 -0
  104. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/data-analysis/analysis.py +0 -0
  105. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/data-analysis/fastagent.config.yaml +0 -0
  106. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
  107. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/internal/job.py +0 -0
  108. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/internal/prompt_category.py +0 -0
  109. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/internal/prompt_sizing.py +0 -0
  110. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/internal/sizer.py +0 -0
  111. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/internal/social.py +0 -0
  112. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/mcp_researcher/researcher-eval.py +0 -0
  113. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/prompting/agent.py +0 -0
  114. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/prompting/fastagent.config.yaml +0 -0
  115. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/prompting/image_server.py +0 -0
  116. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/researcher/fastagent.config.yaml +0 -0
  117. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/researcher/researcher-eval.py +0 -0
  118. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/researcher/researcher-imp.py +0 -0
  119. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/researcher/researcher.py +0 -0
  120. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/workflows/agent_build.py +0 -0
  121. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/workflows/chaining.py +0 -0
  122. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/workflows/evaluator.py +0 -0
  123. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/workflows/fastagent.config.yaml +0 -0
  124. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/workflows/human_input.py +0 -0
  125. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/workflows/orchestrator.py +0 -0
  126. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/workflows/parallel.py +0 -0
  127. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/workflows/router.py +0 -0
  128. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/resources/examples/workflows/sse.py +0 -0
  129. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/telemetry/__init__.py +0 -0
  130. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/telemetry/usage_tracking.py +0 -0
  131. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/__init__.py +0 -0
  132. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/embedding/__init__.py +0 -0
  133. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/embedding/embedding_base.py +0 -0
  134. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/embedding/embedding_cohere.py +0 -0
  135. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/embedding/embedding_openai.py +0 -0
  136. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/evaluator_optimizer/__init__.py +0 -0
  137. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/intent_classifier/__init__.py +0 -0
  138. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/intent_classifier/intent_classifier_base.py +0 -0
  139. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/intent_classifier/intent_classifier_embedding.py +0 -0
  140. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/intent_classifier/intent_classifier_embedding_cohere.py +0 -0
  141. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/intent_classifier/intent_classifier_embedding_openai.py +0 -0
  142. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/intent_classifier/intent_classifier_llm.py +0 -0
  143. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/intent_classifier/intent_classifier_llm_anthropic.py +0 -0
  144. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/intent_classifier/intent_classifier_llm_openai.py +0 -0
  145. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/llm/__init__.py +0 -0
  146. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/llm/anthropic_utils.py +0 -0
  147. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/llm/augmented_llm_playback.py +0 -0
  148. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/llm/openai_utils.py +0 -0
  149. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/llm/providers/__init__.py +0 -0
  150. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/llm/providers/openai_multipart.py +0 -0
  151. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/orchestrator/__init__.py +0 -0
  152. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/orchestrator/orchestrator.py +0 -0
  153. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/orchestrator/orchestrator_models.py +0 -0
  154. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/orchestrator/orchestrator_prompts.py +0 -0
  155. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/parallel/__init__.py +0 -0
  156. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/parallel/fan_in.py +0 -0
  157. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/parallel/fan_out.py +0 -0
  158. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/parallel/parallel_llm.py +0 -0
  159. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/router/__init__.py +0 -0
  160. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/router/router_embedding.py +0 -0
  161. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/router/router_embedding_cohere.py +0 -0
  162. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/router/router_embedding_openai.py +0 -0
  163. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/router/router_llm.py +0 -0
  164. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/swarm/__init__.py +0 -0
  165. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/swarm/swarm.py +0 -0
  166. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/swarm/swarm_anthropic.py +0 -0
  167. {fast_agent_mcp-0.1.10 → fast_agent_mcp-0.1.12}/src/mcp_agent/workflows/swarm/swarm_openai.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fast-agent-mcp
3
- Version: 0.1.10
3
+ Version: 0.1.12
4
4
  Summary: Define, Prompt and Test MCP enabled Agents and Workflows
5
5
  Author-email: Shaun Smith <fastagent@llmindset.co.uk>, Sarmad Qadri <sarmad@lastmileai.dev>
6
6
  License: Apache License
@@ -212,7 +212,7 @@ Requires-Python: >=3.10
212
212
  Requires-Dist: aiohttp>=3.11.13
213
213
  Requires-Dist: anthropic>=0.49.0
214
214
  Requires-Dist: fastapi>=0.115.6
215
- Requires-Dist: mcp>=1.4.1
215
+ Requires-Dist: mcp>=1.5.0
216
216
  Requires-Dist: numpy>=2.2.1
217
217
  Requires-Dist: openai>=1.63.2
218
218
  Requires-Dist: opentelemetry-distro>=0.50b0
@@ -241,10 +241,9 @@ Provides-Extra: temporal
241
241
  Requires-Dist: temporalio>=1.8.0; extra == 'temporal'
242
242
  Description-Content-Type: text/markdown
243
243
 
244
- ## fast-agent
245
-
246
244
  <p align="center">
247
245
  <a href="https://pypi.org/project/fast-agent-mcp/"><img src="https://img.shields.io/pypi/v/fast-agent-mcp?color=%2334D058&label=pypi" /></a>
246
+ <a href="#"><img src="https://github.com/evalstate/fast-agent/actions/workflows/main-checks.yml/badge.svg" /></a>
248
247
  <a href="https://github.com/evalstate/fast-agent/issues"><img src="https://img.shields.io/github/issues-raw/evalstate/fast-agent" /></a>
249
248
  <a href="https://lmai.link/discord/mcp-agent"><img src="https://shields.io/discord/1089284610329952357" alt="discord" /></a>
250
249
  <img alt="Pepy Total Downloads" src="https://img.shields.io/pepy/dt/fast-agent-mcp?label=pypi%20%7C%20downloads"/>
@@ -253,16 +252,14 @@ Description-Content-Type: text/markdown
253
252
 
254
253
  ## Overview
255
254
 
256
- **`fast-agent`** enables you to create and interact with sophisticated Agents and Workflows in minutes.
255
+ **`fast-agent`** enables you to create and interact with sophisticated Agents and Workflows in minutes. It is the first framework with complete, end-to-end tested MCP Feature support including Sampling. Both Anthropic (Haiku, Sonnet, Opus) and OpenAI models (gpt-4o family, o1/o3 family) are supported.
257
256
 
258
257
  The simple declarative syntax lets you concentrate on composing your Prompts and MCP Servers to [build effective agents](https://www.anthropic.com/research/building-effective-agents).
259
258
 
260
- Evaluate how different models handle Agent and MCP Server calling tasks, then build multi-model workflows using the best provider for each task.
261
-
262
- `fast-agent` is now multi-modal, supporting Images and PDFs for both Anthropic and OpenAI endpoints (for supported models), via Prompts, Resources and MCP Tool Call results.
259
+ `fast-agent` is multi-modal, supporting Images and PDFs for both Anthropic and OpenAI endpoints via Prompts, Resources and MCP Tool Call results. The inclusion of passthrough and playback LLMs enable rapid development and test of Python glue-code for your applications.
263
260
 
264
261
  > [!TIP]
265
- > `fast-agent` is now MCP Native! Coming Soon - Full Documentation Site.
262
+ > `fast-agent` is now MCP Native! Coming Soon - Full Documentation Site and Further MCP Examples.
266
263
 
267
264
  ### Agent Application Development
268
265
 
@@ -272,7 +269,7 @@ Chat with individual Agents and Components before, during and after workflow exe
272
269
 
273
270
  Simple model selection makes testing Model <-> MCP Server interaction painless. You can read more about the motivation behind this project [here](https://llmindset.co.uk/resources/fast-agent/)
274
271
 
275
- ![fast-agent](https://github.com/user-attachments/assets/3e692103-bf97-489a-b519-2d0fee036369)
272
+ ![2025-03-23-fast-agent](https://github.com/user-attachments/assets/8f6dbb69-43e3-4633-8e12-5572e9614728)
276
273
 
277
274
  ## Get started:
278
275
 
@@ -597,6 +594,14 @@ agent["greeter"].send("Good Evening!") # Dictionary access is supported
597
594
 
598
595
  Add Resources to prompts using either the inbuilt `prompt-server` or MCP Types directly. Convenience class are made available to do so simply, for example:
599
596
 
597
+ ```python
598
+ summary: str = await agent.with_resource(
599
+ "Summarise this PDF please",
600
+ "mcp_server",
601
+ "resource://fast-agent/sample.pdf",
602
+ )
603
+ ```
604
+
600
605
  #### MCP Tool Result Conversion
601
606
 
602
607
  LLM APIs have restrictions on the content types that can be returned as Tool Calls/Function results via their Chat Completions API's:
@@ -612,40 +617,33 @@ MCP Prompts are supported with `apply_prompt(name,arguments)`, which always retu
612
617
 
613
618
  Prompts can also be applied interactively through the interactive interface by using the `/prompt` command.
614
619
 
620
+ ### Sampling
621
+
622
+ Sampling LLMs are configured per Client/Server pair. Specify the model name in fastagent.config.yaml as follows:
623
+
624
+ ```yaml
625
+ mcp:
626
+ servers:
627
+ sampling_resource:
628
+ command: "uv"
629
+ args: ["run", "sampling_resource_server.py"]
630
+ sampling:
631
+ model: "haiku"
632
+ ```
633
+
615
634
  ### Secrets File
616
635
 
617
636
  > [!TIP]
618
637
  > fast-agent will look recursively for a fastagent.secrets.yaml file, so you only need to manage this at the root folder of your agent definitions.
619
638
 
639
+ ### Interactive Shell
640
+
641
+ ![fast-agent](https://github.com/user-attachments/assets/3e692103-bf97-489a-b519-2d0fee036369)
642
+
620
643
  ## Project Notes
621
644
 
622
645
  `fast-agent` builds on the [`mcp-agent`](https://github.com/lastmile-ai/mcp-agent) project by Sarmad Qadri.
623
646
 
624
- ### llmindset.co.uk fork:
625
-
626
- - Addition of MCP Prompts including Prompt Server and agent save/replay ability.
627
- - Overhaul of Eval/Opt for Conversation Management
628
- - Removed instructor/double-llm calling - native structured outputs for OAI.
629
- - Improved handling of Parallel/Fan-In and respose option
630
- - XML based generated prompts
631
- - "FastAgent" style prototyping, with per-agent models
632
- - API keys through Environment Variables
633
- - Warm-up / Post-Workflow Agent Interactions
634
- - Quick Setup
635
- - Interactive Prompt Mode
636
- - Simple Model Selection with aliases
637
- - User/Assistant and Tool Call message display
638
- - MCP Sever Environment Variable support
639
- - MCP Roots support
640
- - Comprehensive Progress display
641
- - JSONL file logging with secret revokation
642
- - OpenAI o1/o3-mini support with reasoning level
643
- - Enhanced Human Input Messaging and Handling
644
- - Declarative workflows
645
- - Numerous defect fixes
646
-
647
- ### Features to add (Commmitted)
648
-
649
- - Run Agent as MCP Server, with interop
650
- - Multi-part content types supporing Vision, PDF and multi-part Text.
651
- - Improved test automation (supported by prompt_server.py and augmented_llm_playback.py)
647
+ ### Contributing
648
+
649
+ Contributions and PRs are welcome - feel free to raise issues to discuss. Full guidelines for contributing and roadmap coming very soon. Get in touch!
@@ -1,7 +1,6 @@
1
- ## fast-agent
2
-
3
1
  <p align="center">
4
2
  <a href="https://pypi.org/project/fast-agent-mcp/"><img src="https://img.shields.io/pypi/v/fast-agent-mcp?color=%2334D058&label=pypi" /></a>
3
+ <a href="#"><img src="https://github.com/evalstate/fast-agent/actions/workflows/main-checks.yml/badge.svg" /></a>
5
4
  <a href="https://github.com/evalstate/fast-agent/issues"><img src="https://img.shields.io/github/issues-raw/evalstate/fast-agent" /></a>
6
5
  <a href="https://lmai.link/discord/mcp-agent"><img src="https://shields.io/discord/1089284610329952357" alt="discord" /></a>
7
6
  <img alt="Pepy Total Downloads" src="https://img.shields.io/pepy/dt/fast-agent-mcp?label=pypi%20%7C%20downloads"/>
@@ -10,16 +9,14 @@
10
9
 
11
10
  ## Overview
12
11
 
13
- **`fast-agent`** enables you to create and interact with sophisticated Agents and Workflows in minutes.
12
+ **`fast-agent`** enables you to create and interact with sophisticated Agents and Workflows in minutes. It is the first framework with complete, end-to-end tested MCP Feature support including Sampling. Both Anthropic (Haiku, Sonnet, Opus) and OpenAI models (gpt-4o family, o1/o3 family) are supported.
14
13
 
15
14
  The simple declarative syntax lets you concentrate on composing your Prompts and MCP Servers to [build effective agents](https://www.anthropic.com/research/building-effective-agents).
16
15
 
17
- Evaluate how different models handle Agent and MCP Server calling tasks, then build multi-model workflows using the best provider for each task.
18
-
19
- `fast-agent` is now multi-modal, supporting Images and PDFs for both Anthropic and OpenAI endpoints (for supported models), via Prompts, Resources and MCP Tool Call results.
16
+ `fast-agent` is multi-modal, supporting Images and PDFs for both Anthropic and OpenAI endpoints via Prompts, Resources and MCP Tool Call results. The inclusion of passthrough and playback LLMs enable rapid development and test of Python glue-code for your applications.
20
17
 
21
18
  > [!TIP]
22
- > `fast-agent` is now MCP Native! Coming Soon - Full Documentation Site.
19
+ > `fast-agent` is now MCP Native! Coming Soon - Full Documentation Site and Further MCP Examples.
23
20
 
24
21
  ### Agent Application Development
25
22
 
@@ -29,7 +26,7 @@ Chat with individual Agents and Components before, during and after workflow exe
29
26
 
30
27
  Simple model selection makes testing Model <-> MCP Server interaction painless. You can read more about the motivation behind this project [here](https://llmindset.co.uk/resources/fast-agent/)
31
28
 
32
- ![fast-agent](https://github.com/user-attachments/assets/3e692103-bf97-489a-b519-2d0fee036369)
29
+ ![2025-03-23-fast-agent](https://github.com/user-attachments/assets/8f6dbb69-43e3-4633-8e12-5572e9614728)
33
30
 
34
31
  ## Get started:
35
32
 
@@ -354,6 +351,14 @@ agent["greeter"].send("Good Evening!") # Dictionary access is supported
354
351
 
355
352
  Add Resources to prompts using either the inbuilt `prompt-server` or MCP Types directly. Convenience class are made available to do so simply, for example:
356
353
 
354
+ ```python
355
+ summary: str = await agent.with_resource(
356
+ "Summarise this PDF please",
357
+ "mcp_server",
358
+ "resource://fast-agent/sample.pdf",
359
+ )
360
+ ```
361
+
357
362
  #### MCP Tool Result Conversion
358
363
 
359
364
  LLM APIs have restrictions on the content types that can be returned as Tool Calls/Function results via their Chat Completions API's:
@@ -369,40 +374,33 @@ MCP Prompts are supported with `apply_prompt(name,arguments)`, which always retu
369
374
 
370
375
  Prompts can also be applied interactively through the interactive interface by using the `/prompt` command.
371
376
 
377
+ ### Sampling
378
+
379
+ Sampling LLMs are configured per Client/Server pair. Specify the model name in fastagent.config.yaml as follows:
380
+
381
+ ```yaml
382
+ mcp:
383
+ servers:
384
+ sampling_resource:
385
+ command: "uv"
386
+ args: ["run", "sampling_resource_server.py"]
387
+ sampling:
388
+ model: "haiku"
389
+ ```
390
+
372
391
  ### Secrets File
373
392
 
374
393
  > [!TIP]
375
394
  > fast-agent will look recursively for a fastagent.secrets.yaml file, so you only need to manage this at the root folder of your agent definitions.
376
395
 
396
+ ### Interactive Shell
397
+
398
+ ![fast-agent](https://github.com/user-attachments/assets/3e692103-bf97-489a-b519-2d0fee036369)
399
+
377
400
  ## Project Notes
378
401
 
379
402
  `fast-agent` builds on the [`mcp-agent`](https://github.com/lastmile-ai/mcp-agent) project by Sarmad Qadri.
380
403
 
381
- ### llmindset.co.uk fork:
382
-
383
- - Addition of MCP Prompts including Prompt Server and agent save/replay ability.
384
- - Overhaul of Eval/Opt for Conversation Management
385
- - Removed instructor/double-llm calling - native structured outputs for OAI.
386
- - Improved handling of Parallel/Fan-In and respose option
387
- - XML based generated prompts
388
- - "FastAgent" style prototyping, with per-agent models
389
- - API keys through Environment Variables
390
- - Warm-up / Post-Workflow Agent Interactions
391
- - Quick Setup
392
- - Interactive Prompt Mode
393
- - Simple Model Selection with aliases
394
- - User/Assistant and Tool Call message display
395
- - MCP Sever Environment Variable support
396
- - MCP Roots support
397
- - Comprehensive Progress display
398
- - JSONL file logging with secret revokation
399
- - OpenAI o1/o3-mini support with reasoning level
400
- - Enhanced Human Input Messaging and Handling
401
- - Declarative workflows
402
- - Numerous defect fixes
403
-
404
- ### Features to add (Commmitted)
405
-
406
- - Run Agent as MCP Server, with interop
407
- - Multi-part content types supporing Vision, PDF and multi-part Text.
408
- - Improved test automation (supported by prompt_server.py and augmented_llm_playback.py)
404
+ ### Contributing
405
+
406
+ Contributions and PRs are welcome - feel free to raise issues to discuss. Full guidelines for contributing and roadmap coming very soon. Get in touch!
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fast-agent-mcp"
3
- version = "0.1.10"
3
+ version = "0.1.12"
4
4
  description = "Define, Prompt and Test MCP enabled Agents and Workflows"
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
@@ -16,7 +16,7 @@ classifiers = [
16
16
  requires-python = ">=3.10"
17
17
  dependencies = [
18
18
  "fastapi>=0.115.6",
19
- "mcp>=1.4.1",
19
+ "mcp>=1.5.0",
20
20
  "opentelemetry-distro>=0.50b0",
21
21
  "opentelemetry-exporter-otlp-proto-http>=1.29.0",
22
22
  "pydantic-settings>=2.7.0",
@@ -1,6 +1,5 @@
1
1
  import asyncio
2
2
  import uuid
3
- from dataclasses import dataclass
4
3
  from typing import Callable, Dict, List, Optional, TypeVar, Union, TYPE_CHECKING
5
4
 
6
5
  from mcp.server.fastmcp.tools import Tool as FastTool
@@ -16,7 +15,7 @@ from mcp_agent.mcp.prompt_message_multipart import PromptMessageMultipart
16
15
 
17
16
  from mcp_agent.core.exceptions import PromptExitError
18
17
  from mcp_agent.mcp.mcp_aggregator import MCPAggregator
19
- from mcp_agent.workflows.llm.augmented_llm import RequestParams
18
+ from mcp_agent.core.agent_types import AgentConfig
20
19
  from mcp_agent.human_input.types import (
21
20
  HumanInputCallback,
22
21
  HumanInputRequest,
@@ -38,28 +37,6 @@ LLM = TypeVar("LLM", bound=AugmentedLLM)
38
37
  HUMAN_INPUT_TOOL_NAME = "__human_input__"
39
38
 
40
39
 
41
- @dataclass
42
- class AgentConfig:
43
- """Configuration for an Agent instance"""
44
-
45
- name: str
46
- instruction: Union[str, Callable[[Dict], str]]
47
- servers: List[str]
48
- model: Optional[str] = None
49
- use_history: bool = True
50
- default_request_params: Optional[RequestParams] = None
51
- human_input: bool = False
52
-
53
- def __post_init__(self):
54
- """Ensure default_request_params exists with proper history setting"""
55
-
56
- if self.default_request_params is None:
57
- self.default_request_params = RequestParams(use_history=self.use_history)
58
- else:
59
- # Override the request params history setting if explicitly configured
60
- self.default_request_params.use_history = self.use_history
61
-
62
-
63
40
  class Agent(MCPAggregator):
64
41
  """
65
42
  An Agent is an entity that has access to a set of MCP servers and can interact with them.
@@ -11,7 +11,6 @@ from mcp_agent.logging.logger import get_logger
11
11
  from mcp_agent.executor.workflow_signal import SignalWaitCallback
12
12
  from mcp_agent.human_input.types import HumanInputCallback
13
13
  from mcp_agent.human_input.handler import console_input_callback
14
- from mcp_agent.workflows.llm.llm_selector import ModelSelector
15
14
 
16
15
  R = TypeVar("R")
17
16
 
@@ -44,7 +43,6 @@ class MCPApp:
44
43
  human_input_callback: Optional[HumanInputCallback] = console_input_callback,
45
44
  signal_notification: Optional[SignalWaitCallback] = None,
46
45
  upstream_session: Optional["ServerSession"] = None,
47
- model_selector: ModelSelector = None,
48
46
  ):
49
47
  """
50
48
  Initialize the application with a name and optional settings.
@@ -55,7 +53,6 @@ class MCPApp:
55
53
  human_input_callback: Callback for handling human input
56
54
  signal_notification: Callback for getting notified on workflow signals/events.
57
55
  upstream_session: Optional upstream session if the MCPApp is running as a server to an MCP client.
58
- initialize_model_selector: Initializes the built-in ModelSelector to help with model selection. Defaults to False.
59
56
  """
60
57
  self.name = name
61
58
 
@@ -64,7 +61,6 @@ class MCPApp:
64
61
  self._human_input_callback = human_input_callback
65
62
  self._signal_notification = signal_notification
66
63
  self._upstream_session = upstream_session
67
- self._model_selector = model_selector
68
64
 
69
65
  self._workflows: Dict[str, Type] = {} # id to workflow class
70
66
  self._logger = None
@@ -128,7 +124,6 @@ class MCPApp:
128
124
  self._context.human_input_handler = self._human_input_callback
129
125
  self._context.signal_notification = self._signal_notification
130
126
  self._context.upstream_session = self._upstream_session
131
- self._context.model_selector = self._model_selector
132
127
 
133
128
  self._initialized = True
134
129
  self.logger.info(
@@ -18,6 +18,12 @@ class MCPServerAuthSettings(BaseModel):
18
18
  model_config = ConfigDict(extra="allow", arbitrary_types_allowed=True)
19
19
 
20
20
 
21
+ class MCPSamplingSettings(BaseModel):
22
+ model: str = "haiku"
23
+
24
+ model_config = ConfigDict(extra="allow", arbitrary_types_allowed=True)
25
+
26
+
21
27
  class MCPRootSettings(BaseModel):
22
28
  """Represents a root directory configuration for an MCP server."""
23
29
 
@@ -81,6 +87,9 @@ class MCPServerSettings(BaseModel):
81
87
  env: Dict[str, str] | None = None
82
88
  """Environment variables to pass to the server process."""
83
89
 
90
+ sampling: MCPSamplingSettings | None = None
91
+ """Sampling settings for this Client/Server pair"""
92
+
84
93
 
85
94
  class MCPSettings(BaseModel):
86
95
  """Configuration for all MCP servers."""
@@ -32,7 +32,6 @@ from mcp_agent.logging.events import EventFilter
32
32
  from mcp_agent.logging.logger import LoggingConfig
33
33
  from mcp_agent.logging.transport import create_transport
34
34
  from mcp_agent.mcp_server_registry import ServerRegistry
35
- from mcp_agent.workflows.llm.llm_selector import ModelSelector
36
35
  from mcp_agent.logging.logger import get_logger
37
36
 
38
37
 
@@ -58,7 +57,6 @@ class Context(BaseModel):
58
57
  human_input_handler: Optional[HumanInputCallback] = None
59
58
  signal_notification: Optional[SignalWaitCallback] = None
60
59
  upstream_session: Optional[ServerSession] = None # TODO: saqadri - figure this out
61
- model_selector: Optional[ModelSelector] = None
62
60
 
63
61
  # Registries
64
62
  server_registry: Optional[ServerRegistry] = None
@@ -113,6 +113,35 @@ class AgentApp:
113
113
  proxy = self._agents[target]
114
114
  return await proxy.apply_prompt(prompt_name, arguments)
115
115
 
116
+ async def with_resource(
117
+ self,
118
+ prompt_content: Union[str, PromptMessageMultipart],
119
+ server_name: str,
120
+ resource_name: str,
121
+ agent_name: Optional[str] = None,
122
+ ) -> str:
123
+ """
124
+ Create a prompt with the given content and resource, then send it to the agent.
125
+
126
+ Args:
127
+ prompt_content: Either a string message or an existing PromptMessageMultipart
128
+ server_name: Name of the MCP server to retrieve the resource from
129
+ resource_name: Name or URI of the resource to retrieve
130
+ agent_name: The name of the agent to use (uses default if None)
131
+
132
+ Returns:
133
+ The agent's response as a string
134
+ """
135
+ target = agent_name or self._default
136
+ if not target:
137
+ raise ValueError("No default agent available")
138
+
139
+ if target not in self._agents:
140
+ raise ValueError(f"No agent named '{target}'")
141
+
142
+ proxy = self._agents[target]
143
+ return await proxy.with_resource(prompt_content, server_name, resource_name)
144
+
116
145
  async def prompt(self, agent_name: Optional[str] = None, default: str = "") -> str:
117
146
  """
118
147
  Interactive prompt for sending messages with advanced features.
@@ -0,0 +1,43 @@
1
+ """
2
+ Type definitions for agents and agent configurations.
3
+ """
4
+
5
+ from dataclasses import dataclass
6
+ from enum import Enum
7
+ from typing import Callable, Dict, List, Optional, Union
8
+
9
+ # Forward imports to avoid circular dependencies
10
+ from mcp_agent.core.request_params import RequestParams
11
+
12
+
13
+ class AgentType(Enum):
14
+ """Enumeration of supported agent types."""
15
+
16
+ BASIC = "agent"
17
+ ORCHESTRATOR = "orchestrator"
18
+ PARALLEL = "parallel"
19
+ EVALUATOR_OPTIMIZER = "evaluator_optimizer"
20
+ ROUTER = "router"
21
+ CHAIN = "chain"
22
+
23
+
24
+ @dataclass
25
+ class AgentConfig:
26
+ """Configuration for an Agent instance"""
27
+
28
+ name: str
29
+ instruction: Union[str, Callable[[Dict], str]]
30
+ servers: List[str]
31
+ model: Optional[str] = None
32
+ use_history: bool = True
33
+ default_request_params: Optional[RequestParams] = None
34
+ human_input: bool = False
35
+
36
+ def __post_init__(self):
37
+ """Ensure default_request_params exists with proper history setting"""
38
+
39
+ if self.default_request_params is None:
40
+ self.default_request_params = RequestParams(use_history=self.use_history)
41
+ else:
42
+ # Override the request params history setting if explicitly configured
43
+ self.default_request_params.use_history = self.use_history
@@ -4,9 +4,8 @@ Contains decorator definitions extracted from fastagent.py.
4
4
  """
5
5
 
6
6
  from typing import Callable, Dict, List, Optional, TypeVar, Literal
7
- from mcp_agent.agents.agent import AgentConfig
7
+ from mcp_agent.core.agent_types import AgentConfig, AgentType
8
8
  from mcp_agent.workflows.llm.augmented_llm import RequestParams
9
- from mcp_agent.core.agent_types import AgentType
10
9
 
11
10
  T = TypeVar("T") # For the wrapper classes
12
11
 
@@ -20,4 +20,4 @@ def handle_error(e: Exception, error_type: str, suggestion: str = None) -> None:
20
20
  print("\nDetails:")
21
21
  print(e.details)
22
22
  if suggestion:
23
- print(f"\n{suggestion}")
23
+ print(f"\n{suggestion}")
@@ -5,7 +5,8 @@ Factory functions for creating agent and workflow instances.
5
5
  from typing import Dict, Any, Optional, TypeVar, Callable
6
6
 
7
7
  from mcp_agent.app import MCPApp
8
- from mcp_agent.agents.agent import Agent, AgentConfig
8
+ from mcp_agent.agents.agent import Agent
9
+ from mcp_agent.core.agent_types import AgentConfig, AgentType
9
10
  from mcp_agent.event_progress import ProgressAction
10
11
  from mcp_agent.workflows.evaluator_optimizer.evaluator_optimizer import (
11
12
  EvaluatorOptimizerLLM,
@@ -16,8 +17,6 @@ from mcp_agent.workflows.llm.model_factory import ModelFactory
16
17
  from mcp_agent.workflows.orchestrator.orchestrator import Orchestrator
17
18
  from mcp_agent.workflows.parallel.parallel_llm import ParallelLLM
18
19
  from mcp_agent.workflows.router.router_llm import LLMRouter
19
-
20
- from mcp_agent.core.agent_types import AgentType
21
20
  from mcp_agent.core.exceptions import AgentConfigError
22
21
  from mcp_agent.core.proxies import (
23
22
  BaseAgentProxy,
@@ -146,7 +146,6 @@ def MCPFile(
146
146
  }
147
147
 
148
148
 
149
-
150
149
  def MCPPrompt(
151
150
  *content_items, role: Literal["user", "assistant"] = "user"
152
151
  ) -> List[dict]:
@@ -154,7 +153,7 @@ def MCPPrompt(
154
153
  Create one or more prompt messages with various content types.
155
154
 
156
155
  This function intelligently creates different content types:
157
- - Strings become TextContent
156
+ - Strings become TextContent
158
157
  - File paths with image mime types become ImageContent
159
158
  - File paths with text mime types or other mime types become EmbeddedResource
160
159
  - Dicts with role and content are passed through unchanged
@@ -180,7 +179,7 @@ def MCPPrompt(
180
179
  # File path - determine the content type based on mime type
181
180
  path_str = str(item)
182
181
  mime_type = guess_mime_type(path_str)
183
-
182
+
184
183
  if is_image_mime_type(mime_type):
185
184
  # Image files (except SVG which is handled as text)
186
185
  result.append(MCPImage(path=item, role=role))
@@ -1,6 +1,9 @@
1
1
  """
2
2
  Proxy classes for agent interactions.
3
3
  These proxies provide a consistent interface for interacting with different types of agents.
4
+
5
+ FOR COMPATIBILITY WITH LEGACY MCP-AGENT CODE
6
+
4
7
  """
5
8
 
6
9
  from typing import List, Optional, Dict, Union, TYPE_CHECKING
@@ -0,0 +1,43 @@
1
+ """
2
+ Request parameters definitions for LLM interactions.
3
+ """
4
+
5
+ from pydantic import Field
6
+ from mcp.types import CreateMessageRequestParams
7
+
8
+
9
+ class RequestParams(CreateMessageRequestParams):
10
+ """
11
+ Parameters to configure the AugmentedLLM 'generate' requests.
12
+ """
13
+
14
+ messages: None = Field(exclude=True, default=None)
15
+ """
16
+ Ignored. 'messages' are removed from CreateMessageRequestParams
17
+ to avoid confusion with the 'message' parameter on 'generate' method.
18
+ """
19
+
20
+ maxTokens: int = 2048
21
+ """The maximum number of tokens to sample, as requested by the server."""
22
+
23
+ model: str | None = None
24
+ """
25
+ The model to use for the LLM generation.
26
+ If specified, this overrides the 'modelPreferences' selection criteria.
27
+ """
28
+
29
+ use_history: bool = True
30
+ """
31
+ Include the message history in the generate request.
32
+ """
33
+
34
+ max_iterations: int = 10
35
+ """
36
+ The maximum number of iterations to run the LLM for.
37
+ """
38
+
39
+ parallel_tool_calls: bool = True
40
+ """
41
+ Whether to allow multiple tool calls per iteration.
42
+ Also known as multi-step tool use.
43
+ """
@@ -7,7 +7,9 @@ from typing import Dict, Union, TypeAlias, TYPE_CHECKING
7
7
  from mcp_agent.agents.agent import Agent
8
8
  from mcp_agent.workflows.orchestrator.orchestrator import Orchestrator
9
9
  from mcp_agent.workflows.parallel.parallel_llm import ParallelLLM
10
- from mcp_agent.workflows.evaluator_optimizer.evaluator_optimizer import EvaluatorOptimizerLLM
10
+ from mcp_agent.workflows.evaluator_optimizer.evaluator_optimizer import (
11
+ EvaluatorOptimizerLLM,
12
+ )
11
13
  from mcp_agent.workflows.router.router_llm import LLMRouter
12
14
 
13
15
  # Avoid circular imports
@@ -19,4 +21,4 @@ WorkflowType: TypeAlias = Union[
19
21
  Orchestrator, ParallelLLM, EvaluatorOptimizerLLM, LLMRouter
20
22
  ]
21
23
  AgentOrWorkflow: TypeAlias = Union[Agent, WorkflowType]
22
- ProxyDict: TypeAlias = Dict[str, "BaseAgentProxy"] # Forward reference as string
24
+ ProxyDict: TypeAlias = Dict[str, "BaseAgentProxy"] # Forward reference as string