fast-agent-mcp 0.2.41__tar.gz → 0.2.42__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 (234) hide show
  1. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/PKG-INFO +2 -1
  2. fast_agent_mcp-0.2.42/examples/bedrock/fast-agent.config.yaml +13 -0
  3. fast_agent_mcp-0.2.42/examples/mcp/mcp-filtering/fastagent.config.yaml +6 -0
  4. fast_agent_mcp-0.2.42/examples/mcp/mcp-filtering/fastagent.secrets.yaml.example +16 -0
  5. fast_agent_mcp-0.2.42/examples/mcp/mcp-filtering/mcp_server.py +127 -0
  6. fast_agent_mcp-0.2.42/examples/mcp/mcp-filtering/test_mcp_filtering.py +96 -0
  7. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/pyproject.toml +2 -1
  8. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/base_agent.py +111 -1
  9. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/config.py +17 -0
  10. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/agent_types.py +4 -1
  11. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/direct_decorators.py +29 -0
  12. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/enhanced_prompt.py +10 -2
  13. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/model_factory.py +9 -0
  14. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/provider_types.py +1 -0
  15. fast_agent_mcp-0.2.42/src/mcp_agent/llm/providers/augmented_llm_bedrock.py +1787 -0
  16. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_openai.py +3 -1
  17. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/logging/logger.py +7 -0
  18. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/hf_auth.py +32 -4
  19. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/.gitignore +0 -0
  20. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/LICENSE +0 -0
  21. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/README.md +0 -0
  22. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/azure-openai/fastagent.config.yaml +0 -0
  23. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/custom-agents/agent.py +0 -0
  24. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/custom-agents/fastagent.config.yaml +0 -0
  25. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/data-analysis/analysis-campaign.py +0 -0
  26. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/data-analysis/analysis.py +0 -0
  27. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/data-analysis/fastagent.config.yaml +0 -0
  28. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
  29. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/mcp/elicitations/elicitation_account_server.py +0 -0
  30. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/mcp/elicitations/elicitation_forms_server.py +0 -0
  31. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/mcp/elicitations/elicitation_game_server.py +0 -0
  32. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/mcp/elicitations/fastagent.config.yaml +0 -0
  33. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/mcp/elicitations/fastagent.secrets.yaml.example +0 -0
  34. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/mcp/elicitations/forms_demo.py +0 -0
  35. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/mcp/elicitations/game_character.py +0 -0
  36. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/mcp/elicitations/game_character_handler.py +0 -0
  37. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/mcp/elicitations/tool_call.py +0 -0
  38. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/mcp/state-transfer/agent_one.py +0 -0
  39. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/mcp/state-transfer/agent_two.py +0 -0
  40. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
  41. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
  42. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/mcp/vision-examples/cat.png +0 -0
  43. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/mcp/vision-examples/example1.py +0 -0
  44. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/mcp/vision-examples/example2.py +0 -0
  45. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/mcp/vision-examples/example3.py +0 -0
  46. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/mcp/vision-examples/fastagent.config.yaml +0 -0
  47. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/otel/agent.py +0 -0
  48. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/otel/agent2.py +0 -0
  49. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/otel/docker-compose.yaml +0 -0
  50. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/otel/fastagent.config.yaml +0 -0
  51. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/researcher/fastagent.config.yaml +0 -0
  52. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/researcher/researcher-eval.py +0 -0
  53. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/researcher/researcher-imp.py +0 -0
  54. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/researcher/researcher.py +0 -0
  55. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/tensorzero/.env.sample +0 -0
  56. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/tensorzero/Makefile +0 -0
  57. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/tensorzero/README.md +0 -0
  58. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/tensorzero/agent.py +0 -0
  59. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/tensorzero/demo_images/clam.jpg +0 -0
  60. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/tensorzero/demo_images/crab.png +0 -0
  61. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/tensorzero/demo_images/shrimp.png +0 -0
  62. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/tensorzero/docker-compose.yml +0 -0
  63. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/tensorzero/fastagent.config.yaml +0 -0
  64. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/tensorzero/image_demo.py +0 -0
  65. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/tensorzero/mcp_server/Dockerfile +0 -0
  66. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/tensorzero/mcp_server/entrypoint.sh +0 -0
  67. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/tensorzero/mcp_server/mcp_server.py +0 -0
  68. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/tensorzero/simple_agent.py +0 -0
  69. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/tensorzero/tensorzero_config/system_schema.json +0 -0
  70. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/tensorzero/tensorzero_config/system_template.minijinja +0 -0
  71. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/tensorzero/tensorzero_config/tensorzero.toml +0 -0
  72. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/workflows/chaining.py +0 -0
  73. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/workflows/evaluator.py +0 -0
  74. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/workflows/fastagent.config.yaml +0 -0
  75. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/workflows/graded_report.md +0 -0
  76. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/workflows/human_input.py +0 -0
  77. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/workflows/orchestrator.py +0 -0
  78. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/workflows/parallel.py +0 -0
  79. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/workflows/router.py +0 -0
  80. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/workflows/short_story.md +0 -0
  81. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/examples/workflows/short_story.txt +0 -0
  82. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/hatch_build.py +0 -0
  83. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/__init__.py +0 -0
  84. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/__init__.py +0 -0
  85. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/agent.py +0 -0
  86. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/workflow/__init__.py +0 -0
  87. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/workflow/chain_agent.py +0 -0
  88. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/workflow/evaluator_optimizer.py +0 -0
  89. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/workflow/orchestrator_agent.py +0 -0
  90. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/workflow/orchestrator_models.py +0 -0
  91. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/workflow/orchestrator_prompts.py +0 -0
  92. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/workflow/parallel_agent.py +0 -0
  93. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/workflow/router_agent.py +0 -0
  94. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/app.py +0 -0
  95. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/__init__.py +0 -0
  96. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/__main__.py +0 -0
  97. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/commands/check_config.py +0 -0
  98. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/commands/go.py +0 -0
  99. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/commands/quickstart.py +0 -0
  100. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/commands/server_helpers.py +0 -0
  101. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/commands/setup.py +0 -0
  102. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/commands/url_parser.py +0 -0
  103. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/constants.py +0 -0
  104. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/main.py +0 -0
  105. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/terminal.py +0 -0
  106. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/console.py +0 -0
  107. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/context.py +0 -0
  108. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/context_dependent.py +0 -0
  109. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/__init__.py +0 -0
  110. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/agent_app.py +0 -0
  111. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/direct_factory.py +0 -0
  112. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/error_handling.py +0 -0
  113. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/exceptions.py +0 -0
  114. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/fastagent.py +0 -0
  115. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/interactive_prompt.py +0 -0
  116. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/mcp_content.py +0 -0
  117. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/prompt.py +0 -0
  118. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/request_params.py +0 -0
  119. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/usage_display.py +0 -0
  120. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/validation.py +0 -0
  121. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/event_progress.py +0 -0
  122. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/executor/__init__.py +0 -0
  123. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/executor/executor.py +0 -0
  124. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/executor/task_registry.py +0 -0
  125. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/executor/workflow_signal.py +0 -0
  126. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/human_input/__init__.py +0 -0
  127. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/human_input/elicitation_form.py +0 -0
  128. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/human_input/elicitation_forms.py +0 -0
  129. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/human_input/elicitation_handler.py +0 -0
  130. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/human_input/elicitation_state.py +0 -0
  131. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/human_input/handler.py +0 -0
  132. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/human_input/types.py +0 -0
  133. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/__init__.py +0 -0
  134. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/augmented_llm.py +0 -0
  135. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/augmented_llm_passthrough.py +0 -0
  136. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/augmented_llm_playback.py +0 -0
  137. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/augmented_llm_silent.py +0 -0
  138. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/augmented_llm_slow.py +0 -0
  139. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/memory.py +0 -0
  140. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/model_database.py +0 -0
  141. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/prompt_utils.py +0 -0
  142. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/provider_key_manager.py +0 -0
  143. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/__init__.py +0 -0
  144. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/anthropic_utils.py +0 -0
  145. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_aliyun.py +0 -0
  146. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_anthropic.py +0 -0
  147. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_azure.py +0 -0
  148. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_deepseek.py +0 -0
  149. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_generic.py +0 -0
  150. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_google_native.py +0 -0
  151. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_google_oai.py +0 -0
  152. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_openrouter.py +0 -0
  153. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_tensorzero.py +0 -0
  154. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_xai.py +0 -0
  155. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/google_converter.py +0 -0
  156. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/multipart_converter_anthropic.py +0 -0
  157. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/multipart_converter_openai.py +0 -0
  158. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/multipart_converter_tensorzero.py +0 -0
  159. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/openai_multipart.py +0 -0
  160. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/openai_utils.py +0 -0
  161. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/sampling_converter_anthropic.py +0 -0
  162. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/sampling_converter_openai.py +0 -0
  163. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/sampling_converter.py +0 -0
  164. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/sampling_format_converter.py +0 -0
  165. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/usage_tracking.py +0 -0
  166. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/logging/__init__.py +0 -0
  167. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/logging/events.py +0 -0
  168. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/logging/json_serializer.py +0 -0
  169. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/logging/listeners.py +0 -0
  170. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/logging/rich_progress.py +0 -0
  171. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/logging/transport.py +0 -0
  172. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/__init__.py +0 -0
  173. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/common.py +0 -0
  174. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/elicitation_factory.py +0 -0
  175. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/elicitation_handlers.py +0 -0
  176. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/gen_client.py +0 -0
  177. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/helpers/__init__.py +0 -0
  178. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/helpers/content_helpers.py +0 -0
  179. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/helpers/server_config_helpers.py +0 -0
  180. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/interfaces.py +0 -0
  181. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/logger_textio.py +0 -0
  182. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/mcp_agent_client_session.py +0 -0
  183. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/mcp_aggregator.py +0 -0
  184. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/mcp_connection_manager.py +0 -0
  185. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/mime_utils.py +0 -0
  186. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompt_message_multipart.py +0 -0
  187. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompt_render.py +0 -0
  188. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompt_serialization.py +0 -0
  189. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompts/__init__.py +0 -0
  190. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompts/__main__.py +0 -0
  191. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompts/prompt_constants.py +0 -0
  192. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompts/prompt_helpers.py +0 -0
  193. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompts/prompt_load.py +0 -0
  194. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompts/prompt_server.py +0 -0
  195. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompts/prompt_template.py +0 -0
  196. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/resource_utils.py +0 -0
  197. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/sampling.py +0 -0
  198. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp_server/__init__.py +0 -0
  199. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp_server/agent_server.py +0 -0
  200. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp_server_registry.py +0 -0
  201. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/progress_display.py +0 -0
  202. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/data-analysis/analysis-campaign.py +0 -0
  203. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/data-analysis/analysis.py +0 -0
  204. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/data-analysis/fastagent.config.yaml +0 -0
  205. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
  206. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/elicitations/elicitation_account_server.py +0 -0
  207. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/elicitations/elicitation_forms_server.py +0 -0
  208. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/elicitations/elicitation_game_server.py +0 -0
  209. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/elicitations/fastagent.config.yaml +0 -0
  210. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/elicitations/fastagent.secrets.yaml.example +0 -0
  211. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/elicitations/forms_demo.py +0 -0
  212. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/elicitations/game_character.py +0 -0
  213. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/elicitations/game_character_handler.py +0 -0
  214. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/elicitations/tool_call.py +0 -0
  215. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/state-transfer/agent_one.py +0 -0
  216. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/state-transfer/agent_two.py +0 -0
  217. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
  218. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
  219. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/researcher/fastagent.config.yaml +0 -0
  220. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/researcher/researcher-eval.py +0 -0
  221. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/researcher/researcher-imp.py +0 -0
  222. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/researcher/researcher.py +0 -0
  223. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/chaining.py +0 -0
  224. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/evaluator.py +0 -0
  225. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/fastagent.config.yaml +0 -0
  226. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/graded_report.md +0 -0
  227. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/human_input.py +0 -0
  228. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/orchestrator.py +0 -0
  229. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/parallel.py +0 -0
  230. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/router.py +0 -0
  231. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/short_story.md +0 -0
  232. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/short_story.txt +0 -0
  233. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/tools/tool_definition.py +0 -0
  234. {fast_agent_mcp-0.2.41 → fast_agent_mcp-0.2.42}/src/mcp_agent/ui/console_display.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fast-agent-mcp
