fast-agent-mcp 0.3.1__tar.gz → 0.3.3__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 (285) hide show
  1. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/PKG-INFO +1 -1
  2. fast_agent_mcp-0.3.3/examples/fastapi/fastapi-advanced.py +51 -0
  3. fast_agent_mcp-0.3.3/examples/fastapi/fastapi-simple.py +43 -0
  4. fast_agent_mcp-0.3.3/examples/fastapi/pyproject.toml +17 -0
  5. fast_agent_mcp-0.3.3/examples/fastapi/readme.md +6 -0
  6. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/pyproject.toml +1 -1
  7. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/__init__.py +6 -0
  8. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/agents/llm_decorator.py +2 -1
  9. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/agents/mcp_agent.py +1 -5
  10. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/agents/tool_agent.py +4 -1
  11. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/agents/workflow/orchestrator_models.py +1 -1
  12. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/cli/commands/url_parser.py +3 -3
  13. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/cli/main.py +7 -1
  14. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/config.py +2 -0
  15. fast_agent_mcp-0.3.3/src/fast_agent/core/__init__.py +91 -0
  16. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/direct_decorators.py +85 -103
  17. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/error_handling.py +1 -1
  18. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/fastagent.py +161 -15
  19. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/logging/events.py +4 -9
  20. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/prompt_utils.py +10 -4
  21. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/anthropic/llm_anthropic.py +16 -5
  22. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/bedrock/llm_bedrock.py +13 -5
  23. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/google/llm_google_native.py +13 -2
  24. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/openai/llm_openai.py +22 -13
  25. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/ui/rich_progress.py +8 -6
  26. fast_agent_mcp-0.3.1/src/fast_agent/core/__init__.py +0 -52
  27. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/.gitignore +0 -0
  28. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/LICENSE +0 -0
  29. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/README.md +0 -0
  30. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/azure-openai/fastagent.config.yaml +0 -0
  31. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/bedrock/fast-agent.config.yaml +0 -0
  32. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/custom-agents/agent.py +0 -0
  33. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/custom-agents/fastagent.config.yaml +0 -0
  34. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/data-analysis/analysis-campaign.py +0 -0
  35. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/data-analysis/analysis.py +0 -0
  36. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/data-analysis/fastagent.config.yaml +0 -0
  37. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
  38. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/elicitations/elicitation_account_server.py +0 -0
  39. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/elicitations/elicitation_forms_server.py +0 -0
  40. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/elicitations/elicitation_game_server.py +0 -0
  41. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/elicitations/fastagent.config.yaml +0 -0
  42. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/elicitations/fastagent.secrets.yaml.example +0 -0
  43. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/elicitations/forms_demo.py +0 -0
  44. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/elicitations/game_character.py +0 -0
  45. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/elicitations/game_character_handler.py +0 -0
  46. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/elicitations/tool_call.py +0 -0
  47. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/mcp-filtering/fastagent.config.yaml +0 -0
  48. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/mcp-filtering/fastagent.secrets.yaml.example +0 -0
  49. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/mcp-filtering/mcp_server.py +0 -0
  50. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/mcp-filtering/test_mcp_filtering.py +0 -0
  51. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/state-transfer/agent_one.py +0 -0
  52. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/state-transfer/agent_two.py +0 -0
  53. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
  54. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
  55. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/vision-examples/cat.png +0 -0
  56. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/vision-examples/example1.py +0 -0
  57. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/vision-examples/example2.py +0 -0
  58. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/vision-examples/example3.py +0 -0
  59. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/mcp/vision-examples/fastagent.config.yaml +0 -0
  60. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/new-api/display_check.py +0 -0
  61. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/new-api/simple_llm.py +0 -0
  62. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/new-api/simple_llm_advanced.py +0 -0
  63. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/new-api/simple_mcp.py +0 -0
  64. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/otel/agent.py +0 -0
  65. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/otel/agent2.py +0 -0
  66. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/otel/docker-compose.yaml +0 -0
  67. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/otel/fastagent.config.yaml +0 -0
  68. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/researcher/fastagent.config.yaml +0 -0
  69. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/researcher/researcher-eval.py +0 -0
  70. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/researcher/researcher-imp.py +0 -0
  71. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/researcher/researcher.py +0 -0
  72. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/setup/.gitignore +0 -0
  73. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/setup/agent.py +0 -0
  74. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/setup/fastagent.config.yaml +0 -0
  75. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/setup/fastagent.secrets.yaml.example +0 -0
  76. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/setup/pyproject.toml.tmpl +0 -0
  77. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/tensorzero/.env.sample +0 -0
  78. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/tensorzero/Makefile +0 -0
  79. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/tensorzero/README.md +0 -0
  80. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/tensorzero/agent.py +0 -0
  81. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/tensorzero/demo_images/clam.jpg +0 -0
  82. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/tensorzero/demo_images/crab.png +0 -0
  83. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/tensorzero/demo_images/shrimp.png +0 -0
  84. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/tensorzero/docker-compose.yml +0 -0
  85. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/tensorzero/fastagent.config.yaml +0 -0
  86. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/tensorzero/image_demo.py +0 -0
  87. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/tensorzero/mcp_server/Dockerfile +0 -0
  88. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/tensorzero/mcp_server/entrypoint.sh +0 -0
  89. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/tensorzero/mcp_server/mcp_server.py +0 -0
  90. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/tensorzero/mcp_server/pyproject.toml +0 -0
  91. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/tensorzero/simple_agent.py +0 -0
  92. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/tensorzero/tensorzero_config/system_schema.json +0 -0
  93. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/tensorzero/tensorzero_config/system_template.minijinja +0 -0
  94. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/tensorzero/tensorzero_config/tensorzero.toml +0 -0
  95. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/workflows/chaining.py +0 -0
  96. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/workflows/evaluator.py +0 -0
  97. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/workflows/fastagent.config.yaml +0 -0
  98. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/workflows/graded_report.md +0 -0
  99. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/workflows/human_input.py +0 -0
  100. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/workflows/orchestrator.py +0 -0
  101. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/workflows/parallel.py +0 -0
  102. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/workflows/router.py +0 -0
  103. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/workflows/short_story.md +0 -0
  104. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/examples/workflows/short_story.txt +0 -0
  105. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/hatch_build.py +0 -0
  106. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/agents/__init__.py +0 -0
  107. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/agents/agent_types.py +0 -0
  108. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/agents/llm_agent.py +0 -0
  109. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/agents/workflow/chain_agent.py +0 -0
  110. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/agents/workflow/evaluator_optimizer.py +0 -0
  111. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/agents/workflow/iterative_planner.py +0 -0
  112. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/agents/workflow/orchestrator_prompts.py +0 -0
  113. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/agents/workflow/parallel_agent.py +0 -0
  114. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/agents/workflow/router_agent.py +0 -0
  115. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/cli/__init__.py +0 -0
  116. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/cli/__main__.py +0 -0
  117. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/cli/commands/check_config.py +0 -0
  118. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/cli/commands/go.py +0 -0
  119. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/cli/commands/quickstart.py +0 -0
  120. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/cli/commands/server_helpers.py +0 -0
  121. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/cli/commands/setup.py +0 -0
  122. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/cli/constants.py +0 -0
  123. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/cli/terminal.py +0 -0
  124. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/constants.py +0 -0
  125. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/context.py +0 -0
  126. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/context_dependent.py +0 -0
  127. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/agent_app.py +0 -0
  128. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/core_app.py +0 -0
  129. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/direct_factory.py +0 -0
  130. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/exceptions.py +0 -0
  131. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/executor/__init__.py +0 -0
  132. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/executor/executor.py +0 -0
  133. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/executor/task_registry.py +0 -0
  134. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/executor/workflow_signal.py +0 -0
  135. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/logging/__init__.py +0 -0
  136. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/logging/json_serializer.py +0 -0
  137. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/logging/listeners.py +0 -0
  138. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/logging/logger.py +0 -0
  139. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/logging/transport.py +0 -0
  140. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/prompt.py +0 -0
  141. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/core/validation.py +0 -0
  142. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/event_progress.py +0 -0
  143. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/history/history_exporter.py +0 -0
  144. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/human_input/__init__.py +0 -0
  145. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/human_input/elicitation_handler.py +0 -0
  146. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/human_input/elicitation_state.py +0 -0
  147. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/human_input/form_fields.py +0 -0
  148. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/human_input/simple_form.py +0 -0
  149. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/human_input/types.py +0 -0
  150. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/interfaces.py +0 -0
  151. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/__init__.py +0 -0
  152. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/fastagent_llm.py +0 -0
  153. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/internal/passthrough.py +0 -0
  154. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/internal/playback.py +0 -0
  155. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/internal/silent.py +0 -0
  156. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/internal/slow.py +0 -0
  157. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/memory.py +0 -0
  158. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/model_database.py +0 -0
  159. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/model_factory.py +0 -0
  160. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/model_info.py +0 -0
  161. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/anthropic/anthropic_utils.py +0 -0
  162. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/anthropic/multipart_converter_anthropic.py +0 -0
  163. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/bedrock/bedrock_utils.py +0 -0
  164. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/google/google_converter.py +0 -0
  165. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/openai/llm_aliyun.py +0 -0
  166. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/openai/llm_azure.py +0 -0
  167. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/openai/llm_deepseek.py +0 -0
  168. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/openai/llm_generic.py +0 -0
  169. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/openai/llm_google_oai.py +0 -0
  170. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/openai/llm_groq.py +0 -0
  171. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/openai/llm_openrouter.py +0 -0
  172. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/openai/llm_tensorzero_openai.py +0 -0
  173. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/openai/llm_xai.py +0 -0
  174. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/openai/multipart_converter_openai.py +0 -0
  175. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/openai/openai_multipart.py +0 -0
  176. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider/openai/openai_utils.py +0 -0
  177. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider_key_manager.py +0 -0
  178. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/provider_types.py +0 -0
  179. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/request_params.py +0 -0
  180. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/sampling_converter.py +0 -0
  181. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/llm/usage_tracking.py +0 -0
  182. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/__init__.py +0 -0
  183. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/common.py +0 -0
  184. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/elicitation_factory.py +0 -0
  185. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/elicitation_handlers.py +0 -0
  186. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/gen_client.py +0 -0
  187. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/helpers/__init__.py +0 -0
  188. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/helpers/content_helpers.py +0 -0
  189. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/helpers/server_config_helpers.py +0 -0
  190. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/hf_auth.py +0 -0
  191. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/interfaces.py +0 -0
  192. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/logger_textio.py +0 -0
  193. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/mcp_agent_client_session.py +0 -0
  194. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/mcp_aggregator.py +0 -0
  195. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/mcp_connection_manager.py +0 -0
  196. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/mcp_content.py +0 -0
  197. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/mime_utils.py +0 -0
  198. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/prompt.py +0 -0
  199. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/prompt_message_extended.py +0 -0
  200. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/prompt_render.py +0 -0
  201. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/prompt_serialization.py +0 -0
  202. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/prompts/__init__.py +0 -0
  203. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/prompts/__main__.py +0 -0
  204. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/prompts/prompt_constants.py +0 -0
  205. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/prompts/prompt_helpers.py +0 -0
  206. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/prompts/prompt_load.py +0 -0
  207. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/prompts/prompt_server.py +0 -0
  208. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/prompts/prompt_template.py +0 -0
  209. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/resource_utils.py +0 -0
  210. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/sampling.py +0 -0
  211. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/server/__init__.py +0 -0
  212. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/server/agent_server.py +0 -0
  213. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/ui_agent.py +0 -0
  214. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp/ui_mixin.py +0 -0
  215. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/mcp_server_registry.py +0 -0
  216. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/py.typed +0 -0
  217. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/data-analysis/analysis-campaign.py +0 -0
  218. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/data-analysis/analysis.py +0 -0
  219. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/data-analysis/fastagent.config.yaml +0 -0
  220. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
  221. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/mcp/elicitations/elicitation_account_server.py +0 -0
  222. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/mcp/elicitations/elicitation_forms_server.py +0 -0
  223. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/mcp/elicitations/elicitation_game_server.py +0 -0
  224. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/mcp/elicitations/fastagent.config.yaml +0 -0
  225. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/mcp/elicitations/fastagent.secrets.yaml.example +0 -0
  226. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/mcp/elicitations/forms_demo.py +0 -0
  227. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/mcp/elicitations/game_character.py +0 -0
  228. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/mcp/elicitations/game_character_handler.py +0 -0
  229. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/mcp/elicitations/tool_call.py +0 -0
  230. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/mcp/state-transfer/agent_one.py +0 -0
  231. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/mcp/state-transfer/agent_two.py +0 -0
  232. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
  233. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
  234. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/researcher/fastagent.config.yaml +0 -0
  235. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/researcher/researcher-eval.py +0 -0
  236. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/researcher/researcher-imp.py +0 -0
  237. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/researcher/researcher.py +0 -0
  238. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/.env.sample +0 -0
  239. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/Makefile +0 -0
  240. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/README.md +0 -0
  241. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/agent.py +0 -0
  242. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/demo_images/clam.jpg +0 -0
  243. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/demo_images/crab.png +0 -0
  244. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/demo_images/shrimp.png +0 -0
  245. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/docker-compose.yml +0 -0
  246. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/fastagent.config.yaml +0 -0
  247. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/image_demo.py +0 -0
  248. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/mcp_server/.python-version +0 -0
  249. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/mcp_server/Dockerfile +0 -0
  250. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/mcp_server/entrypoint.sh +0 -0
  251. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/mcp_server/mcp_server.py +0 -0
  252. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/mcp_server/pyproject.toml +0 -0
  253. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/simple_agent.py +0 -0
  254. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/tensorzero_config/system_schema.json +0 -0
  255. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/tensorzero_config/system_template.minijinja +0 -0
  256. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/tensorzero/tensorzero_config/tensorzero.toml +0 -0
  257. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/workflows/chaining.py +0 -0
  258. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/workflows/evaluator.py +0 -0
  259. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/workflows/fastagent.config.yaml +0 -0
  260. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/workflows/graded_report.md +0 -0
  261. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/workflows/human_input.py +0 -0
  262. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/workflows/orchestrator.py +0 -0
  263. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/workflows/parallel.py +0 -0
  264. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/workflows/router.py +0 -0
  265. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/workflows/short_story.md +0 -0
  266. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/examples/workflows/short_story.txt +0 -0
  267. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/setup/.gitignore +0 -0
  268. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/setup/agent.py +0 -0
  269. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/setup/fastagent.config.yaml +0 -0
  270. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/setup/fastagent.secrets.yaml.example +0 -0
  271. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/resources/setup/pyproject.toml.tmpl +0 -0
  272. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/tools/elicitation.py +0 -0
  273. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/types/__init__.py +0 -0
  274. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/types/llm_stop_reason.py +0 -0
  275. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/ui/__init__.py +0 -0
  276. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/ui/console.py +0 -0
  277. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/ui/console_display.py +0 -0
  278. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/ui/elicitation_form.py +0 -0
  279. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/ui/elicitation_style.py +0 -0
  280. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/ui/enhanced_prompt.py +0 -0
  281. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/ui/interactive_prompt.py +0 -0
  282. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/ui/mcp_ui_utils.py +0 -0
  283. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/ui/mermaid_utils.py +0 -0
  284. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/ui/progress_display.py +0 -0
  285. {fast_agent_mcp-0.3.1 → fast_agent_mcp-0.3.3}/src/fast_agent/ui/usage_display.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fast-agent-mcp
