fast-agent-mcp 0.2.44__tar.gz → 0.2.45__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.

Potentially problematic release.


This version of fast-agent-mcp might be problematic. Click here for more details.

Files changed (235) hide show
  1. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/PKG-INFO +4 -4
  2. {fast_agent_mcp-0.2.44/src/mcp_agent/resources → fast_agent_mcp-0.2.45}/examples/workflows/evaluator.py +2 -2
  3. {fast_agent_mcp-0.2.44/src/mcp_agent/resources → fast_agent_mcp-0.2.45}/examples/workflows/router.py +1 -1
  4. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/pyproject.toml +4 -4
  5. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/agents/workflow/evaluator_optimizer.py +39 -63
  6. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/agents/workflow/router_agent.py +46 -21
  7. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/context.py +4 -0
  8. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/core/direct_decorators.py +4 -5
  9. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/core/enhanced_prompt.py +4 -5
  10. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/human_input/elicitation_form.py +16 -13
  11. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/augmented_llm.py +1 -2
  12. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/augmented_llm_passthrough.py +0 -11
  13. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/augmented_llm_anthropic.py +254 -95
  14. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45/src/mcp_agent/resources}/examples/workflows/evaluator.py +2 -2
  15. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45/src/mcp_agent/resources}/examples/workflows/router.py +1 -1
  16. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/ui/console_display.py +19 -9
  17. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/.gitignore +0 -0
  18. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/LICENSE +0 -0
  19. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/README.md +0 -0
  20. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/azure-openai/fastagent.config.yaml +0 -0
  21. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/bedrock/fast-agent.config.yaml +0 -0
  22. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/custom-agents/agent.py +0 -0
  23. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/custom-agents/fastagent.config.yaml +0 -0
  24. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/data-analysis/analysis-campaign.py +0 -0
  25. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/data-analysis/analysis.py +0 -0
  26. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/data-analysis/fastagent.config.yaml +0 -0
  27. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
  28. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/elicitations/elicitation_account_server.py +0 -0
  29. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/elicitations/elicitation_forms_server.py +0 -0
  30. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/elicitations/elicitation_game_server.py +0 -0
  31. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/elicitations/fastagent.config.yaml +0 -0
  32. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/elicitations/fastagent.secrets.yaml.example +0 -0
  33. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/elicitations/forms_demo.py +0 -0
  34. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/elicitations/game_character.py +0 -0
  35. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/elicitations/game_character_handler.py +0 -0
  36. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/elicitations/tool_call.py +0 -0
  37. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/mcp-filtering/fastagent.config.yaml +0 -0
  38. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/mcp-filtering/fastagent.secrets.yaml.example +0 -0
  39. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/mcp-filtering/mcp_server.py +0 -0
  40. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/mcp-filtering/test_mcp_filtering.py +0 -0
  41. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/state-transfer/agent_one.py +0 -0
  42. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/state-transfer/agent_two.py +0 -0
  43. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
  44. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
  45. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/vision-examples/cat.png +0 -0
  46. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/vision-examples/example1.py +0 -0
  47. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/vision-examples/example2.py +0 -0
  48. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/vision-examples/example3.py +0 -0
  49. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/mcp/vision-examples/fastagent.config.yaml +0 -0
  50. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/otel/agent.py +0 -0
  51. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/otel/agent2.py +0 -0
  52. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/otel/docker-compose.yaml +0 -0
  53. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/otel/fastagent.config.yaml +0 -0
  54. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/researcher/fastagent.config.yaml +0 -0
  55. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/researcher/researcher-eval.py +0 -0
  56. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/researcher/researcher-imp.py +0 -0
  57. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/researcher/researcher.py +0 -0
  58. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/tensorzero/.env.sample +0 -0
  59. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/tensorzero/Makefile +0 -0
  60. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/tensorzero/README.md +0 -0
  61. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/tensorzero/agent.py +0 -0
  62. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/tensorzero/demo_images/clam.jpg +0 -0
  63. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/tensorzero/demo_images/crab.png +0 -0
  64. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/tensorzero/demo_images/shrimp.png +0 -0
  65. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/tensorzero/docker-compose.yml +0 -0
  66. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/tensorzero/fastagent.config.yaml +0 -0
  67. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/tensorzero/image_demo.py +0 -0
  68. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/tensorzero/mcp_server/Dockerfile +0 -0
  69. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/tensorzero/mcp_server/entrypoint.sh +0 -0
  70. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/tensorzero/mcp_server/mcp_server.py +0 -0
  71. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/tensorzero/simple_agent.py +0 -0
  72. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/tensorzero/tensorzero_config/system_schema.json +0 -0
  73. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/tensorzero/tensorzero_config/system_template.minijinja +0 -0
  74. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/tensorzero/tensorzero_config/tensorzero.toml +0 -0
  75. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/workflows/chaining.py +0 -0
  76. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/workflows/fastagent.config.yaml +0 -0
  77. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/workflows/graded_report.md +0 -0
  78. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/workflows/human_input.py +0 -0
  79. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/workflows/orchestrator.py +0 -0
  80. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/workflows/parallel.py +0 -0
  81. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/workflows/short_story.md +0 -0
  82. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/examples/workflows/short_story.txt +0 -0
  83. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/hatch_build.py +0 -0
  84. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/__init__.py +0 -0
  85. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/agents/__init__.py +0 -0
  86. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/agents/agent.py +0 -0
  87. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/agents/base_agent.py +0 -0
  88. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/agents/workflow/__init__.py +0 -0
  89. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/agents/workflow/chain_agent.py +0 -0
  90. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/agents/workflow/orchestrator_agent.py +0 -0
  91. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/agents/workflow/orchestrator_models.py +0 -0
  92. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/agents/workflow/orchestrator_prompts.py +0 -0
  93. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/agents/workflow/parallel_agent.py +0 -0
  94. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/app.py +0 -0
  95. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/cli/__init__.py +0 -0
  96. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/cli/__main__.py +0 -0
  97. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/cli/commands/check_config.py +0 -0
  98. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/cli/commands/go.py +0 -0
  99. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/cli/commands/quickstart.py +0 -0
  100. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/cli/commands/server_helpers.py +0 -0
  101. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/cli/commands/setup.py +0 -0
  102. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/cli/commands/url_parser.py +0 -0
  103. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/cli/constants.py +0 -0
  104. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/cli/main.py +0 -0
  105. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/cli/terminal.py +0 -0
  106. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/config.py +0 -0
  107. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/console.py +0 -0
  108. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/context_dependent.py +0 -0
  109. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/core/__init__.py +0 -0
  110. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/core/agent_app.py +0 -0
  111. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/core/agent_types.py +0 -0
  112. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/core/direct_factory.py +0 -0
  113. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/core/error_handling.py +0 -0
  114. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/core/exceptions.py +0 -0
  115. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/core/fastagent.py +0 -0
  116. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/core/interactive_prompt.py +0 -0
  117. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/core/mcp_content.py +0 -0
  118. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/core/prompt.py +0 -0
  119. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/core/request_params.py +0 -0
  120. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/core/usage_display.py +0 -0
  121. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/core/validation.py +0 -0
  122. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/event_progress.py +0 -0
  123. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/executor/__init__.py +0 -0
  124. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/executor/executor.py +0 -0
  125. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/executor/task_registry.py +0 -0
  126. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/executor/workflow_signal.py +0 -0
  127. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/human_input/__init__.py +0 -0
  128. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/human_input/elicitation_forms.py +0 -0
  129. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/human_input/elicitation_handler.py +0 -0
  130. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/human_input/elicitation_state.py +0 -0
  131. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/human_input/handler.py +0 -0
  132. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/human_input/types.py +0 -0
  133. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/__init__.py +0 -0
  134. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/augmented_llm_playback.py +0 -0
  135. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/augmented_llm_silent.py +0 -0
  136. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/augmented_llm_slow.py +0 -0
  137. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/memory.py +0 -0
  138. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/model_database.py +0 -0
  139. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/model_factory.py +0 -0
  140. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/prompt_utils.py +0 -0
  141. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/provider_key_manager.py +0 -0
  142. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/provider_types.py +0 -0
  143. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/__init__.py +0 -0
  144. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/anthropic_utils.py +0 -0
  145. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/augmented_llm_aliyun.py +0 -0
  146. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/augmented_llm_azure.py +0 -0
  147. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/augmented_llm_bedrock.py +0 -0
  148. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/augmented_llm_deepseek.py +0 -0
  149. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/augmented_llm_generic.py +0 -0
  150. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/augmented_llm_google_native.py +0 -0
  151. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/augmented_llm_google_oai.py +0 -0
  152. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/augmented_llm_openai.py +0 -0
  153. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/augmented_llm_openrouter.py +0 -0
  154. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/augmented_llm_tensorzero.py +0 -0
  155. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/augmented_llm_xai.py +0 -0
  156. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/google_converter.py +0 -0
  157. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/multipart_converter_anthropic.py +0 -0
  158. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/multipart_converter_openai.py +0 -0
  159. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/multipart_converter_tensorzero.py +0 -0
  160. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/openai_multipart.py +0 -0
  161. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/openai_utils.py +0 -0
  162. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/sampling_converter_anthropic.py +0 -0
  163. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/providers/sampling_converter_openai.py +0 -0
  164. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/sampling_converter.py +0 -0
  165. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/sampling_format_converter.py +0 -0
  166. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/llm/usage_tracking.py +0 -0
  167. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/logging/__init__.py +0 -0
  168. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/logging/events.py +0 -0
  169. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/logging/json_serializer.py +0 -0
  170. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/logging/listeners.py +0 -0
  171. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/logging/logger.py +0 -0
  172. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/logging/rich_progress.py +0 -0
  173. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/logging/transport.py +0 -0
  174. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/__init__.py +0 -0
  175. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/common.py +0 -0
  176. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/elicitation_factory.py +0 -0
  177. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/elicitation_handlers.py +0 -0
  178. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/gen_client.py +0 -0
  179. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/helpers/__init__.py +0 -0
  180. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/helpers/content_helpers.py +0 -0
  181. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/helpers/server_config_helpers.py +0 -0
  182. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/hf_auth.py +0 -0
  183. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/interfaces.py +0 -0
  184. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/logger_textio.py +0 -0
  185. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/mcp_agent_client_session.py +0 -0
  186. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/mcp_aggregator.py +0 -0
  187. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/mcp_connection_manager.py +0 -0
  188. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/mime_utils.py +0 -0
  189. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/prompt_message_multipart.py +0 -0
  190. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/prompt_render.py +0 -0
  191. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/prompt_serialization.py +0 -0
  192. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/prompts/__init__.py +0 -0
  193. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/prompts/__main__.py +0 -0
  194. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/prompts/prompt_constants.py +0 -0
  195. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/prompts/prompt_helpers.py +0 -0
  196. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/prompts/prompt_load.py +0 -0
  197. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/prompts/prompt_server.py +0 -0
  198. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/prompts/prompt_template.py +0 -0
  199. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/resource_utils.py +0 -0
  200. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp/sampling.py +0 -0
  201. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp_server/__init__.py +0 -0
  202. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp_server/agent_server.py +0 -0
  203. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/mcp_server_registry.py +0 -0
  204. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/progress_display.py +0 -0
  205. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/data-analysis/analysis-campaign.py +0 -0
  206. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/data-analysis/analysis.py +0 -0
  207. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/data-analysis/fastagent.config.yaml +0 -0
  208. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
  209. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/mcp/elicitations/elicitation_account_server.py +0 -0
  210. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/mcp/elicitations/elicitation_forms_server.py +0 -0
  211. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/mcp/elicitations/elicitation_game_server.py +0 -0
  212. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/mcp/elicitations/fastagent.config.yaml +0 -0
  213. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/mcp/elicitations/fastagent.secrets.yaml.example +0 -0
  214. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/mcp/elicitations/forms_demo.py +0 -0
  215. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/mcp/elicitations/game_character.py +0 -0
  216. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/mcp/elicitations/game_character_handler.py +0 -0
  217. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/mcp/elicitations/tool_call.py +0 -0
  218. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/mcp/state-transfer/agent_one.py +0 -0
  219. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/mcp/state-transfer/agent_two.py +0 -0
  220. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
  221. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
  222. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/researcher/fastagent.config.yaml +0 -0
  223. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/researcher/researcher-eval.py +0 -0
  224. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/researcher/researcher-imp.py +0 -0
  225. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/researcher/researcher.py +0 -0
  226. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/workflows/chaining.py +0 -0
  227. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/workflows/fastagent.config.yaml +0 -0
  228. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/workflows/graded_report.md +0 -0
  229. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/workflows/human_input.py +0 -0
  230. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/workflows/orchestrator.py +0 -0
  231. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/workflows/parallel.py +0 -0
  232. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/workflows/short_story.md +0 -0
  233. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/resources/examples/workflows/short_story.txt +0 -0
  234. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/tools/tool_definition.py +0 -0
  235. {fast_agent_mcp-0.2.44 → fast_agent_mcp-0.2.45}/src/mcp_agent/ui/console_display_legacy.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fast-agent-mcp