3
- Version: 0.2.41
3
+ Version: 0.2.42
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,6 +213,7 @@ Requires-Dist: a2a-sdk>=0.2.9
213
213
  Requires-Dist: aiohttp>=3.11.13
214
214
  Requires-Dist: anthropic>=0.55.0
215
215
  Requires-Dist: azure-identity>=1.14.0
216
+ Requires-Dist: boto3>=1.35.0
216
217
  Requires-Dist: deprecated>=1.2.18
217
218
  Requires-Dist: email-validator>=2.2.0
218
219
  Requires-Dist: fastapi>=0.115.6
@@ -0,0 +1,13 @@
1
+ # Example minimalfast-agent.config.yaml for Bedrock
2
+
3
+ # List of supported models: https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html
4
+ default_model: bedrock.amazon.nova-lite-v1:0
5
+
6
+ # Bedrock uses the AWS credentials provider chain to authenticate.
7
+ # This can be accomplished with aws sso login on local machines,
8
+ # or by IAM roles within AWS.
9
+ # see https://docs.aws.amazon.com/res/latest/ug/sso-idc.html
10
+ bedrock:
11
+ region: "us-east-1" # required
12
+ profile: "default" # optional, defaults to "default" - only needed if you have multiple profiles.
13
+ # Only needed on local machines, not on AWS.
@@ -0,0 +1,6 @@
1
+ mcp:
2
+ servers:
3
+ # name used in agent servers array
4
+ creativity:
5
+ command: "uv"
6
+ args: ["run", "mcp_server.py"]
@@ -0,0 +1,16 @@
1
+ # FastAgent Secrets Configuration
2
+ # WARNING: Keep this file secure and never commit to version control
3
+
4
+ # Alternatively set OPENAI_API_KEY, ANTHROPIC_API_KEY or other environment variables.
5
+ # Keys in the configuration file override environment variables.
6
+
7
+ openai:
8
+ api_key: <your-api-key-here>
9
+ anthropic:
10
+ api_key: <your-api-key-here>
11
+ deepseek:
12
+ api_key: <your-api-key-here>
13
+ openrouter:
14
+ api_key: <your-api-key-here>
15
+
16
+ default_model: <choose a default model for your provider>
@@ -0,0 +1,127 @@
1
+ import random
2
+ import string
3
+
4
+ from mcp.server.fastmcp import FastMCP
5
+
6
+ app = FastMCP(name="Creative Writing Server")
7
+
8
+ # String manipulation tools
9
+ @app.tool(
10
+ name="reverse_string",
11
+ description="Reverses a string",
12
+ )
13
+ def reverse_string(text: str) -> str:
14
+ return text[::-1]
15
+
16
+ @app.tool(
17
+ name="capitalize_string",
18
+ description="Capitalizes a string",
19
+ )
20
+ def capitalize_string(text: str) -> str:
21
+ return text.upper()
22
+
23
+ @app.tool(
24
+ name="lowercase_string",
25
+ description="Converts a string to lowercase",
26
+ )
27
+ def lowercase_string(text: str) -> str:
28
+ return text.lower()
29
+
30
+ @app.tool(
31
+ name="random_string",
32
+ description="Generates a random string of a given length",
33
+ )
34
+ def random_string(length: int) -> str:
35
+ return ''.join(random.choices(string.ascii_letters + string.digits, k=length))
36
+
37
+ @app.tool(
38
+ name="random_case_string",
39
+ description="Randomly capitalizes or lowercase each letter in a string",
40
+ )
41
+ def random_case_string(text: str) -> str:
42
+ return ''.join(random.choice([str.upper, str.lower])(c) for c in text)
43
+
44
+ # Code formatting tools
45
+ @app.tool(
46
+ name="coding_camel_case",
47
+ description="Converts a string to camel case",
48
+ )
49
+ def coding_camel_case(text: str) -> str:
50
+ return text.title().replace(" ", "")
51
+
52
+ @app.tool(
53
+ name="coding_snake_case",
54
+ description="Converts a string to snake case",
55
+ )
56
+ def coding_snake_case(text: str) -> str:
57
+ return text.lower().replace(" ", "_")
58
+
59
+ @app.tool(
60
+ name="coding_kebab_case",
61
+ description="Converts a string to kebab case",
62
+ )
63
+ def coding_kebab_case(text: str) -> str:
64
+ return text.lower().replace(" ", "-")
65
+
66
+ # Resources
67
+ @app.resource("resource://writing/style_guide")
68
+ def writing_style_guide() -> str:
69
+ return """Writing Style Guide:
70
+ 1. Use active voice when possible
71
+ 2. Keep sentences concise and clear
72
+ 3. Vary sentence structure for rhythm
73
+ 4. Use strong, specific verbs
74
+ 5. Avoid excessive adverbs"""
75
+
76
+ @app.resource("resource://writing/character_names")
77
+ def character_names() -> str:
78
+ return """Character Name Ideas:
79
+ Fantasy: Eldara, Thorne, Zephyr, Lyanna
80
+ Modern: Alex, Jordan, Riley, Cameron
81
+ Historical: Eleanor, Benedict, Cordelia, Jasper
82
+ Sci-fi: Zara, Kai, Nova, Orion"""
83
+
84
+ @app.resource("resource://coding/conventions")
85
+ def coding_conventions() -> str:
86
+ return """Coding Conventions:
87
+ - Variables: snake_case
88
+ - Functions: snake_case
89
+ - Classes: PascalCase
90
+ - Constants: UPPER_CASE
91
+ - Files: lowercase with hyphens"""
92
+
93
+ @app.resource("resource://creativity/prompts")
94
+ def creativity_prompts() -> str:
95
+ return """Creative Writing Prompts:
96
+ 1. A character discovers they can hear colors
97
+ 2. The last person on Earth receives a phone call
98
+ 3. A library where books come to life at night
99
+ 4. Time moves backwards for one day only
100
+ 5. A world where lies become physical objects"""
101
+
102
+ # Prompts
103
+ @app.prompt("writing_assistant")
104
+ def writing_assistant(genre: str = "general") -> str:
105
+ """Creative writing assistant for different genres"""
106
+ return f"I am a creative writing assistant specialized in {genre} writing. I can help you with story structure, character development, dialogue, and prose improvement."
107
+
108
+ @app.prompt("writing_feedback")
109
+ def writing_feedback(focus: str = "overall") -> str:
110
+ """Provides feedback on written work"""
111
+ return f"I am a writing coach focused on {focus} feedback. I'll provide constructive criticism and suggestions to improve your writing."
112
+
113
+ @app.prompt("coding_helper")
114
+ def coding_helper(language: str = "python") -> str:
115
+ """Coding assistant for formatting and conventions"""
116
+ return f"I am a coding assistant specialized in {language}. I can help you with code formatting, naming conventions, and best practices."
117
+
118
+ @app.prompt("creative_brainstorm")
119
+ def creative_brainstorm(topic: str = "general") -> str:
120
+ """Brainstorming assistant for creative projects"""
121
+ return f"I am a creative brainstorming assistant focused on {topic}. I can help you generate ideas, explore concepts, and overcome creative blocks."
122
+
123
+
124
+
125
+ if __name__ == "__main__":
126
+ # Run in stdio mode
127
+ app.run()
@@ -0,0 +1,96 @@
1
+ import asyncio
2
+ import sys
3
+
4
+ from mcp_agent.core.fastagent import FastAgent, PromptExitError
5
+
6
+ fast_agent = FastAgent(
7
+ name="MCP Filtering Demo",
8
+ parse_cli_args=False,
9
+ quiet=False
10
+ )
11
+
12
+ @fast_agent.agent(
13
+ name="filtered_agent",
14
+ model="gpt-4o-mini",
15
+ instruction="You are a creative writer with filtered access to tools, resources, and prompts.",
16
+ servers=["creativity"],
17
+ # Tool filtering: only string manipulation tools and coding tools
18
+ tools={"creativity": ["reverse_string", "capitalize_string", "coding_*"]},
19
+ # Resource filtering: only writing resources (not coding resources)
20
+ resources={"creativity": ["resource://writing/*"]},
21
+ # Prompt filtering: only writing prompts (not coding prompts)
22
+ prompts={"creativity": ["writing_*"]}
23
+ )
24
+ async def filtered_agent():
25
+ return "Filtered agent ready"
26
+
27
+ @fast_agent.agent(
28
+ name="unfiltered_agent",
29
+ model="gpt-4o-mini",
30
+ instruction="You are a creative writer with access to all tools, resources, and prompts.",
31
+ servers=["creativity"]
32
+ # No filtering - gets everything
33
+ )
34
+ async def unfiltered_agent():
35
+ return "Unfiltered agent ready"
36
+
37
+ async def main():
38
+ try:
39
+ async with fast_agent.run() as agent:
40
+ try:
41
+ print("🎯 MCP Filtering Demo")
42
+ print("=" * 50)
43
+
44
+ # Show filtered agent capabilities
45
+ print("\n📦 FILTERED AGENT:")
46
+ filtered = agent._agent("filtered_agent")
47
+
48
+ tools = await filtered.list_tools()
49
+ print(f"✅ Available tools ({len(tools.tools)}): {[tool.name for tool in tools.tools]}")
50
+
51
+ resources = await filtered.list_resources()
52
+ resource_list = resources.get("creativity", [])
53
+ print(f"📚 Available resources ({len(resource_list)}): {resource_list}")
54
+
55
+ prompts = await filtered.list_prompts()
56
+ prompt_list = prompts.get("creativity", [])
57
+ prompt_names = [p.name for p in prompt_list]
58
+ print(f"💬 Available prompts ({len(prompt_names)}): {prompt_names}")
59
+
60
+ # Show unfiltered agent capabilities
61
+ print("\n🌐 UNFILTERED AGENT:")
62
+ unfiltered = agent._agent("unfiltered_agent")
63
+
64
+ tools = await unfiltered.list_tools()
65
+ print(f"✅ Available tools ({len(tools.tools)}): {[tool.name for tool in tools.tools]}")
66
+
67
+ resources = await unfiltered.list_resources()
68
+ resource_list = resources.get("creativity", [])
69
+ print(f"📚 Available resources ({len(resource_list)}): {resource_list}")
70
+
71
+ prompts = await unfiltered.list_prompts()
72
+ prompt_list = prompts.get("creativity", [])
73
+ prompt_names = [p.name for p in prompt_list]
74
+ print(f"💬 Available prompts ({len(prompt_names)}): {prompt_names}")
75
+
76
+ print("\n" + "=" * 50)
77
+ print("🚀 Starting interactive session with filtered agent...")
78
+ print("Type 'exit' to quit")
79
+
80
+ await agent.interactive(agent_name="filtered_agent")
81
+
82
+ except PromptExitError:
83
+ print("👋 Goodbye!")
84
+
85
+ except KeyboardInterrupt:
86
+ print("\nExiting...")
87
+ sys.exit(0)
88
+ except Exception as e:
89
+ print(f"Error: {e}")
90
+ import traceback
91
+ traceback.print_exc()
92
+ sys.exit(1)
93
+
94
+
95
+ if __name__ == "__main__":
96
+ asyncio.run(main())
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fast-agent-mcp"
3
- version = "0.2.41"
3
+ version = "0.2.42"
4
4
  description = "Define, Prompt and Test MCP enabled Agents and Workflows"
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
@@ -26,6 +26,7 @@ dependencies = [
26
26
  "anthropic>=0.55.0",
27
27
  "openai>=1.93.0",
28
28
  "azure-identity>=1.14.0",
29
+ "boto3>=1.35.0",
29
30
  "prompt-toolkit>=3.0.50",
30
31
  "aiohttp>=3.11.13",
31
32
  "opentelemetry-instrumentation-openai>=0.40.14; python_version >= '3.10' and python_version < '4.0'",
@@ -6,6 +6,7 @@ and delegates operations to an attached AugmentedLLMProtocol instance.
6
6
  """
7
7
 
8
8
  import asyncio
9
+ import fnmatch
9
10
  import uuid
10
11
  from typing import (
11
12
  TYPE_CHECKING,
@@ -13,6 +14,7 @@ from typing import (
13
14
  Callable,
14
15
  Dict,
15
16
  List,
17
+ Mapping,
16
18
  Optional,
17
19
  Tuple,
18
20
  Type,
@@ -325,9 +327,29 @@ class BaseAgent(MCPAggregator, AgentProtocol):
325
327
  self.logger.debug("Received human input signal", data=result)
326
328
  return result
327
329
 
330
+ def _matches_pattern(self, name: str, pattern: str, server_name: str) -> bool:
331
+ """
332
+ Check if a name matches a pattern for a specific server.
333
+
334
+ Args:
335
+ name: The name to match (could be tool name, resource URI, or prompt name)
336
+ pattern: The pattern to match against (e.g., "add", "math*", "resource://math/*")
337
+ server_name: The server name (used for tool name prefixing)
338
+
339
+ Returns:
340
+ True if the name matches the pattern
341
+ """
342
+ # For tools, build the full pattern with server prefix: server_name-pattern
343
+ if name.startswith(f"{server_name}-"):
344
+ full_pattern = f"{server_name}-{pattern}"
345
+ return fnmatch.fnmatch(name, full_pattern)
346
+
347
+ # For resources and prompts, match directly against the pattern
348
+ return fnmatch.fnmatch(name, pattern)
349
+
328
350
  async def list_tools(self) -> ListToolsResult:
329
351
  """
330
- List all tools available to this agent.
352
+ List all tools available to this agent, filtered by configuration.
331
353
 
332
354
  Returns:
333
355
  ListToolsResult with available tools
@@ -335,8 +357,26 @@ class BaseAgent(MCPAggregator, AgentProtocol):
335
357
  if not self.initialized:
336
358
  await self.initialize()
337
359
 
360
+ # Get all tools from the parent class
338
361
  result = await super().list_tools()
339
362
 
363
+ # Apply filtering if tools are specified in config
364
+ if self.config.tools is not None:
365
+ filtered_tools = []
366
+ for tool in result.tools:
367
+ # Extract server name from tool name (e.g., "mathematics-add" -> "mathematics")
368
+ if '-' in tool.name:
369
+ server_name = tool.name.split('-', 1)[0]
370
+
371
+ # Check if this server has tool filters
372
+ if server_name in self.config.tools:
373
+ # Check if tool matches any pattern for this server
374
+ for pattern in self.config.tools[server_name]:
375
+ if self._matches_pattern(tool.name, pattern, server_name):
376
+ filtered_tools.append(tool)
377
+ break
378
+ result.tools = filtered_tools
379
+
340
380
  if not self.human_input_callback:
341
381
  return result
342
382
 
@@ -635,6 +675,76 @@ class BaseAgent(MCPAggregator, AgentProtocol):
635
675
  response = await self.generate(prompts, request_params)
636
676
  return response.first_text()
637
677
 
678
+ async def list_prompts(self, server_name: str | None = None) -> Mapping[str, List[Prompt]]:
679
+ """
680
+ List all prompts available to this agent, filtered by configuration.
681
+
682
+ Args:
683
+ server_name: Optional server name to list prompts from
684
+
685
+ Returns:
686
+ Dictionary mapping server names to lists of Prompt objects
687
+ """
688
+ if not self.initialized:
689
+ await self.initialize()
690
+
691
+ # Get all prompts from the parent class
692
+ result = await super().list_prompts(server_name)
693
+
694
+ # Apply filtering if prompts are specified in config
695
+ if self.config.prompts is not None:
696
+ filtered_result = {}
697
+ for server, prompts in result.items():
698
+ # Check if this server has prompt filters
699
+ if server in self.config.prompts:
700
+ filtered_prompts = []
701
+ for prompt in prompts:
702
+ # Check if prompt matches any pattern for this server
703
+ for pattern in self.config.prompts[server]:
704
+ if self._matches_pattern(prompt.name, pattern, server):
705
+ filtered_prompts.append(prompt)
706
+ break
707
+ if filtered_prompts:
708
+ filtered_result[server] = filtered_prompts
709
+ result = filtered_result
710
+
711
+ return result
712
+
713
+ async def list_resources(self, server_name: str | None = None) -> Dict[str, List[str]]:
714
+ """
715
+ List all resources available to this agent, filtered by configuration.
716
+
717
+ Args:
718
+ server_name: Optional server name to list resources from
719
+
720
+ Returns:
721
+ Dictionary mapping server names to lists of resource URIs
722
+ """
723
+ if not self.initialized:
724
+ await self.initialize()
725
+
726
+ # Get all resources from the parent class
727
+ result = await super().list_resources(server_name)
728
+
729
+ # Apply filtering if resources are specified in config
730
+ if self.config.resources is not None:
731
+ filtered_result = {}
732
+ for server, resources in result.items():
733
+ # Check if this server has resource filters
734
+ if server in self.config.resources:
735
+ filtered_resources = []
736
+ for resource in resources:
737
+ # Check if resource matches any pattern for this server
738
+ for pattern in self.config.resources[server]:
739
+ if self._matches_pattern(resource, pattern, server):
740
+ filtered_resources.append(resource)
741
+ break
742
+ if filtered_resources:
743
+ filtered_result[server] = filtered_resources
744
+ result = filtered_result
745
+
746
+ return result
747
+
638
748
  @property
639
749
  def agent_type(self) -> AgentType:
640
750
  """
@@ -253,6 +253,20 @@ class TensorZeroSettings(BaseModel):
253
253
  model_config = ConfigDict(extra="allow", arbitrary_types_allowed=True)
254
254
 
255
255
 
256
+ class BedrockSettings(BaseModel):
257
+ """
258
+ Settings for using AWS Bedrock models in the fast-agent application.
259
+ """
260
+
261
+ region: str | None = None
262
+ """AWS region for Bedrock service"""
263
+
264
+ profile: str | None = None
265
+ """AWS profile to use for authentication"""
266
+
267
+ model_config = ConfigDict(extra="allow", arbitrary_types_allowed=True)
268
+
269
+
256
270
  class HuggingFaceSettings(BaseModel):
257
271
  """
258
272
  Settings for HuggingFace authentication (used for MCP connections).
@@ -419,6 +433,9 @@ class Settings(BaseSettings):
419
433
  aliyun: OpenAISettings | None = None
420
434
  """Settings for using Aliyun OpenAI Service in the fast-agent application"""
421
435
 
436
+ bedrock: BedrockSettings | None = None
437
+ """Settings for using AWS Bedrock models in the fast-agent application"""
438
+
422
439
  huggingface: HuggingFaceSettings | None = None
423
440
  """Settings for HuggingFace authentication (used for MCP connections)"""
424
441
 
@@ -4,7 +4,7 @@ Type definitions for agents and agent configurations.
4
4
 
5
5
  from dataclasses import dataclass, field
6
6
  from enum import Enum
7
- from typing import List
7
+ from typing import Dict, List, Optional
8
8
 
9
9
  from mcp.client.session import ElicitationFnT
10
10
 
@@ -31,6 +31,9 @@ class AgentConfig:
31
31
  name: str
32
32
  instruction: str = "You are a helpful agent."
33
33
  servers: List[str] = field(default_factory=list)
34
+ tools: Optional[Dict[str, List[str]]] = None
35
+ resources: Optional[Dict[str, List[str]]] = None
36
+ prompts: Optional[Dict[str, List[str]]] = None
34
37
  model: str | None = None
35
38
  use_history: bool = True
36
39
  default_request_params: RequestParams | None = None
@@ -9,6 +9,7 @@ from functools import wraps
9
9
  from typing import (
10
10
  Awaitable,
11
11
  Callable,
12
+ Dict,
12
13
  List,
13
14
  Literal,
14
15
  Optional,
@@ -93,6 +94,9 @@ def _decorator_impl(
93
94
  request_params: RequestParams | None = None,
94
95
  human_input: bool = False,
95
96
  default: bool = False,
97
+ tools: Optional[Dict[str, List[str]]] = None,
98
+ resources: Optional[Dict[str, List[str]]] = None,
99
+ prompts: Optional[Dict[str, List[str]]] = None,
96
100
  **extra_kwargs,
97
101
  ) -> Callable[[AgentCallable[P, R]], DecoratedAgentProtocol[P, R]]:
98
102
  """
@@ -133,6 +137,9 @@ def _decorator_impl(
133
137
  name=name,
134
138
  instruction=instruction,
135
139
  servers=servers,
140
+ tools=tools,
141
+ resources=resources,
142
+ prompts=prompts,
136
143
  model=model,
137
144
  use_history=use_history,
138
145
  human_input=human_input,
@@ -177,6 +184,9 @@ def agent(
177
184
  *,
178
185
  instruction: str = "You are a helpful agent.",
179
186
  servers: List[str] = [],
187
+ tools: Optional[Dict[str, List[str]]] = None,
188
+ resources: Optional[Dict[str, List[str]]] = None,
189
+ prompts: Optional[Dict[str, List[str]]] = None,
180
190
  model: Optional[str] = None,
181
191
  use_history: bool = True,
182
192
  request_params: RequestParams | None = None,
@@ -193,12 +203,16 @@ def agent(
193
203
  instruction_or_kwarg: Optional positional parameter for instruction
194
204
  instruction: Base instruction for the agent (keyword arg)
195
205
  servers: List of server names the agent should connect to
206
+ tools: Optional list of tool names or patterns to include
207
+ resources: Optional list of resource names or patterns to include
208
+ prompts: Optional list of prompt names or patterns to include
196
209
  model: Model specification string
197
210
  use_history: Whether to maintain conversation history
198
211
  request_params: Additional request parameters for the LLM
199
212
  human_input: Whether to enable human input capabilities
200
213
  default: Whether to mark this as the default agent
201
214
  elicitation_handler: Custom elicitation handler function (ElicitationFnT)
215
+ api_key: Optional API key for the LLM provider
202
216
 
203
217
  Returns:
204
218
  A decorator that registers the agent with proper type annotations
@@ -217,6 +231,9 @@ def agent(
217
231
  human_input=human_input,
218
232
  default=default,
219
233
  elicitation_handler=elicitation_handler,
234
+ tools=tools,
235
+ resources=resources,
236
+ prompts=prompts,
220
237
  api_key=api_key,
221
238
  )
222
239
 
@@ -229,6 +246,9 @@ def custom(
229
246
  *,
230
247
  instruction: str = "You are a helpful agent.",
231
248
  servers: List[str] = [],
249
+ tools: Optional[Dict[str, List[str]]] = None,
250
+ resources: Optional[Dict[str, List[str]]] = None,
251
+ prompts: Optional[Dict[str, List[str]]] = None,
232
252
  model: Optional[str] = None,
233
253
  use_history: bool = True,
234
254
  request_params: RequestParams | None = None,
@@ -270,6 +290,9 @@ def custom(
270
290
  default=default,
271
291
  elicitation_handler=elicitation_handler,
272
292
  api_key=api_key,
293
+ tools=tools,
294
+ resources=resources,
295
+ prompts=prompts,
273
296
  )
274
297
 
275
298
 
@@ -344,6 +367,9 @@ def router(
344
367
  agents: List[str],
345
368
  instruction: Optional[str] = None,
346
369
  servers: List[str] = [],
370
+ tools: Optional[Dict[str, List[str]]] = None,
371
+ resources: Optional[Dict[str, List[str]]] = None,
372
+ prompts: Optional[Dict[str, List[str]]] = None,
347
373
  model: Optional[str] = None,
348
374
  use_history: bool = False,
349
375
  request_params: RequestParams | None = None,
@@ -392,6 +418,9 @@ def router(
392
418
  router_agents=agents,
393
419
  elicitation_handler=elicitation_handler,
394
420
  api_key=api_key,
421
+ tools=tools,
422
+ prompts=prompts,
423
+ resources=resources,
395
424
  ),
396
425
  )
397
426
 
@@ -68,6 +68,9 @@ async def _display_agent_info_helper(agent_name: str, agent_provider: object) ->
68
68
  len(tools_result.tools) if tools_result and hasattr(tools_result, "tools") else 0
69
69
  )
70
70
 
71
+ resources_dict = await agent.list_resources()
72
+ resource_count = sum(len(resources) for resources in resources_dict.values()) if resources_dict else 0
73
+
71
74
  prompts_dict = await agent.list_prompts()
72
75
  prompt_count = sum(len(prompts) for prompts in prompts_dict.values()) if prompts_dict else 0
73
76
 
@@ -104,10 +107,11 @@ async def _display_agent_info_helper(agent_name: str, agent_provider: object) ->
104
107
  # Pluralization helpers
105
108
  server_word = "Server" if server_count == 1 else "Servers"
106
109
  tool_word = "tool" if tool_count == 1 else "tools"
110
+ resource_word = "resource" if resource_count == 1 else "resources"
107
111
  prompt_word = "prompt" if prompt_count == 1 else "prompts"
108
112
 
109
113
  rich_print(
110
- f"[dim]Agent [/dim][blue]{agent_name}[/blue][dim]:[/dim] {server_count:,}[dim] MCP {server_word}, [/dim]{tool_count:,}[dim] {tool_word}, [/dim]{prompt_count:,}[dim] {prompt_word} available[/dim]"
114
+ f"[dim]Agent [/dim][blue]{agent_name}[/blue][dim]:[/dim] {server_count:,}[dim] MCP {server_word}, [/dim]{tool_count:,}[dim] {tool_word}, [/dim]{resource_count:,}[dim] {resource_word}, [/dim]{prompt_count:,}[dim] {prompt_word} available[/dim]"
111
115
  )
112
116
 
113
117
  # Mark as shown
@@ -221,6 +225,9 @@ async def _display_child_agent_info(child_agent, prefix: str, agent_provider) ->
221
225
  len(tools_result.tools) if tools_result and hasattr(tools_result, "tools") else 0
222
226
  )
223
227
 
228
+ resources_dict = await child_agent.list_resources()
229
+ resource_count = sum(len(resources) for resources in resources_dict.values()) if resources_dict else 0
230
+
224
231
  prompts_dict = await child_agent.list_prompts()
225
232
  prompt_count = sum(len(prompts) for prompts in prompts_dict.values()) if prompts_dict else 0
226
233
 
@@ -229,10 +236,11 @@ async def _display_child_agent_info(child_agent, prefix: str, agent_provider) ->
229
236
  # Pluralization helpers
230
237
  server_word = "Server" if server_count == 1 else "Servers"
231
238
  tool_word = "tool" if tool_count == 1 else "tools"
239
+ resource_word = "resource" if resource_count == 1 else "resources"
232
240
  prompt_word = "prompt" if prompt_count == 1 else "prompts"
233
241
 
234
242
  rich_print(
235
- f"[dim] {prefix} [/dim][blue]{child_agent.name}[/blue][dim]:[/dim] {server_count:,}[dim] MCP {server_word}, [/dim]{tool_count:,}[dim] {tool_word}, [/dim]{prompt_count:,}[dim] {prompt_word} available[/dim]"
243
+ f"[dim] {prefix} [/dim][blue]{child_agent.name}[/blue][dim]:[/dim] {server_count:,}[dim] MCP {server_word}, [/dim]{tool_count:,}[dim] {tool_word}, [/dim]{resource_count:,}[dim] {resource_word}, [/dim]{prompt_count:,}[dim] {prompt_word} available[/dim]"
236
244
  )
237
245
  else:
238
246
  # Show child even without MCP servers for context