3
- Version: 0.3.1
3
+ Version: 0.3.3
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
@@ -0,0 +1,51 @@
1
+ from contextlib import asynccontextmanager
2
+
3
+ from fastapi import Body, FastAPI, HTTPException
4
+
5
+ from fast_agent.agents.agent_types import AgentConfig
6
+ from fast_agent.agents.mcp_agent import McpAgent
7
+ from fast_agent.core import Core
8
+ from fast_agent.core.direct_factory import get_model_factory
9
+ from fast_agent.mcp import PromptMessageExtended
10
+
11
+ core = Core(name="fast-agent core")
12
+
13
+
14
+ @asynccontextmanager
15
+ async def lifespan(app: FastAPI):
16
+ # Manual lifecycle control: initialize Core and Agent explicitly
17
+ await core.initialize()
18
+
19
+ cfg = AgentConfig(
20
+ name="core_agent",
21
+ instruction="You are a helpful AI Agent.",
22
+ )
23
+
24
+ agent = McpAgent(config=cfg, context=core.context)
25
+ await agent.initialize()
26
+
27
+ llm_factory = get_model_factory(core.context, model=cfg.model)
28
+ await agent.attach_llm(llm_factory)
29
+
30
+ app.state.agent = agent
31
+ try:
32
+ yield
33
+ finally:
34
+ # Manual shutdown/cleanup
35
+ try:
36
+ await agent.shutdown()
37
+ finally:
38
+ await core.cleanup()
39
+
40
+
41
+ app = FastAPI(lifespan=lifespan)
42
+
43
+
44
+ @app.post("/ask", response_model=PromptMessageExtended)
45
+ async def ask(body: str = Body(..., media_type="text/plain")) -> PromptMessageExtended:
46
+ try:
47
+ # Call generate() to return the full multipart message (BaseModel)
48
+ result = await app.state.agent.generate(body)
49
+ return result
50
+ except Exception as e:
51
+ raise HTTPException(status_code=500, detail=str(e))
@@ -0,0 +1,43 @@
1
+ from contextlib import asynccontextmanager
2
+
3
+ from fastapi import FastAPI, HTTPException
4
+ from pydantic import BaseModel
5
+
6
+ from fast_agent.core.fastagent import FastAgent
7
+
8
+ # Create FastAgent without parsing CLI args (plays nice with uvicorn)
9
+ fast = FastAgent("fast-agent demo", parse_cli_args=False, quiet=True)
10
+
11
+
12
+ # Register a simple default agent via decorator
13
+ @fast.agent(name="helper", instruction="You are a helpful AI Agent.", default=True)
14
+ async def decorator():
15
+ pass
16
+
17
+
18
+ # Keep FastAgent running for the app lifetime
19
+ @asynccontextmanager
20
+ async def lifespan(app: FastAPI):
21
+ async with fast.run() as agents:
22
+ app.state.agents = agents
23
+ yield
24
+
25
+
26
+ app = FastAPI(lifespan=lifespan)
27
+
28
+
29
+ class AskRequest(BaseModel):
30
+ message: str
31
+
32
+
33
+ class AskResponse(BaseModel):
34
+ response: str
35
+
36
+
37
+ @app.post("/ask", response_model=AskResponse)
38
+ async def ask(req: AskRequest) -> AskResponse:
39
+ try:
40
+ result = await app.state.agents.send(req.message)
41
+ return AskResponse(response=result)
42
+ except Exception as e:
43
+ raise HTTPException(status_code=500, detail=str(e))
@@ -0,0 +1,17 @@
1
+ [project]
2
+ name = "fast-agent-app"
3
+ version = "0.1.0"
4
+ description = "a simple fast-agent application"
5
+ readme = "README.md"
6
+ requires-python = ">=3.13.7"
7
+ dependencies = [
8
+ "fast-agent-mcp",
9
+ "fastapi>=0.116.1",
10
+ ]
11
+
12
+ [tool.uv]
13
+ package = true
14
+
15
+ # Optional convenience entry point if you later package this app:
16
+ [project.scripts]
17
+ fast-agent-app = "agent:main"
@@ -0,0 +1,6 @@
1
+ # fastapi demo applications
2
+
3
+ Be sure to `uv pip install fastapi[standard]` to run these examples.
4
+
5
+ - fastapi-simply.py -- uses simple `fast-agent` decorators to integrate with fastapi. run with `fastapi dev fastapi-simple.py`.
6
+ - fastapi-advanced.py -- uses `fast-agent` core library for developer managed lifecycle. run with `fastapi dev fastapi-advanced.py`.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fast-agent-mcp"
3
- version = "0.3.1"
3
+ version = "0.3.3"
4
4
  description = "Define, Prompt and Test MCP enabled Agents and Workflows"
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
@@ -1,4 +1,5 @@
1
1
  """fast-agent - An MCP native agent application framework"""
2
+ from typing import TYPE_CHECKING as _TYPE_CHECKING
2
3
 
3
4
  # Configuration and settings (safe - pure Pydantic models)
4
5
  from fast_agent.config import (
@@ -83,6 +84,11 @@ def __getattr__(name: str):
83
84
  raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
84
85
 
85
86
 
87
+ # Help static analyzers/IDEs resolve symbols and signatures without importing at runtime.
88
+ if _TYPE_CHECKING: # pragma: no cover - typing aid only
89
+ from fast_agent.core.fastagent import FastAgent as FastAgent # noqa: F401
90
+
91
+
86
92
  __all__ = [
87
93
  # Core fast-agent components (lazy loaded)
88
94
  "Core",
@@ -189,6 +189,7 @@ class LlmDecorator(AgentProtocol):
189
189
  Sequence[Union[str, PromptMessage, PromptMessageExtended]],
190
190
  ],
191
191
  request_params: RequestParams | None = None,
192
+ tools: List[Tool] | None = None,
192
193
  ) -> PromptMessageExtended:
193
194
  """
194
195
  Create a completion with the LLM using the provided messages.
@@ -212,7 +213,7 @@ class LlmDecorator(AgentProtocol):
212
213
  multipart_messages = normalize_to_extended_list(messages)
213
214
 
214
215
  with self._tracer.start_as_current_span(f"Agent: '{self._name}' generate"):
215
- return await self.generate_impl(multipart_messages, request_params, None)
216
+ return await self.generate_impl(multipart_messages, request_params, tools)
216
217
 
217
218
  async def generate_impl(
218
219
  self,
@@ -43,7 +43,6 @@ from fast_agent.constants import HUMAN_INPUT_TOOL_NAME
43
43
  from fast_agent.core.exceptions import PromptExitError
44
44
  from fast_agent.core.logging.logger import get_logger
45
45
  from fast_agent.interfaces import FastAgentLLMProtocol
46
- from fast_agent.mcp.helpers.content_helpers import normalize_to_extended_list
47
46
  from fast_agent.mcp.mcp_aggregator import MCPAggregator
48
47
  from fast_agent.tools.elicitation import (
49
48
  get_elicitation_tool,
@@ -624,12 +623,9 @@ class McpAgent(ABC, ToolAgent):
624
623
  Returns:
625
624
  An instance of the specified model, or None if coercion fails
626
625
  """
627
- assert self._llm
628
- # Normalize all input types to a list of PromptMessageExtended
629
- normalized_messages = normalize_to_extended_list(messages)
630
626
 
631
627
  with self._tracer.start_as_current_span(f"Agent: '{self._name}' structured"):
632
- return await self._llm.structured(normalized_messages, model, request_params)
628
+ return await super().structured(messages, model, request_params)
633
629
 
634
630
  async def apply_prompt_messages(
635
631
  self, prompts: List[PromptMessageExtended], request_params: RequestParams | None = None
@@ -97,7 +97,10 @@ class ToolAgent(LlmAgent):
97
97
  )
98
98
 
99
99
  if LlmStopReason.TOOL_USE == result.stop_reason:
100
- messages = [await self.run_tools(result)]
100
+ if self.config.use_history:
101
+ messages = [await self.run_tools(result)]
102
+ else:
103
+ messages.extend([result, await self.run_tools(result)])
101
104
  else:
102
105
  break
103
106
 
@@ -72,7 +72,7 @@ class TaskWithResult(Task):
72
72
  class StepResult(BaseModel):
73
73
  """Result of executing a step"""
74
74
 
75
- step: Step = Field(description="The step that was executed", default_factory=Step)
75
+ step: Step = Field(description="The step that was executed")
76
76
  task_results: List[TaskWithResult] = Field(
77
77
  description="Results of executing each task", default_factory=list
78
78
  )
@@ -104,7 +104,7 @@ def generate_server_name(url: str) -> str:
104
104
 
105
105
 
106
106
  def parse_server_urls(
107
- urls_param: str, auth_token: str = None
107
+ urls_param: str, auth_token: str | None = None
108
108
  ) -> List[Tuple[str, Literal["http", "sse"], str, Dict[str, str] | None]]:
109
109
  """
110
110
  Parse a comma-separated list of URLs into server configurations.
@@ -155,7 +155,7 @@ def generate_server_configs(
155
155
  Returns:
156
156
  Dictionary of server configurations
157
157
  """
158
- server_configs = {}
158
+ server_configs: Dict[str, Dict[str, str | Dict[str, str]]] = {}
159
159
  # Keep track of server name occurrences to handle collisions
160
160
  name_counts = {}
161
161
 
@@ -178,7 +178,7 @@ def generate_server_configs(
178
178
  final_name = f"{server_name}_{suffix}"
179
179
  name_counts[server_name] += 1
180
180
 
181
- config = {
181
+ config: Dict[str, str | Dict[str, str]] = {
182
182
  "transport": transport_type,
183
183
  "url": url,
184
184
  }
@@ -85,7 +85,13 @@ def main(
85
85
  Use --help with any command for detailed usage information.
86
86
  """
87
87
  application.verbosity = 1 if verbose else 0 if not quiet else -1
88
- application.console = application.console if color else None
88
+ if not color:
89
+ # Recreate consoles without color when --no-color is provided
90
+ from fast_agent.ui.console import console as base_console
91
+ from fast_agent.ui.console import error_console as base_error_console
92
+
93
+ application.console = base_console.__class__(color_system=None)
94
+ application.error_console = base_error_console.__class__(color_system=None, stderr=True)
89
95
 
90
96
  # Handle version flag
91
97
  if version:
@@ -547,6 +547,8 @@ def get_settings(config_path: str | None = None) -> Settings:
547
547
  return _settings
548
548
 
549
549
  # Handle config path - convert string to Path if needed
550
+ config_file: Path | None
551
+ secrets_file: Path | None
550
552
  if config_path:
551
553
  config_file = Path(config_path)
552
554
  # If it's a relative path and doesn't exist, try finding it
@@ -0,0 +1,91 @@
1
+ """
2
+ Core interfaces and decorators for fast-agent.
3
+
4
+ Public API:
5
+ - `Core`: The core application container (eagerly exported)
6
+ - `FastAgent`: High-level, decorator-driven application class (lazy-loaded)
7
+ - Decorators: `agent`, `custom`, `orchestrator`, `iterative_planner`,
8
+ `router`, `chain`, `parallel`, `evaluator_optimizer` (lazy-loaded)
9
+ """
10
+
11
+ from typing import TYPE_CHECKING as _TYPE_CHECKING
12
+
13
+ from .core_app import Core # Eager export for external applications
14
+
15
+ __all__ = [
16
+ "Core",
17
+ "AgentApp",
18
+ "FastAgent",
19
+ # Decorators
20
+ "agent",
21
+ "custom",
22
+ "orchestrator",
23
+ "iterative_planner",
24
+ "router",
25
+ "chain",
26
+ "parallel",
27
+ "evaluator_optimizer",
28
+ ]
29
+
30
+
31
+ def __getattr__(name: str):
32
+ # Lazy imports to avoid heavy dependencies and circular imports at init time
33
+ if name == "FastAgent":
34
+ from .fastagent import FastAgent
35
+
36
+ return FastAgent
37
+ if name == "AgentApp":
38
+ from .agent_app import AgentApp
39
+
40
+ return AgentApp
41
+
42
+ # Decorators from direct_decorators
43
+ if name in {
44
+ "agent",
45
+ "custom",
46
+ "orchestrator",
47
+ "iterative_planner",
48
+ "router",
49
+ "chain",
50
+ "parallel",
51
+ "evaluator_optimizer",
52
+ }:
53
+ from . import direct_decorators as _dd
54
+
55
+ return getattr(_dd, name)
56
+
57
+ raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
58
+
59
+
60
+ # Help static analyzers/IDEs resolve symbols and signatures without importing at runtime.
61
+ if _TYPE_CHECKING: # pragma: no cover - typing aid only
62
+ from .agent_app import AgentApp as AgentApp # noqa: F401
63
+ from .direct_decorators import (
64
+ agent as agent,
65
+ ) # noqa: F401
66
+ from .direct_decorators import (
67
+ chain as chain,
68
+ )
69
+ from .direct_decorators import (
70
+ custom as custom,
71
+ )
72
+ from .direct_decorators import (
73
+ evaluator_optimizer as evaluator_optimizer,
74
+ )
75
+ from .direct_decorators import (
76
+ iterative_planner as iterative_planner,
77
+ )
78
+ from .direct_decorators import (
79
+ orchestrator as orchestrator,
80
+ )
81
+ from .direct_decorators import (
82
+ parallel as parallel,
83
+ )
84
+ from .direct_decorators import (
85
+ router as router,
86
+ )
87
+ from .fastagent import FastAgent as FastAgent # noqa: F401
88
+
89
+
90
+ def __dir__(): # pragma: no cover - developer experience aid
91
+ return sorted(__all__)
@@ -186,7 +186,7 @@ def _decorator_impl(
186
186
  resources: Optional[Dict[str, List[str]]] = None,
187
187
  prompts: Optional[Dict[str, List[str]]] = None,
188
188
  **extra_kwargs,
189
- ) -> Callable[[AgentCallable[P, R]], DecoratedAgentProtocol[P, R]]:
189
+ ) -> Callable[[AgentCallable[P, R]], AgentCallable[P, R]]:
190
190
  """
191
191
  Core implementation for agent decorators with common behavior and type safety.
192
192
 
@@ -203,7 +203,7 @@ def _decorator_impl(
203
203
  **extra_kwargs: Additional agent/workflow-specific parameters
204
204
  """
205
205
 
206
- def decorator(func: AgentCallable[P, R]) -> DecoratedAgentProtocol[P, R]:
206
+ def decorator(func: AgentCallable[P, R]) -> AgentCallable[P, R]:
207
207
  @wraps(func)
208
208
  def wrapper(*args: P.args, **kwargs: P.kwargs) -> Awaitable[R]:
209
209
  # Call the original function
@@ -249,7 +249,7 @@ def _decorator_impl(
249
249
  for key, value in extra_kwargs.items():
250
250
  setattr(wrapper, f"_{key}", value)
251
251
 
252
- return cast("DecoratedAgentProtocol[P, R]", wrapper)
252
+ return cast("AgentCallable[P, R]", wrapper)
253
253
 
254
254
  return decorator
255
255
 
@@ -271,7 +271,7 @@ def agent(
271
271
  default: bool = False,
272
272
  elicitation_handler: Optional[ElicitationFnT] = None,
273
273
  api_key: str | None = None,
274
- ) -> Callable[[AgentCallable[P, R]], DecoratedAgentProtocol[P, R]]:
274
+ ) -> Callable[[AgentCallable[P, R]], AgentCallable[P, R]]:
275
275
  """
276
276
  Decorator to create and register a standard agent with type-safe signature.
277
277
 
@@ -336,7 +336,7 @@ def custom(
336
336
  default: bool = False,
337
337
  elicitation_handler: Optional[ElicitationFnT] = None,
338
338
  api_key: str | None = None,
339
- ) -> Callable[[AgentCallable[P, R]], DecoratedAgentProtocol[P, R]]:
339
+ ) -> Callable[[AgentCallable[P, R]], AgentCallable[P, R]]:
340
340
  """
341
341
  Decorator to create and register a standard agent with type-safe signature.
342
342
 
@@ -400,7 +400,7 @@ def orchestrator(
400
400
  plan_iterations: int = 5,
401
401
  default: bool = False,
402
402
  api_key: str | None = None,
403
- ) -> Callable[[AgentCallable[P, R]], DecoratedOrchestratorProtocol[P, R]]:
403
+ ) -> Callable[[AgentCallable[P, R]], AgentCallable[P, R]]:
404
404
  """
405
405
  Decorator to create and register an orchestrator agent with type-safe signature.
406
406
 
@@ -423,24 +423,21 @@ def orchestrator(
423
423
  # Create final request params with plan_iterations
424
424
  resolved_instruction = _resolve_instruction(instruction)
425
425
 
426
- return cast(
427
- "Callable[[AgentCallable[P, R]], DecoratedOrchestratorProtocol[P, R]]",
428
- _decorator_impl(
429
- self,
430
- AgentType.ORCHESTRATOR,
431
- name=name,
432
- instruction=resolved_instruction,
433
- servers=[], # Orchestrators don't connect to servers directly
434
- model=model,
435
- use_history=use_history,
436
- request_params=request_params,
437
- human_input=human_input,
438
- child_agents=agents,
439
- plan_type=plan_type,
440
- plan_iterations=plan_iterations,
441
- default=default,
442
- api_key=api_key,
443
- ),
426
+ return _decorator_impl(
427
+ self,
428
+ AgentType.ORCHESTRATOR,
429
+ name=name,
430
+ instruction=resolved_instruction,
431
+ servers=[], # Orchestrators don't connect to servers directly
432
+ model=model,
433
+ use_history=use_history,
434
+ request_params=request_params,
435
+ human_input=human_input,
436
+ child_agents=agents,
437
+ plan_type=plan_type,
438
+ plan_iterations=plan_iterations,
439
+ default=default,
440
+ api_key=api_key,
444
441
  )
445
442
 
446
443
 
@@ -455,7 +452,7 @@ def iterative_planner(
455
452
  plan_iterations: int = -1,
456
453
  default: bool = False,
457
454
  api_key: str | None = None,
458
- ) -> Callable[[AgentCallable[P, R]], DecoratedOrchestratorProtocol[P, R]]:
455
+ ) -> Callable[[AgentCallable[P, R]], AgentCallable[P, R]]:
459
456
  """
460
457
  Decorator to create and register an orchestrator agent with type-safe signature.
461
458
 
@@ -478,22 +475,19 @@ def iterative_planner(
478
475
  # Create final request params with plan_iterations
479
476
  resolved_instruction = _resolve_instruction(instruction)
480
477
 
481
- return cast(
482
- "Callable[[AgentCallable[P, R]], DecoratedOrchestratorProtocol[P, R]]",
483
- _decorator_impl(
484
- self,
485
- AgentType.ITERATIVE_PLANNER,
486
- name=name,
487
- instruction=resolved_instruction,
488
- servers=[], # Orchestrators don't connect to servers directly
489
- model=model,
490
- use_history=False,
491
- request_params=request_params,
492
- child_agents=agents,
493
- plan_iterations=plan_iterations,
494
- default=default,
495
- api_key=api_key,
496
- ),
478
+ return _decorator_impl(
479
+ self,
480
+ AgentType.ITERATIVE_PLANNER,
481
+ name=name,
482
+ instruction=resolved_instruction,
483
+ servers=[], # Orchestrators don't connect to servers directly
484
+ model=model,
485
+ use_history=False,
486
+ request_params=request_params,
487
+ child_agents=agents,
488
+ plan_iterations=plan_iterations,
489
+ default=default,
490
+ api_key=api_key,
497
491
  )
498
492
 
499
493
 
@@ -516,7 +510,7 @@ def router(
516
510
  ElicitationFnT
517
511
  ] = None, ## exclude from docs, decide whether allowable
518
512
  api_key: str | None = None,
519
- ) -> Callable[[AgentCallable[P, R]], DecoratedRouterProtocol[P, R]]:
513
+ ) -> Callable[[AgentCallable[P, R]], AgentCallable[P, R]]:
520
514
  """
521
515
  Decorator to create and register a router agent with type-safe signature.
522
516
 
@@ -536,26 +530,23 @@ def router(
536
530
  """
537
531
  resolved_instruction = _resolve_instruction(instruction or ROUTING_SYSTEM_INSTRUCTION)
538
532
 
539
- return cast(
540
- "Callable[[AgentCallable[P, R]], DecoratedRouterProtocol[P, R]]",
541
- _decorator_impl(
542
- self,
543
- AgentType.ROUTER,
544
- name=name,
545
- instruction=resolved_instruction,
546
- servers=servers,
547
- model=model,
548
- use_history=use_history,
549
- request_params=request_params,
550
- human_input=human_input,
551
- default=default,
552
- router_agents=agents,
553
- elicitation_handler=elicitation_handler,
554
- api_key=api_key,
555
- tools=tools,
556
- prompts=prompts,
557
- resources=resources,
558
- ),
533
+ return _decorator_impl(
534
+ self,
535
+ AgentType.ROUTER,
536
+ name=name,
537
+ instruction=resolved_instruction,
538
+ servers=servers,
539
+ model=model,
540
+ use_history=use_history,
541
+ request_params=request_params,
542
+ human_input=human_input,
543
+ default=default,
544
+ router_agents=agents,
545
+ elicitation_handler=elicitation_handler,
546
+ api_key=api_key,
547
+ tools=tools,
548
+ prompts=prompts,
549
+ resources=resources,
559
550
  )
560
551
 
561
552
 
@@ -567,7 +558,7 @@ def chain(
567
558
  instruction: Optional[str | Path | AnyUrl] = None,
568
559
  cumulative: bool = False,
569
560
  default: bool = False,
570
- ) -> Callable[[AgentCallable[P, R]], DecoratedChainProtocol[P, R]]:
561
+ ) -> Callable[[AgentCallable[P, R]], AgentCallable[P, R]]:
571
562
  """
572
563
  Decorator to create and register a chain agent with type-safe signature.
573
564
 
@@ -593,17 +584,14 @@ def chain(
593
584
  """
594
585
  resolved_instruction = _resolve_instruction(instruction or default_instruction)
595
586
 
596
- return cast(
597
- "Callable[[AgentCallable[P, R]], DecoratedChainProtocol[P, R]]",
598
- _decorator_impl(
599
- self,
600
- AgentType.CHAIN,
601
- name=name,
602
- instruction=resolved_instruction,
603
- sequence=sequence,
604
- cumulative=cumulative,
605
- default=default,
606
- ),
587
+ return _decorator_impl(
588
+ self,
589
+ AgentType.CHAIN,
590
+ name=name,
591
+ instruction=resolved_instruction,
592
+ sequence=sequence,
593
+ cumulative=cumulative,
594
+ default=default,
607
595
  )
608
596
 
609
597
 
@@ -616,7 +604,7 @@ def parallel(
616
604
  instruction: Optional[str | Path | AnyUrl] = None,
617
605
  include_request: bool = True,
618
606
  default: bool = False,
619
- ) -> Callable[[AgentCallable[P, R]], DecoratedParallelProtocol[P, R]]:
607
+ ) -> Callable[[AgentCallable[P, R]], AgentCallable[P, R]]:
620
608
  """
621
609
  Decorator to create and register a parallel agent with type-safe signature.
622
610
 
@@ -637,19 +625,16 @@ def parallel(
637
625
  """
638
626
  resolved_instruction = _resolve_instruction(instruction or default_instruction)
639
627
 
640
- return cast(
641
- "Callable[[AgentCallable[P, R]], DecoratedParallelProtocol[P, R]]",
642
- _decorator_impl(
643
- self,
644
- AgentType.PARALLEL,
645
- name=name,
646
- instruction=resolved_instruction,
647
- servers=[], # Parallel agents don't connect to servers directly
648
- fan_in=fan_in,
649
- fan_out=fan_out,
650
- include_request=include_request,
651
- default=default,
652
- ),
628
+ return _decorator_impl(
629
+ self,
630
+ AgentType.PARALLEL,
631
+ name=name,
632
+ instruction=resolved_instruction,
633
+ servers=[], # Parallel agents don't connect to servers directly
634
+ fan_in=fan_in,
635
+ fan_out=fan_out,
636
+ include_request=include_request,
637
+ default=default,
653
638
  )
654
639
 
655
640
 
@@ -663,7 +648,7 @@ def evaluator_optimizer(
663
648
  min_rating: str = "GOOD",
664
649
  max_refinements: int = 3,
665
650
  default: bool = False,
666
- ) -> Callable[[AgentCallable[P, R]], DecoratedEvaluatorOptimizerProtocol[P, R]]:
651
+ ) -> Callable[[AgentCallable[P, R]], AgentCallable[P, R]]:
667
652
  """
668
653
  Decorator to create and register an evaluator-optimizer agent with type-safe signature.
669
654
 
@@ -686,18 +671,15 @@ def evaluator_optimizer(
686
671
  """
687
672
  resolved_instruction = _resolve_instruction(instruction or default_instruction)
688
673
 
689
- return cast(
690
- "Callable[[AgentCallable[P, R]], DecoratedEvaluatorOptimizerProtocol[P, R]]",
691
- _decorator_impl(
692
- self,
693
- AgentType.EVALUATOR_OPTIMIZER,
694
- name=name,
695
- instruction=resolved_instruction,
696
- servers=[], # Evaluator-optimizer doesn't connect to servers directly
697
- generator=generator,
698
- evaluator=evaluator,
699
- min_rating=min_rating,
700
- max_refinements=max_refinements,
701
- default=default,
702
- ),
674
+ return _decorator_impl(
675
+ self,
676
+ AgentType.EVALUATOR_OPTIMIZER,
677
+ name=name,
678
+ instruction=resolved_instruction,
679
+ servers=[], # Evaluator-optimizer doesn't connect to servers directly
680
+ generator=generator,
681
+ evaluator=evaluator,
682
+ min_rating=min_rating,
683
+ max_refinements=max_refinements,
684
+ default=default,
703
685
  )