3
- Version: 0.2.44
3
+ Version: 0.2.45
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
@@ -222,10 +222,10 @@ Requires-Dist: mcp==1.12.0
222
222
  Requires-Dist: openai>=1.93.0
223
223
  Requires-Dist: opentelemetry-distro>=0.50b0
224
224
  Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.29.0
225
- Requires-Dist: opentelemetry-instrumentation-anthropic>=0.40.14; python_version >= '3.10' and python_version < '4.0'
225
+ Requires-Dist: opentelemetry-instrumentation-anthropic>=0.42.0; python_version >= '3.10' and python_version < '4.0'
226
226
  Requires-Dist: opentelemetry-instrumentation-google-genai>=0.2b0
227
- Requires-Dist: opentelemetry-instrumentation-mcp>=0.40.14; python_version >= '3.10' and python_version < '4.0'
228
- Requires-Dist: opentelemetry-instrumentation-openai>=0.40.14; python_version >= '3.10' and python_version < '4.0'
227
+ Requires-Dist: opentelemetry-instrumentation-mcp>=0.42.0; python_version >= '3.10' and python_version < '4.0'
228
+ Requires-Dist: opentelemetry-instrumentation-openai>=0.42.0; python_version >= '3.10' and python_version < '4.0'
229
229
  Requires-Dist: prompt-toolkit>=3.0.50
