fast-agent-mcp 0.2.58__py3-none-any.whl → 0.3.0__py3-none-any.whl

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 (233) hide show
  1. fast_agent/__init__.py +127 -0
  2. fast_agent/agents/__init__.py +36 -0
  3. {mcp_agent/core → fast_agent/agents}/agent_types.py +2 -1
  4. fast_agent/agents/llm_agent.py +217 -0
  5. fast_agent/agents/llm_decorator.py +486 -0
  6. mcp_agent/agents/base_agent.py → fast_agent/agents/mcp_agent.py +377 -385
  7. fast_agent/agents/tool_agent.py +168 -0
  8. {mcp_agent → fast_agent}/agents/workflow/chain_agent.py +43 -33
  9. {mcp_agent → fast_agent}/agents/workflow/evaluator_optimizer.py +31 -35
  10. {mcp_agent → fast_agent}/agents/workflow/iterative_planner.py +56 -47
  11. {mcp_agent → fast_agent}/agents/workflow/orchestrator_models.py +4 -4
  12. {mcp_agent → fast_agent}/agents/workflow/parallel_agent.py +34 -41
  13. {mcp_agent → fast_agent}/agents/workflow/router_agent.py +54 -39
  14. {mcp_agent → fast_agent}/cli/__main__.py +5 -3
  15. {mcp_agent → fast_agent}/cli/commands/check_config.py +95 -66
  16. {mcp_agent → fast_agent}/cli/commands/go.py +20 -11
  17. {mcp_agent → fast_agent}/cli/commands/quickstart.py +4 -4
  18. {mcp_agent → fast_agent}/cli/commands/server_helpers.py +1 -1
  19. {mcp_agent → fast_agent}/cli/commands/setup.py +64 -134
  20. {mcp_agent → fast_agent}/cli/commands/url_parser.py +9 -8
  21. {mcp_agent → fast_agent}/cli/main.py +36 -16
  22. {mcp_agent → fast_agent}/cli/terminal.py +2 -2
  23. {mcp_agent → fast_agent}/config.py +10 -2
  24. fast_agent/constants.py +8 -0
  25. {mcp_agent → fast_agent}/context.py +24 -19
  26. {mcp_agent → fast_agent}/context_dependent.py +9 -5
  27. fast_agent/core/__init__.py +17 -0
  28. {mcp_agent → fast_agent}/core/agent_app.py +39 -36
  29. fast_agent/core/core_app.py +135 -0
  30. {mcp_agent → fast_agent}/core/direct_decorators.py +12 -26
  31. {mcp_agent → fast_agent}/core/direct_factory.py +95 -73
  32. {mcp_agent → fast_agent/core}/executor/executor.py +4 -5
  33. {mcp_agent → fast_agent}/core/fastagent.py +32 -32
  34. fast_agent/core/logging/__init__.py +5 -0
  35. {mcp_agent → fast_agent/core}/logging/events.py +3 -3
  36. {mcp_agent → fast_agent/core}/logging/json_serializer.py +1 -1
  37. {mcp_agent → fast_agent/core}/logging/listeners.py +85 -7
  38. {mcp_agent → fast_agent/core}/logging/logger.py +7 -7
  39. {mcp_agent → fast_agent/core}/logging/transport.py +10 -11
  40. fast_agent/core/prompt.py +9 -0
  41. {mcp_agent → fast_agent}/core/validation.py +4 -4
  42. fast_agent/event_progress.py +61 -0
  43. fast_agent/history/history_exporter.py +44 -0
  44. {mcp_agent → fast_agent}/human_input/__init__.py +9 -12
  45. {mcp_agent → fast_agent}/human_input/elicitation_handler.py +26 -8
  46. {mcp_agent → fast_agent}/human_input/elicitation_state.py +7 -7
  47. {mcp_agent → fast_agent}/human_input/simple_form.py +6 -4
  48. {mcp_agent → fast_agent}/human_input/types.py +1 -18
  49. fast_agent/interfaces.py +228 -0
  50. fast_agent/llm/__init__.py +9 -0
  51. mcp_agent/llm/augmented_llm.py → fast_agent/llm/fastagent_llm.py +127 -218
  52. fast_agent/llm/internal/passthrough.py +137 -0
  53. mcp_agent/llm/augmented_llm_playback.py → fast_agent/llm/internal/playback.py +29 -25
  54. mcp_agent/llm/augmented_llm_silent.py → fast_agent/llm/internal/silent.py +10 -17
  55. fast_agent/llm/internal/slow.py +38 -0
  56. {mcp_agent → fast_agent}/llm/memory.py +40 -30
  57. {mcp_agent → fast_agent}/llm/model_database.py +35 -2
  58. {mcp_agent → fast_agent}/llm/model_factory.py +103 -77
  59. fast_agent/llm/model_info.py +126 -0
  60. {mcp_agent/llm/providers → fast_agent/llm/provider/anthropic}/anthropic_utils.py +7 -7
  61. fast_agent/llm/provider/anthropic/llm_anthropic.py +603 -0
  62. {mcp_agent/llm/providers → fast_agent/llm/provider/anthropic}/multipart_converter_anthropic.py +79 -86
  63. {mcp_agent/llm/providers → fast_agent/llm/provider/bedrock}/bedrock_utils.py +3 -1
  64. mcp_agent/llm/providers/augmented_llm_bedrock.py → fast_agent/llm/provider/bedrock/llm_bedrock.py +833 -717
  65. {mcp_agent/llm/providers → fast_agent/llm/provider/google}/google_converter.py +66 -14
  66. fast_agent/llm/provider/google/llm_google_native.py +431 -0
  67. mcp_agent/llm/providers/augmented_llm_aliyun.py → fast_agent/llm/provider/openai/llm_aliyun.py +6 -7
  68. mcp_agent/llm/providers/augmented_llm_azure.py → fast_agent/llm/provider/openai/llm_azure.py +4 -4
  69. mcp_agent/llm/providers/augmented_llm_deepseek.py → fast_agent/llm/provider/openai/llm_deepseek.py +10 -11
  70. mcp_agent/llm/providers/augmented_llm_generic.py → fast_agent/llm/provider/openai/llm_generic.py +4 -4
  71. mcp_agent/llm/providers/augmented_llm_google_oai.py → fast_agent/llm/provider/openai/llm_google_oai.py +4 -4
  72. mcp_agent/llm/providers/augmented_llm_groq.py → fast_agent/llm/provider/openai/llm_groq.py +14 -16
  73. mcp_agent/llm/providers/augmented_llm_openai.py → fast_agent/llm/provider/openai/llm_openai.py +133 -207
  74. mcp_agent/llm/providers/augmented_llm_openrouter.py → fast_agent/llm/provider/openai/llm_openrouter.py +6 -6
  75. mcp_agent/llm/providers/augmented_llm_tensorzero_openai.py → fast_agent/llm/provider/openai/llm_tensorzero_openai.py +17 -16
  76. mcp_agent/llm/providers/augmented_llm_xai.py → fast_agent/llm/provider/openai/llm_xai.py +6 -6
  77. {mcp_agent/llm/providers → fast_agent/llm/provider/openai}/multipart_converter_openai.py +125 -63
  78. {mcp_agent/llm/providers → fast_agent/llm/provider/openai}/openai_multipart.py +12 -12
  79. {mcp_agent/llm/providers → fast_agent/llm/provider/openai}/openai_utils.py +18 -16
  80. {mcp_agent → fast_agent}/llm/provider_key_manager.py +2 -2
  81. {mcp_agent → fast_agent}/llm/provider_types.py +2 -0
  82. {mcp_agent → fast_agent}/llm/sampling_converter.py +15 -12
  83. {mcp_agent → fast_agent}/llm/usage_tracking.py +23 -5
  84. fast_agent/mcp/__init__.py +43 -0
  85. {mcp_agent → fast_agent}/mcp/elicitation_factory.py +3 -3
  86. {mcp_agent → fast_agent}/mcp/elicitation_handlers.py +19 -10
  87. {mcp_agent → fast_agent}/mcp/gen_client.py +3 -3
  88. fast_agent/mcp/helpers/__init__.py +36 -0
  89. fast_agent/mcp/helpers/content_helpers.py +183 -0
  90. {mcp_agent → fast_agent}/mcp/helpers/server_config_helpers.py +8 -8
  91. {mcp_agent → fast_agent}/mcp/hf_auth.py +25 -23
  92. fast_agent/mcp/interfaces.py +93 -0
  93. {mcp_agent → fast_agent}/mcp/logger_textio.py +4 -4
  94. {mcp_agent → fast_agent}/mcp/mcp_agent_client_session.py +49 -44
  95. {mcp_agent → fast_agent}/mcp/mcp_aggregator.py +66 -115
  96. {mcp_agent → fast_agent}/mcp/mcp_connection_manager.py +16 -23
  97. {mcp_agent/core → fast_agent/mcp}/mcp_content.py +23 -15
  98. {mcp_agent → fast_agent}/mcp/mime_utils.py +39 -0
  99. fast_agent/mcp/prompt.py +159 -0
  100. mcp_agent/mcp/prompt_message_multipart.py → fast_agent/mcp/prompt_message_extended.py +27 -20
  101. {mcp_agent → fast_agent}/mcp/prompt_render.py +21 -19
  102. {mcp_agent → fast_agent}/mcp/prompt_serialization.py +46 -46
  103. fast_agent/mcp/prompts/__main__.py +7 -0
  104. {mcp_agent → fast_agent}/mcp/prompts/prompt_helpers.py +31 -30
  105. {mcp_agent → fast_agent}/mcp/prompts/prompt_load.py +8 -8
  106. {mcp_agent → fast_agent}/mcp/prompts/prompt_server.py +11 -19
  107. {mcp_agent → fast_agent}/mcp/prompts/prompt_template.py +18 -18
  108. {mcp_agent → fast_agent}/mcp/resource_utils.py +1 -1
  109. {mcp_agent → fast_agent}/mcp/sampling.py +31 -26
  110. {mcp_agent/mcp_server → fast_agent/mcp/server}/__init__.py +1 -1
  111. {mcp_agent/mcp_server → fast_agent/mcp/server}/agent_server.py +5 -6
  112. fast_agent/mcp/ui_agent.py +48 -0
  113. fast_agent/mcp/ui_mixin.py +209 -0
  114. fast_agent/mcp_server_registry.py +90 -0
  115. {mcp_agent → fast_agent}/resources/examples/data-analysis/analysis-campaign.py +5 -4
  116. {mcp_agent → fast_agent}/resources/examples/data-analysis/analysis.py +1 -1
  117. {mcp_agent → fast_agent}/resources/examples/mcp/elicitations/forms_demo.py +3 -3
  118. {mcp_agent → fast_agent}/resources/examples/mcp/elicitations/game_character.py +2 -2
  119. {mcp_agent → fast_agent}/resources/examples/mcp/elicitations/game_character_handler.py +1 -1
  120. {mcp_agent → fast_agent}/resources/examples/mcp/elicitations/tool_call.py +1 -1
  121. {mcp_agent → fast_agent}/resources/examples/mcp/state-transfer/agent_one.py +1 -1
  122. {mcp_agent → fast_agent}/resources/examples/mcp/state-transfer/agent_two.py +1 -1
  123. {mcp_agent → fast_agent}/resources/examples/researcher/researcher-eval.py +1 -1
  124. {mcp_agent → fast_agent}/resources/examples/researcher/researcher-imp.py +1 -1
  125. {mcp_agent → fast_agent}/resources/examples/researcher/researcher.py +1 -1
  126. {mcp_agent → fast_agent}/resources/examples/tensorzero/agent.py +2 -2
  127. {mcp_agent → fast_agent}/resources/examples/tensorzero/image_demo.py +3 -3
  128. {mcp_agent → fast_agent}/resources/examples/tensorzero/simple_agent.py +1 -1
  129. {mcp_agent → fast_agent}/resources/examples/workflows/chaining.py +1 -1
  130. {mcp_agent → fast_agent}/resources/examples/workflows/evaluator.py +3 -3
  131. {mcp_agent → fast_agent}/resources/examples/workflows/human_input.py +5 -3
  132. {mcp_agent → fast_agent}/resources/examples/workflows/orchestrator.py +1 -1
  133. {mcp_agent → fast_agent}/resources/examples/workflows/parallel.py +2 -2
  134. {mcp_agent → fast_agent}/resources/examples/workflows/router.py +5 -2
  135. fast_agent/resources/setup/.gitignore +24 -0
  136. fast_agent/resources/setup/agent.py +18 -0
  137. fast_agent/resources/setup/fastagent.config.yaml +44 -0
  138. fast_agent/resources/setup/fastagent.secrets.yaml.example +38 -0
  139. fast_agent/tools/elicitation.py +369 -0
  140. fast_agent/types/__init__.py +32 -0
  141. fast_agent/types/llm_stop_reason.py +77 -0
  142. fast_agent/ui/__init__.py +38 -0
  143. fast_agent/ui/console_display.py +1005 -0
  144. {mcp_agent/human_input → fast_agent/ui}/elicitation_form.py +17 -12
  145. mcp_agent/human_input/elicitation_forms.py → fast_agent/ui/elicitation_style.py +1 -1
  146. {mcp_agent/core → fast_agent/ui}/enhanced_prompt.py +96 -25
  147. {mcp_agent/core → fast_agent/ui}/interactive_prompt.py +330 -125
  148. fast_agent/ui/mcp_ui_utils.py +224 -0
  149. {mcp_agent → fast_agent/ui}/progress_display.py +2 -2
  150. {mcp_agent/logging → fast_agent/ui}/rich_progress.py +4 -4
  151. {mcp_agent/core → fast_agent/ui}/usage_display.py +3 -8
  152. {fast_agent_mcp-0.2.58.dist-info → fast_agent_mcp-0.3.0.dist-info}/METADATA +7 -7
  153. fast_agent_mcp-0.3.0.dist-info/RECORD +202 -0
  154. fast_agent_mcp-0.3.0.dist-info/entry_points.txt +5 -0
  155. fast_agent_mcp-0.2.58.dist-info/RECORD +0 -193
  156. fast_agent_mcp-0.2.58.dist-info/entry_points.txt +0 -6
  157. mcp_agent/__init__.py +0 -114
  158. mcp_agent/agents/agent.py +0 -92
  159. mcp_agent/agents/workflow/__init__.py +0 -1
  160. mcp_agent/agents/workflow/orchestrator_agent.py +0 -597
  161. mcp_agent/app.py +0 -175
  162. mcp_agent/core/__init__.py +0 -26
  163. mcp_agent/core/prompt.py +0 -191
  164. mcp_agent/event_progress.py +0 -134
  165. mcp_agent/human_input/handler.py +0 -81
  166. mcp_agent/llm/__init__.py +0 -2
  167. mcp_agent/llm/augmented_llm_passthrough.py +0 -232
  168. mcp_agent/llm/augmented_llm_slow.py +0 -53
  169. mcp_agent/llm/providers/__init__.py +0 -8
  170. mcp_agent/llm/providers/augmented_llm_anthropic.py +0 -718
  171. mcp_agent/llm/providers/augmented_llm_google_native.py +0 -496
  172. mcp_agent/llm/providers/sampling_converter_anthropic.py +0 -57
  173. mcp_agent/llm/providers/sampling_converter_openai.py +0 -26
  174. mcp_agent/llm/sampling_format_converter.py +0 -37
  175. mcp_agent/logging/__init__.py +0 -0
  176. mcp_agent/mcp/__init__.py +0 -50
  177. mcp_agent/mcp/helpers/__init__.py +0 -25
  178. mcp_agent/mcp/helpers/content_helpers.py +0 -187
  179. mcp_agent/mcp/interfaces.py +0 -266
  180. mcp_agent/mcp/prompts/__init__.py +0 -0
  181. mcp_agent/mcp/prompts/__main__.py +0 -10
  182. mcp_agent/mcp_server_registry.py +0 -343
  183. mcp_agent/tools/tool_definition.py +0 -14
  184. mcp_agent/ui/console_display.py +0 -790
  185. mcp_agent/ui/console_display_legacy.py +0 -401
  186. {mcp_agent → fast_agent}/agents/workflow/orchestrator_prompts.py +0 -0
  187. {mcp_agent/agents → fast_agent/cli}/__init__.py +0 -0
  188. {mcp_agent → fast_agent}/cli/constants.py +0 -0
  189. {mcp_agent → fast_agent}/core/error_handling.py +0 -0
  190. {mcp_agent → fast_agent}/core/exceptions.py +0 -0
  191. {mcp_agent/cli → fast_agent/core/executor}/__init__.py +0 -0
  192. {mcp_agent → fast_agent/core}/executor/task_registry.py +0 -0
  193. {mcp_agent → fast_agent/core}/executor/workflow_signal.py +0 -0
  194. {mcp_agent → fast_agent}/human_input/form_fields.py +0 -0
  195. {mcp_agent → fast_agent}/llm/prompt_utils.py +0 -0
  196. {mcp_agent/core → fast_agent/llm}/request_params.py +0 -0
  197. {mcp_agent → fast_agent}/mcp/common.py +0 -0
  198. {mcp_agent/executor → fast_agent/mcp/prompts}/__init__.py +0 -0
  199. {mcp_agent → fast_agent}/mcp/prompts/prompt_constants.py +0 -0
  200. {mcp_agent → fast_agent}/py.typed +0 -0
  201. {mcp_agent → fast_agent}/resources/examples/data-analysis/fastagent.config.yaml +0 -0
  202. {mcp_agent → fast_agent}/resources/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
  203. {mcp_agent → fast_agent}/resources/examples/mcp/elicitations/elicitation_account_server.py +0 -0
  204. {mcp_agent → fast_agent}/resources/examples/mcp/elicitations/elicitation_forms_server.py +0 -0
  205. {mcp_agent → fast_agent}/resources/examples/mcp/elicitations/elicitation_game_server.py +0 -0
  206. {mcp_agent → fast_agent}/resources/examples/mcp/elicitations/fastagent.config.yaml +0 -0
  207. {mcp_agent → fast_agent}/resources/examples/mcp/elicitations/fastagent.secrets.yaml.example +0 -0
  208. {mcp_agent → fast_agent}/resources/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
  209. {mcp_agent → fast_agent}/resources/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
  210. {mcp_agent → fast_agent}/resources/examples/researcher/fastagent.config.yaml +0 -0
  211. {mcp_agent → fast_agent}/resources/examples/tensorzero/.env.sample +0 -0
  212. {mcp_agent → fast_agent}/resources/examples/tensorzero/Makefile +0 -0
  213. {mcp_agent → fast_agent}/resources/examples/tensorzero/README.md +0 -0
  214. {mcp_agent → fast_agent}/resources/examples/tensorzero/demo_images/clam.jpg +0 -0
  215. {mcp_agent → fast_agent}/resources/examples/tensorzero/demo_images/crab.png +0 -0
  216. {mcp_agent → fast_agent}/resources/examples/tensorzero/demo_images/shrimp.png +0 -0
  217. {mcp_agent → fast_agent}/resources/examples/tensorzero/docker-compose.yml +0 -0
  218. {mcp_agent → fast_agent}/resources/examples/tensorzero/fastagent.config.yaml +0 -0
  219. {mcp_agent → fast_agent}/resources/examples/tensorzero/mcp_server/Dockerfile +0 -0
  220. {mcp_agent → fast_agent}/resources/examples/tensorzero/mcp_server/entrypoint.sh +0 -0
  221. {mcp_agent → fast_agent}/resources/examples/tensorzero/mcp_server/mcp_server.py +0 -0
  222. {mcp_agent → fast_agent}/resources/examples/tensorzero/mcp_server/pyproject.toml +0 -0
  223. {mcp_agent → fast_agent}/resources/examples/tensorzero/tensorzero_config/system_schema.json +0 -0
  224. {mcp_agent → fast_agent}/resources/examples/tensorzero/tensorzero_config/system_template.minijinja +0 -0
  225. {mcp_agent → fast_agent}/resources/examples/tensorzero/tensorzero_config/tensorzero.toml +0 -0
  226. {mcp_agent → fast_agent}/resources/examples/workflows/fastagent.config.yaml +0 -0
  227. {mcp_agent → fast_agent}/resources/examples/workflows/graded_report.md +0 -0
  228. {mcp_agent → fast_agent}/resources/examples/workflows/short_story.md +0 -0
  229. {mcp_agent → fast_agent}/resources/examples/workflows/short_story.txt +0 -0
  230. {mcp_agent → fast_agent/ui}/console.py +0 -0
  231. {mcp_agent/core → fast_agent/ui}/mermaid_utils.py +0 -0
  232. {fast_agent_mcp-0.2.58.dist-info → fast_agent_mcp-0.3.0.dist-info}/WHEEL +0 -0
  233. {fast_agent_mcp-0.2.58.dist-info → fast_agent_mcp-0.3.0.dist-info}/licenses/LICENSE +0 -0
@@ -13,8 +13,8 @@ import asyncio
13
13
  from rich.console import Console
14
14
  from rich.panel import Panel
15
15
 
16
- from mcp_agent.core.fastagent import FastAgent
17
- from mcp_agent.mcp.helpers.content_helpers import get_resource_text
16
+ from fast_agent.core.fastagent import FastAgent
17
+ from fast_agent.mcp.helpers.content_helpers import get_resource_text
18
18
 
19
19
  fast = FastAgent("Elicitation Forms Demo", quiet=True)
20
20
  console = Console()
@@ -38,7 +38,7 @@ async def main():
38
38
  console.print(
39
39
  "[dim]Demonstrates: string validation, email format, URL format, date format[/dim]"
40
40
  )
41
- result = await agent.get_resource("elicitation://event-registration")
41
+ result = await agent["forms-demo"].get_resource("elicitation://event-registration")
42
42
 
43
43
  if result_text := get_resource_text(result):
44
44
  panel = Panel(
@@ -14,8 +14,8 @@ from game_character_handler import game_character_elicitation_handler
14
14
  from rich.console import Console
15
15
  from rich.panel import Panel
16
16
 
17
- from mcp_agent.core.fastagent import FastAgent
18
- from mcp_agent.mcp.helpers.content_helpers import get_resource_text
17
+ from fast_agent.core.fastagent import FastAgent
18
+ from fast_agent.mcp.helpers.content_helpers import get_resource_text
19
19
 
20
20
  fast = FastAgent("Game Character Creator", quiet=True)
21
21
  console = Console()
@@ -17,7 +17,7 @@ from rich.progress import BarColumn, Progress, TextColumn
17
17
  from rich.prompt import Confirm
18
18
  from rich.table import Table
19
19
 
20
- from mcp_agent.logging.logger import get_logger
20
+ from fast_agent.core.logging.logger import get_logger
21
21
 
22
22
  if TYPE_CHECKING:
23
23
  from mcp import ClientSession
@@ -1,6 +1,6 @@
1
1
  import asyncio
2
2
 
3
- from mcp_agent.core.fastagent import FastAgent
3
+ from fast_agent.core.fastagent import FastAgent
4
4
 
5
5
  # Create the application
6
6
  fast = FastAgent("fast-agent example")
@@ -1,6 +1,6 @@
1
1
  import asyncio
2
2
 
3
- from mcp_agent.core.fastagent import FastAgent
3
+ from fast_agent.core.fastagent import FastAgent
4
4
 
5
5
  # Create the application
6
6
  fast = FastAgent("fast-agent agent_one (mcp server)")
@@ -1,6 +1,6 @@
1
1
  import asyncio
2
2
 
3
- from mcp_agent.core.fastagent import FastAgent
3
+ from fast_agent.core.fastagent import FastAgent
4
4
 
5
5
  # Create the application
6
6
  fast = FastAgent("fast-agent agent_two (mcp client)")
@@ -1,6 +1,6 @@
1
1
  import asyncio
2
2
 
3
- from mcp_agent.core.fastagent import FastAgent
3
+ from fast_agent.core.fastagent import FastAgent
4
4
 
5
5
  agents = FastAgent(name="Researcher Agent (EO)")
6
6
 
@@ -1,6 +1,6 @@
1
1
  import asyncio
2
2
 
3
- from mcp_agent.core.fastagent import FastAgent
3
+ from fast_agent.core.fastagent import FastAgent
4
4
 
5
5
  agents = FastAgent(name="Enhanced Researcher")
6
6
 
@@ -1,6 +1,6 @@
1
1
  import asyncio
2
2
 
3
- from mcp_agent.core.fastagent import FastAgent
3
+ from fast_agent.core.fastagent import FastAgent
4
4
 
5
5
  # from rich import print
6
6
 
@@ -1,7 +1,7 @@
1
1
  import asyncio
2
2
 
3
- from mcp_agent.core.fastagent import FastAgent
4
- from mcp_agent.core.request_params import RequestParams
3
+ from fast_agent.core.fastagent import FastAgent
4
+ from fast_agent.llm.request_params import RequestParams
5
5
 
6
6
  # Explicitly provide the path to the config file in the current directory
7
7
  CONFIG_FILE = "fastagent.config.yaml"
@@ -6,9 +6,9 @@ from typing import List, Union
6
6
 
7
7
  from mcp.types import ImageContent, TextContent
8
8
 
9
- from mcp_agent.core.fastagent import FastAgent
10
- from mcp_agent.core.prompt import Prompt
11
- from mcp_agent.core.request_params import RequestParams
9
+ from fast_agent.core.fastagent import FastAgent
10
+ from fast_agent.core.prompt import Prompt
11
+ from fast_agent.llm.request_params import RequestParams
12
12
 
13
13
  AGENT_NAME = "tensorzero_image_tester"
14
14
  TENSORZERO_MODEL = "tensorzero.test_chat"
@@ -1,6 +1,6 @@
1
1
  import asyncio
2
2
 
3
- from mcp_agent.core.fastagent import FastAgent
3
+ from fast_agent.core.fastagent import FastAgent
4
4
 
5
5
  CONFIG_FILE = "fastagent.config.yaml"
6
6
  fast = FastAgent("fast-agent example", config_path=CONFIG_FILE, ignore_unknown_args=True)
@@ -1,6 +1,6 @@
1
1
  import asyncio
2
2
 
3
- from mcp_agent.core.fastagent import FastAgent
3
+ from fast_agent.core.fastagent import FastAgent
4
4
 
5
5
  # Create the application
6
6
  fast = FastAgent("Agent Chaining")
@@ -4,7 +4,7 @@ This demonstrates creating an optimizer and evaluator to iteratively improve con
4
4
 
5
5
  import asyncio
6
6
 
7
- from mcp_agent.core.fastagent import FastAgent
7
+ from fast_agent.core.fastagent import FastAgent
8
8
 
9
9
  # Create the application
10
10
  fast = FastAgent("Evaluator-Optimizer")
@@ -18,7 +18,7 @@ fast = FastAgent("Evaluator-Optimizer")
18
18
  candidate details, and company information. Tailor the response to the company and job requirements.
19
19
  """,
20
20
  servers=["fetch"],
21
- model="gpt-4.1-nano",
21
+ model="gpt-5-nano.low",
22
22
  use_history=True,
23
23
  )
24
24
  # Define evaluator agent
@@ -40,7 +40,7 @@ fast = FastAgent("Evaluator-Optimizer")
40
40
  Summarize your evaluation as a structured response with:
41
41
  - Overall quality rating.
42
42
  - Specific feedback and areas for improvement.""",
43
- model="sonnet",
43
+ model="o3-mini.medium",
44
44
  )
45
45
  # Define the evaluator-optimizer workflow
46
46
  @fast.evaluator_optimizer(
@@ -4,7 +4,7 @@ Agent which demonstrates Human Input tool
4
4
 
5
5
  import asyncio
6
6
 
7
- from mcp_agent.core.fastagent import FastAgent
7
+ from fast_agent.core.fastagent import FastAgent
8
8
 
9
9
  # Create the application
10
10
  fast = FastAgent("Human Input")
@@ -12,14 +12,16 @@ fast = FastAgent("Human Input")
12
12
 
13
13
  # Define the agent
14
14
  @fast.agent(
15
- instruction="An AI agent that assists with basic tasks. Request Human Input when needed.",
15
+ instruction="An AI agent that assists with basic tasks. Request Human Input when needed - for example"
16
+ "if being asked to predict a number sequence or pretending to take pizza orders.",
16
17
  human_input=True,
17
18
  )
18
19
  async def main() -> None:
19
20
  async with fast.run() as agent:
20
21
  # this usually causes the LLM to request the Human Input Tool
21
22
  await agent("print the next number in the sequence")
22
- await agent.prompt(default_prompt="STOP")
23
+ await agent("pretend to be a pizza restaurant and take the users order")
24
+ await agent.interactive(default_prompt="STOP")
23
25
 
24
26
 
25
27
  if __name__ == "__main__":
@@ -4,7 +4,7 @@ This demonstrates creating multiple agents and an orchestrator to coordinate the
4
4
 
5
5
  import asyncio
6
6
 
7
- from mcp_agent.core.fastagent import FastAgent
7
+ from fast_agent.core.fastagent import FastAgent
8
8
 
9
9
  # Create the application
10
10
  fast = FastAgent("Orchestrator-Workers")
@@ -5,8 +5,8 @@ Parallel Workflow showing Fan Out and Fan In agents, using different models
5
5
  import asyncio
6
6
  from pathlib import Path
7
7
 
8
- from mcp_agent.core.fastagent import FastAgent
9
- from mcp_agent.core.prompt import Prompt
8
+ from fast_agent.core.fastagent import FastAgent
9
+ from fast_agent.core.prompt import Prompt
10
10
 
11
11
  # Create the application
12
12
  fast = FastAgent(
@@ -9,7 +9,7 @@ import asyncio
9
9
 
10
10
  from rich.console import Console
11
11
 
12
- from mcp_agent.core.fastagent import FastAgent
12
+ from fast_agent.core.fastagent import FastAgent
13
13
 
14
14
  # Create the application
15
15
  fast = FastAgent(
@@ -26,11 +26,13 @@ SAMPLE_REQUESTS = [
26
26
 
27
27
  @fast.agent(
28
28
  name="fetcher",
29
+ model="haiku",
29
30
  instruction="""You are an agent, with a tool enabling you to fetch URLs.""",
30
31
  servers=["fetch"],
31
32
  )
32
33
  @fast.agent(
33
34
  name="code_expert",
35
+ model="haiku",
34
36
  instruction="""You are an expert in code analysis and software engineering.
35
37
  When asked about code, architecture, or development practices,
36
38
  you provide thorough and practical insights.""",
@@ -38,12 +40,13 @@ SAMPLE_REQUESTS = [
38
40
  )
39
41
  @fast.agent(
40
42
  name="general_assistant",
43
+ model="haiku",
41
44
  instruction="""You are a knowledgeable assistant that provides clear,
42
45
  well-reasoned responses about general topics, concepts, and principles.""",
43
46
  )
44
47
  @fast.router(
45
48
  name="route",
46
- model="gpt-4.1",
49
+ model="sonnet",
47
50
  agents=["code_expert", "general_assistant", "fetcher"],
48
51
  )
49
52
  async def main() -> None:
@@ -0,0 +1,24 @@
1
+ # Secrets
2
+ fastagent.secrets.yaml
3
+
4
+ # Python cache/bytecode
5
+ __pycache__/
6
+ *.py[cod]
7
+
8
+ # Local env and virtualenvs
9
+ .env
10
+ .venv/
11
+ venv/
12
+ env/
13
+
14
+ # OS cruft
15
+ .DS_Store
16
+ Thumbs.db
17
+
18
+ # Logs/artifacts
19
+ fastagent.jsonl
20
+ *.jsonl
21
+
22
+ # Editors (optional)
23
+ .idea/
24
+ .vscode/
@@ -0,0 +1,18 @@
1
+ import asyncio
2
+
3
+ from fast_agent.core.fastagent import FastAgent
4
+
5
+ # Create the application
6
+ fast = FastAgent("fast-agent example")
7
+
8
+
9
+ # Define the agent
10
+ @fast.agent(instruction="You are a helpful AI Agent")
11
+ async def main():
12
+ # use the --model command line switch or agent arguments to change model
13
+ async with fast.run() as agent:
14
+ await agent.interactive()
15
+
16
+
17
+ if __name__ == "__main__":
18
+ asyncio.run(main())
@@ -0,0 +1,44 @@
1
+ # FastAgent Configuration File
2
+
3
+ # Default Model Configuration:
4
+ #
5
+ # Takes format:
6
+ # <provider>.<model_string>.<reasoning_effort?> (e.g. anthropic.claude-3-5-sonnet-20241022 or openai.o3-mini.low)
7
+ # Accepts aliases for Anthropic Models: haiku, haiku3, sonnet, sonnet35, opus, opus3
8
+ # and OpenAI Models: gpt-4.1, gpt-4.1-mini, o1, o1-mini, o3-mini
9
+ #
10
+ # If not specified, defaults to "haiku".
11
+ # Can be overriden with a command line switch --model=<model>, or within the Agent constructor.
12
+
13
+ default_model: haiku
14
+ # mcp-ui support: disabled, enabled or auto. "auto" opens the web browser on the asset automatically
15
+ # mcp_ui_mode: enabled
16
+
17
+ # Logging and Console Configuration:
18
+ logger:
19
+ # level: "debug" | "info" | "warning" | "error"
20
+ # type: "none" | "console" | "file" | "http"
21
+ # path: "/path/to/logfile.jsonl"
22
+
23
+ # Switch the progress display on or off
24
+ progress_display: true
25
+
26
+ # Show chat User/Assistant messages on the console
27
+ show_chat: true
28
+ # Show tool calls on the console
29
+ show_tools: true
30
+ # Truncate long tool responses on the console
31
+ truncate_tools: true
32
+
33
+ # MCP Servers
34
+ mcp:
35
+ servers:
36
+ fetch:
37
+ command: "uvx"
38
+ args: ["mcp-server-fetch"]
39
+ filesystem:
40
+ command: "npx"
41
+ args: ["-y", "@modelcontextprotocol/server-filesystem", "."]
42
+ huggingface:
43
+ transport: "http"
44
+ url: "https://huggingface.co/mcp"
@@ -0,0 +1,38 @@
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
+ deepseek:
16
+ api_key: <your-api-key-here>
17
+ google:
18
+ api_key: <your-api-key-here>
19
+ googleoai:
20
+ api_key: <your-api-key-here>
21
+ azure:
22
+ api_key: <your-api-key-here>
23
+ base_url: "https://...resource_name....openai.azure.com/" # Resource name (do NOT include if using base_url)
24
+ azure_deployment: "gpt-4.1" # Required - the model deployment name
25
+ # api_version: "2024-10-21"
26
+ xai:
27
+ api_key: <your-api-key-here>
28
+ hf:
29
+ api_key: <your-HF_TOKEN-here>
30
+ groq:
31
+ api_key: <your-api-key-here>
32
+
33
+ # Example of setting an MCP Server environment variable
34
+ mcp:
35
+ servers:
36
+ brave:
37
+ env:
38
+ BRAVE_API_KEY: <your-api-key-here>