230
230
  Requires-Dist: pydantic-settings>=2.7.0
231
231
  Requires-Dist: pydantic>=2.10.4
@@ -18,7 +18,7 @@ fast = FastAgent("Evaluator-Optimizer")
18
18
  candidate details, and company information. Tailor the response to the company and job requirements.
19
19
  """,
20
20
  servers=["fetch"],
21
- model="haiku3",
21
+ model="gpt-4.1-nano",
22
22
  use_history=True,
23
23
  )
24
24
  # Define evaluator agent
@@ -40,7 +40,7 @@ fast = FastAgent("Evaluator-Optimizer")
40
40
  Summarize your evaluation as a structured response with:
41
41
  - Overall quality rating.
42
42
  - Specific feedback and areas for improvement.""",
43
- model="gpt-4.1",
43
+ model="sonnet",
44
44
  )
45
45
  # Define the evaluator-optimizer workflow
46
46
  @fast.evaluator_optimizer(
@@ -43,7 +43,7 @@ SAMPLE_REQUESTS = [
43
43
  )
44
44
  @fast.router(
45
45
  name="route",
46
- model="sonnet",
46
+ model="gpt-4.1",
47
47
  agents=["code_expert", "general_assistant", "fetcher"],
48
48
  )
49
49
  async def main() -> None:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fast-agent-mcp"
3
- version = "0.2.44"
3
+ version = "0.2.45"
4
4
  description = "Define, Prompt and Test MCP enabled Agents and Workflows"
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
@@ -29,9 +29,9 @@ dependencies = [
29
29
  "boto3>=1.35.0",
30
30
  "prompt-toolkit>=3.0.50",
31
31
  "aiohttp>=3.11.13",
32
- "opentelemetry-instrumentation-openai>=0.40.14; python_version >= '3.10' and python_version < '4.0'",
33
- "opentelemetry-instrumentation-anthropic>=0.40.14; python_version >= '3.10' and python_version < '4.0'",
34
- "opentelemetry-instrumentation-mcp>=0.40.14; python_version >= '3.10' and python_version < '4.0'",
32
+ "opentelemetry-instrumentation-openai>=0.42.0; python_version >= '3.10' and python_version < '4.0'",
33
+ "opentelemetry-instrumentation-anthropic>=0.42.0; python_version >= '3.10' and python_version < '4.0'",
34
+ "opentelemetry-instrumentation-mcp>=0.42.0; python_version >= '3.10' and python_version < '4.0'",
35
35
  "google-genai",
36
36
  "opentelemetry-instrumentation-google-genai>=0.2b0",
37
37
  "tensorzero>=2025.6.3",
@@ -33,16 +33,14 @@ class QualityRating(str, Enum):
33
33
  GOOD = "GOOD" # Minor improvements possible
34
34
  EXCELLENT = "EXCELLENT" # No improvements needed
35
35
 
36
- # Map string values to integer values for comparisons
37
- @property
38
- def value(self) -> int:
39
- """Convert string enum values to integers for comparison."""
40
- return {
41
- "POOR": 0,
42
- "FAIR": 1,
43
- "GOOD": 2,
44
- "EXCELLENT": 3,
45
- }[self._value_]
36
+
37
+ # Separate mapping for quality ratings to numerical values
38
+ QUALITY_RATING_VALUES = {
39
+ QualityRating.POOR: 0,
40
+ QualityRating.FAIR: 1,
41
+ QualityRating.GOOD: 2,
42
+ QualityRating.EXCELLENT: 3,
43
+ }
46
44
 
47
45
 
48
46
  class EvaluationResult(BaseModel):
@@ -140,7 +138,7 @@ class EvaluatorOptimizerAgent(BaseAgent):
140
138
 
141
139
  # Evaluate current response
142
140
  eval_prompt = self._build_eval_prompt(
143
- request=request, response=response.all_text(), iteration=refinement_count
141
+ request=request, response=response.last_text(), iteration=refinement_count
144
142
  )
145
143
 
146
144
  # Create evaluation message and get structured evaluation result
@@ -171,7 +169,7 @@ class EvaluatorOptimizerAgent(BaseAgent):
171
169
  logger.debug(f"Evaluation result: {evaluation_result.rating}")
172
170
 
173
171
  # Track best response based on rating
174
- if evaluation_result.rating.value > best_rating.value:
172
+ if QUALITY_RATING_VALUES[evaluation_result.rating] > QUALITY_RATING_VALUES[best_rating]:
175
173
  best_rating = evaluation_result.rating
176
174
  best_response = response
177
175
  logger.debug(f"New best response (rating: {best_rating})")
@@ -183,14 +181,17 @@ class EvaluatorOptimizerAgent(BaseAgent):
183
181
  best_response = response
184
182
  break
185
183
 
186
- if evaluation_result.rating.value >= self.min_rating.value:
184
+ if (
185
+ QUALITY_RATING_VALUES[evaluation_result.rating]
186
+ >= QUALITY_RATING_VALUES[self.min_rating]
187
+ ):
187
188
  logger.debug(f"Acceptable quality reached ({evaluation_result.rating})")
188
189
  break
189
190
 
190
191
  # Generate refined response
191
192
  refinement_prompt = self._build_refinement_prompt(
192
193
  request=request,
193
- response=response.all_text(),
194
+ response=response.last_text(), ## only if there is no history?
194
195
  feedback=evaluation_result,
195
196
  iteration=refinement_count,
196
197
  )
@@ -270,48 +271,21 @@ class EvaluatorOptimizerAgent(BaseAgent):
270
271
  return f"""
271
272
  You are an expert evaluator for content quality. Your task is to evaluate a response against the user's original request.
272
273
 
273
- Evaluate the response for iteration {iteration + 1} and provide structured feedback on its quality and areas for improvement.
274
+ Evaluate the response for iteration {iteration + 1} and provide feedback on its quality and areas for improvement.
274
275
 
276
+ ```
275
277
  <fastagent:data>
276
- <fastagent:request>
278
+ <fastagent:request>
277
279
  {request}
278
- </fastagent:request>
280
+ </fastagent:request>
279
281
 
280
- <fastagent:response>
282
+ <fastagent:response>
281
283
  {response}
282
- </fastagent:response>
284
+ </fastagent:response>
283
285
  </fastagent:data>
284
286
 
285
- <fastagent:instruction>
286
- Your response MUST be valid JSON matching this exact format (no other text, markdown, or explanation):
287
-
288
- {{
289
- "rating": "RATING",
290
- "feedback": "DETAILED FEEDBACK",
291
- "needs_improvement": BOOLEAN,
292
- "focus_areas": ["FOCUS_AREA_1", "FOCUS_AREA_2", "FOCUS_AREA_3"]
293
- }}
294
-
295
- Where:
296
- - RATING: Must be one of: "EXCELLENT", "GOOD", "FAIR", or "POOR"
297
- - EXCELLENT: No improvements needed
298
- - GOOD: Only minor improvements possible
299
- - FAIR: Several improvements needed
300
- - POOR: Major improvements needed
301
- - DETAILED FEEDBACK: Specific, actionable feedback (as a single string)
302
- - BOOLEAN: true or false (lowercase, no quotes) indicating if further improvement is needed
303
- - FOCUS_AREAS: Array of 1-3 specific areas to focus on (empty array if no improvement needed)
304
-
305
- Example of valid response (DO NOT include the triple backticks in your response):
306
- {{
307
- "rating": "GOOD",
308
- "feedback": "The response is clear but could use more supporting evidence.",
309
- "needs_improvement": true,
310
- "focus_areas": ["Add more examples", "Include data points"]
311
- }}
312
-
313
- IMPORTANT: Your response should be ONLY the JSON object without any code fences, explanations, or other text.
314
- </fastagent:instruction>
287
+ ```
288
+
315
289
  """
316
290
 
317
291
  def _build_refinement_prompt(
@@ -333,28 +307,27 @@ IMPORTANT: Your response should be ONLY the JSON object without any code fences,
333
307
  Returns:
334
308
  Formatted refinement prompt
335
309
  """
336
- focus_areas = ", ".join(feedback.focus_areas) if feedback.focus_areas else "None specified"
310
+
311
+ # Format focus areas as bulleted list with each item on a separate line
312
+ if feedback.focus_areas:
313
+ focus_areas = "\n".join(f" * {area}" for area in feedback.focus_areas)
314
+ else:
315
+ focus_areas = "None specified"
337
316
 
338
317
  return f"""
339
- You are tasked with improving a response based on expert feedback. This is iteration {iteration + 1} of the refinement process.
318
+ You are tasked with improving your previous response based on expert feedback. This is iteration {iteration + 1} of the refinement process.
340
319
 
341
320
  Your goal is to address all feedback points while maintaining accuracy and relevance to the original request.
342
321
 
343
- <fastagent:data>
344
- <fastagent:request>
345
- {request}
346
- </fastagent:request>
347
-
348
- <fastagent:previous-response>
349
- {response}
350
- </fastagent:previous-response>
322
+ ```
351
323
 
352
324
  <fastagent:feedback>
353
- <rating>{feedback.rating}</rating>
354
- <details>{feedback.feedback}</details>
355
- <focus-areas>{focus_areas}</focus-areas>
325
+ <rating>{feedback.rating.name}</rating>
326
+ <details>{feedback.feedback}</details>
327
+ <focus-areas>
328
+ {focus_areas}
329
+ </focus-areas>
356
330
  </fastagent:feedback>
357
- </fastagent:data>
358
331
 
359
332
  <fastagent:instruction>
360
333
  Create an improved version of the response that:
@@ -365,4 +338,7 @@ Create an improved version of the response that:
365
338
 
366
339
  Provide your complete improved response without explanations or commentary.
367
340
  </fastagent:instruction>
341
+
342
+ ```
343
+
368
344
  """
@@ -39,7 +39,7 @@ Follow these guidelines:
39
39
  """
40
40
 
41
41
  # Default routing instruction with placeholders for context (AgentCard JSON)
42
- DEFAULT_ROUTING_INSTRUCTION = """
42
+ ROUTING_AGENT_INSTRUCTION = """
43
43
  Select from the following agents to handle the request:
44
44
  <fastagent:agents>
45
45
  [
@@ -100,7 +100,7 @@ class RouterAgent(BaseAgent):
100
100
  self.routing_instruction = routing_instruction
101
101
  self.agent_map = {agent.name: agent for agent in agents}
102
102
 
103
- # Set up base router request parameters
103
+ # Set up base router request parameters with just the base instruction for now
104
104
  base_params = {"systemPrompt": ROUTING_SYSTEM_INSTRUCTION, "use_history": False}
105
105
 
106
106
  if default_request_params:
@@ -120,6 +120,18 @@ class RouterAgent(BaseAgent):
120
120
  if not getattr(agent, "initialized", False):
121
121
  await agent.initialize()
122
122
 
123
+ complete_routing_instruction = await self._generate_routing_instruction(
124
+ self.agents, self.routing_instruction
125
+ )
126
+
127
+ # Update the system prompt to include the routing instruction with agent cards
128
+ combined_system_prompt = (
129
+ ROUTING_SYSTEM_INSTRUCTION + "\n\n" + complete_routing_instruction
130
+ )
131
+ self._default_request_params.systemPrompt = combined_system_prompt
132
+ self.instruction = combined_system_prompt
133
+ self._routing_instruction_generated = True
134
+
123
135
  self.initialized = True
124
136
 
125
137
  async def shutdown(self) -> None:
@@ -133,6 +145,36 @@ class RouterAgent(BaseAgent):
133
145
  except Exception as e:
134
146
  logger.warning(f"Error shutting down agent: {str(e)}")
135
147
 
148
+ @staticmethod
149
+ async def _generate_routing_instruction(
150
+ agents: List[Agent], routing_instruction: Optional[str] = None
151
+ ) -> str:
152
+ """
153
+ Generate the complete routing instruction with agent cards.
154
+
155
+ Args:
156
+ agents: List of agents to include in routing instruction
157
+ routing_instruction: Optional custom routing instruction template
158
+
159
+ Returns:
160
+ Complete routing instruction with agent cards formatted
161
+ """
162
+ # Generate agent descriptions
163
+ agent_descriptions = []
164
+ for agent in agents:
165
+ agent_card: AgentCard = await agent.agent_card()
166
+ agent_descriptions.append(
167
+ agent_card.model_dump_json(
168
+ include={"name", "description", "skills"}, exclude_none=True
169
+ )
170
+ )
171
+
172
+ context = ",\n".join(agent_descriptions)
173
+
174
+ # Format the routing instruction
175
+ instruction_template = routing_instruction or ROUTING_AGENT_INSTRUCTION
176
+ return instruction_template.format(context=context)
177
+
136
178
  async def attach_llm(
137
179
  self,
138
180
  llm_factory: type[AugmentedLLMProtocol] | Callable[..., AugmentedLLMProtocol],
@@ -227,27 +269,10 @@ class RouterAgent(BaseAgent):
227
269
  agent=self.agents[0].name, confidence="high", reasoning="Only one agent available"
228
270
  ), None
229
271
 
230
- # Generate agent descriptions for the context
231
- agent_descriptions = []
232
- for agent in self.agents:
233
- agent_card: AgentCard = await agent.agent_card()
234
- agent_descriptions.append(
235
- agent_card.model_dump_json(
236
- include={"name", "description", "skills"}, exclude_none=True
237
- )
238
- )
239
-
240
- context = ",\n".join(agent_descriptions)
241
-
242
- # Format the routing prompt
243
- routing_instruction = self.routing_instruction or DEFAULT_ROUTING_INSTRUCTION
244
- routing_instruction = routing_instruction.format(context=context)
245
-
246
272
  assert self._llm
247
- mutated = message.model_copy(deep=True)
248
- mutated.add_text(routing_instruction)
273
+ # No need to add routing instruction here - it's already in the system prompt
249
274
  response, _ = await self._llm.structured(
250
- [mutated],
275
+ [message],
251
276
  RoutingResponse,
252
277
  self._default_request_params,
253
278
  )
@@ -10,7 +10,11 @@ from typing import TYPE_CHECKING, Any, Optional, Union
10
10
  from mcp import ServerSession
11
11
  from opentelemetry import trace
12
12
  from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
13
+
14
+ # from opentelemetry.instrumentation.anthropic import AnthropicInstrumentor
13
15
  from opentelemetry.instrumentation.google_genai import GoogleGenAiSdkInstrumentor
16
+
17
+ # from opentelemetry.instrumentation.mcp import McpInstrumentor
14
18
  from opentelemetry.instrumentation.openai import OpenAIInstrumentor
15
19
  from opentelemetry.propagate import set_global_textmap
16
20
  from opentelemetry.sdk.resources import Resource
@@ -23,6 +23,9 @@ from typing import (
23
23
  from mcp.client.session import ElicitationFnT
24
24
 
25
25
  from mcp_agent.agents.agent import AgentConfig
26
+ from mcp_agent.agents.workflow.router_agent import (
27
+ ROUTING_SYSTEM_INSTRUCTION,
28
+ )
26
29
  from mcp_agent.core.agent_types import AgentType
27
30
  from mcp_agent.core.request_params import RequestParams
28
31
 
@@ -397,10 +400,6 @@ def router(
397
400
  Returns:
398
401
  A decorator that registers the router with proper type annotations
399
402
  """
400
- default_instruction = """
401
- You are a router that determines which specialized agent should handle a given query.
402
- Analyze the query and select the most appropriate agent to handle it.
403
- """
404
403
 
405
404
  return cast(
406
405
  "Callable[[AgentCallable[P, R]], DecoratedRouterProtocol[P, R]]",
@@ -408,7 +407,7 @@ def router(
408
407
  self,
409
408
  AgentType.ROUTER,
410
409
  name=name,
411
- instruction=instruction or default_instruction,
410
+ instruction=instruction or ROUTING_SYSTEM_INSTRUCTION,
412
411
  servers=servers,
413
412
  model=model,
414
413
  use_history=use_history,
@@ -511,13 +511,12 @@ def create_keybindings(on_toggle_multiline=None, app=None, agent_provider=None,
511
511
  rich_print("\n[green]✓ Copied to clipboard[/green]")
512
512
  return
513
513
 
514
- rich_print("\n[yellow]No assistant messages found[/yellow]")
515
514
  else:
516
- rich_print("\n[yellow]No message history available[/yellow]")
517
- except Exception as e:
518
- rich_print(f"\n[red]Error copying: {e}[/red]")
515
+ pass
516
+ except Exception:
517
+ pass
519
518
  else:
520
- rich_print("[yellow]Clipboard copy not available in this context[/yellow]")
519
+ pass
521
520
 
522
521
  return kb
523
522
 
@@ -5,6 +5,7 @@ from typing import Any, Dict, Optional
5
5
 
6
6
  from mcp.types import ElicitRequestedSchema
7
7
  from prompt_toolkit import Application
8
+ from prompt_toolkit.application.current import get_app
8
9
  from prompt_toolkit.buffer import Buffer
9
10
  from prompt_toolkit.filters import Condition
10
11
  from prompt_toolkit.formatted_text import FormattedText
@@ -272,29 +273,32 @@ class ElicitationForm:
272
273
  keep_focused_window_visible=True,
273
274
  )
274
275
 
275
- # Create title bar manually
276
- title_bar = Window(
277
- FormattedTextControl(FormattedText([("class:title", "Elicitation Request")])),
278
- height=1,
279
- style="class:dialog.title",
280
- )
281
-
282
- # Combine title, sticky headers, and scrollable content
276
+ # Combine sticky headers and scrollable content (no separate title bar needed)
283
277
  full_content = HSplit(
284
278
  [
285
- title_bar,
286
- Window(height=1), # Spacing after title
279
+ Window(height=1), # Top spacing
287
280
  sticky_headers, # Headers stay fixed at top
288
281
  scrollable_content, # Form fields can scroll
289
282
  ]
290
283
  )
291
284
 
292
- # Create dialog frame manually to avoid Dialog's internal scrolling
285
+ # Create dialog frame with title
293
286
  dialog = Frame(
294
287
  body=full_content,
288
+ title="Elicitation Request",
295
289
  style="class:dialog",
296
290
  )
297
291
 
292
+ # Apply width constraints by putting Frame in VSplit with flexible spacers
293
+ # This prevents console display interference and constrains the Frame border
294
+ constrained_dialog = VSplit(
295
+ [
296
+ Window(width=10), # Smaller left spacer
297
+ dialog,
298
+ Window(width=10), # Smaller right spacer
299
+ ]
300
+ )
301
+
298
302
  # Key bindings
299
303
  kb = KeyBindings()
300
304
 
@@ -370,7 +374,7 @@ class ElicitationForm:
370
374
  # Add toolbar to the layout
371
375
  root_layout = HSplit(
372
376
  [
373
- dialog, # The main dialog
377
+ constrained_dialog, # The width-constrained dialog
374
378
  self._toolbar_window,
375
379
  ]
376
380
  )
@@ -588,7 +592,6 @@ class ElicitationForm:
588
592
 
589
593
  def _is_in_multiline_field(self) -> bool:
590
594
  """Check if currently focused field is a multiline field."""
591
- from prompt_toolkit.application.current import get_app
592
595
 
593
596
  focused = get_app().layout.current_control
594
597
 
@@ -212,8 +212,6 @@ class AugmentedLLM(ContextDependent, AugmentedLLMProtocol, Generic[MessageParamT
212
212
  # note - check changes here are mirrored in structured(). i've thought hard about
213
213
  # a strategy to reduce duplication etc, but aiming for simple but imperfect for the moment
214
214
 
215
- # We never expect this for structured() calls - this is for interactive use - developers
216
- # can do this programatically
217
215
  # TODO -- create a "fast-agent" control role rather than magic strings
218
216
 
219
217
  if multipart_messages[-1].first_text().startswith("***SAVE_HISTORY"):
@@ -235,6 +233,7 @@ class AugmentedLLM(ContextDependent, AugmentedLLMProtocol, Generic[MessageParamT
235
233
 
236
234
  # add generic error and termination reason handling/rollback
237
235
  self._message_history.append(assistant_response)
236
+
238
237
  return assistant_response
239
238
 
240
239
  @abstractmethod
@@ -164,15 +164,10 @@ class PassthroughLLM(AugmentedLLM):
164
164
  request_params: RequestParams | None = None,
165
165
  is_template: bool = False,
166
166
  ) -> PromptMessageMultipart:
167
- print(
168
- f"DEBUG: PassthroughLLM _apply_prompt_provider_specific called with {len(multipart_messages)} messages, is_template={is_template}"
169
- )
170
-
171
167
  # Add messages to history with proper is_prompt flag
172
168
  self.history.extend(multipart_messages, is_prompt=is_template)
173
169
 
174
170
  last_message = multipart_messages[-1]
175
- print(f"DEBUG: Last message role: {last_message.role}, text: '{last_message.first_text()}'")
176
171
 
177
172
  if self.is_tool_call(last_message):
178
173
  result = Prompt.assistant(await self.generate_str(last_message.first_text()))
@@ -209,14 +204,8 @@ class PassthroughLLM(AugmentedLLM):
209
204
  else:
210
205
  # TODO -- improve when we support Audio/Multimodal gen models e.g. gemini . This should really just return the input as "assistant"...
211
206
  concatenated: str = "\n".join(message.all_text() for message in multipart_messages)
212
- print(
213
- f"DEBUG: PassthroughLLM generating response: '{concatenated}' (is_template={is_template})"
214
- )
215
207
  await self.show_assistant_message(concatenated)
216
208
  result = Prompt.assistant(concatenated)
217
- print(f"DEBUG: PassthroughLLM created result: {result}")
218
- print(f"DEBUG: Result first_text(): {result.first_text()}")
219
- print(f"DEBUG: Result content: {result.content}")
220
209
 
221
210
  # Track usage for this passthrough "turn"
222
211
  try: