fast-agent-mcp 0.2.36__py3-none-any.whl → 0.2.38__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 (63) hide show
  1. {fast_agent_mcp-0.2.36.dist-info → fast_agent_mcp-0.2.38.dist-info}/METADATA +10 -7
  2. {fast_agent_mcp-0.2.36.dist-info → fast_agent_mcp-0.2.38.dist-info}/RECORD +45 -47
  3. {fast_agent_mcp-0.2.36.dist-info → fast_agent_mcp-0.2.38.dist-info}/licenses/LICENSE +1 -1
  4. mcp_agent/cli/commands/quickstart.py +60 -5
  5. mcp_agent/config.py +10 -0
  6. mcp_agent/context.py +1 -4
  7. mcp_agent/core/agent_types.py +7 -6
  8. mcp_agent/core/direct_decorators.py +14 -0
  9. mcp_agent/core/direct_factory.py +1 -0
  10. mcp_agent/core/fastagent.py +23 -2
  11. mcp_agent/human_input/elicitation_form.py +723 -0
  12. mcp_agent/human_input/elicitation_forms.py +59 -0
  13. mcp_agent/human_input/elicitation_handler.py +88 -0
  14. mcp_agent/human_input/elicitation_state.py +34 -0
  15. mcp_agent/llm/providers/augmented_llm_google_native.py +4 -2
  16. mcp_agent/llm/providers/augmented_llm_openai.py +1 -1
  17. mcp_agent/mcp/elicitation_factory.py +84 -0
  18. mcp_agent/mcp/elicitation_handlers.py +155 -0
  19. mcp_agent/mcp/helpers/content_helpers.py +27 -0
  20. mcp_agent/mcp/helpers/server_config_helpers.py +10 -8
  21. mcp_agent/mcp/mcp_agent_client_session.py +44 -1
  22. mcp_agent/mcp/mcp_aggregator.py +56 -11
  23. mcp_agent/mcp/mcp_connection_manager.py +30 -18
  24. mcp_agent/mcp_server/agent_server.py +2 -0
  25. mcp_agent/mcp_server_registry.py +16 -8
  26. mcp_agent/resources/examples/data-analysis/analysis.py +1 -2
  27. mcp_agent/resources/examples/mcp/elicitations/elicitation_account_server.py +88 -0
  28. mcp_agent/resources/examples/mcp/elicitations/elicitation_forms_server.py +232 -0
  29. mcp_agent/resources/examples/mcp/elicitations/elicitation_game_server.py +164 -0
  30. mcp_agent/resources/examples/mcp/elicitations/fastagent.config.yaml +35 -0
  31. mcp_agent/resources/examples/mcp/elicitations/fastagent.secrets.yaml.example +17 -0
  32. mcp_agent/resources/examples/mcp/elicitations/forms_demo.py +111 -0
  33. mcp_agent/resources/examples/mcp/elicitations/game_character.py +65 -0
  34. mcp_agent/resources/examples/mcp/elicitations/game_character_handler.py +256 -0
  35. mcp_agent/resources/examples/{prompting/agent.py → mcp/elicitations/tool_call.py} +4 -5
  36. mcp_agent/resources/examples/mcp/state-transfer/agent_two.py +1 -1
  37. mcp_agent/resources/examples/mcp/state-transfer/fastagent.config.yaml +1 -1
  38. mcp_agent/resources/examples/mcp/state-transfer/fastagent.secrets.yaml.example +1 -0
  39. mcp_agent/resources/examples/workflows/evaluator.py +1 -1
  40. mcp_agent/resources/examples/workflows/graded_report.md +89 -0
  41. mcp_agent/resources/examples/workflows/orchestrator.py +7 -9
  42. mcp_agent/resources/examples/workflows/parallel.py +0 -2
  43. mcp_agent/resources/examples/workflows/short_story.md +13 -0
  44. mcp_agent/resources/examples/in_dev/agent_build.py +0 -84
  45. mcp_agent/resources/examples/in_dev/css-LICENSE.txt +0 -21
  46. mcp_agent/resources/examples/in_dev/slides.py +0 -110
  47. mcp_agent/resources/examples/internal/agent.py +0 -20
  48. mcp_agent/resources/examples/internal/fastagent.config.yaml +0 -66
  49. mcp_agent/resources/examples/internal/history_transfer.py +0 -35
  50. mcp_agent/resources/examples/internal/job.py +0 -84
  51. mcp_agent/resources/examples/internal/prompt_category.py +0 -21
  52. mcp_agent/resources/examples/internal/prompt_sizing.py +0 -51
  53. mcp_agent/resources/examples/internal/simple.txt +0 -2
  54. mcp_agent/resources/examples/internal/sizer.py +0 -20
  55. mcp_agent/resources/examples/internal/social.py +0 -67
  56. mcp_agent/resources/examples/prompting/__init__.py +0 -3
  57. mcp_agent/resources/examples/prompting/delimited_prompt.txt +0 -14
  58. mcp_agent/resources/examples/prompting/fastagent.config.yaml +0 -43
  59. mcp_agent/resources/examples/prompting/image_server.py +0 -52
  60. mcp_agent/resources/examples/prompting/prompt1.txt +0 -6
  61. mcp_agent/resources/examples/prompting/work_with_image.py +0 -19
  62. {fast_agent_mcp-0.2.36.dist-info → fast_agent_mcp-0.2.38.dist-info}/WHEEL +0 -0
  63. {fast_agent_mcp-0.2.36.dist-info → fast_agent_mcp-0.2.38.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fast-agent-mcp
3
- Version: 0.2.36
3
+ Version: 0.2.38
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
@@ -191,7 +191,7 @@ License: Apache License
191
191
  same "printed page" as the copyright notice for easier
192
192
  identification within third-party archives.
193
193
 
194
- Copyright [2025] [llmindset.co.uk]
194
+ Copyright 2025 llmindset.co.uk
195
195
 
196
196
  Licensed under the Apache License, Version 2.0 (the "License");
197
197
  you may not use this file except in compliance with the License.
@@ -208,22 +208,23 @@ License-File: LICENSE
208
208
  Classifier: License :: OSI Approved :: Apache Software License
209
209
  Classifier: Operating System :: OS Independent
210
210
  Classifier: Programming Language :: Python :: 3
211
- Requires-Python: >=3.10
211
+ Requires-Python: >=3.12
212
212
  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
216
  Requires-Dist: deprecated>=1.2.18
217
+ Requires-Dist: email-validator>=2.2.0
217
218
  Requires-Dist: fastapi>=0.115.6
218
219
  Requires-Dist: google-genai
219
220
  Requires-Dist: mcp==1.10.1
220
221
  Requires-Dist: openai>=1.93.0
221
222
  Requires-Dist: opentelemetry-distro>=0.50b0
222
223
  Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.29.0
223
- Requires-Dist: opentelemetry-instrumentation-anthropic>=0.40.7; python_version >= '3.10' and python_version < '4.0'
224
+ Requires-Dist: opentelemetry-instrumentation-anthropic>=0.40.14; python_version >= '3.10' and python_version < '4.0'
224
225
  Requires-Dist: opentelemetry-instrumentation-google-genai>=0.2b0
225
- Requires-Dist: opentelemetry-instrumentation-mcp>=0.40.7; python_version >= '3.10' and python_version < '4.0'
226
- Requires-Dist: opentelemetry-instrumentation-openai>=0.0.40.7; python_version >= '3.10' and python_version < '4.0'
226
+ Requires-Dist: opentelemetry-instrumentation-mcp>=0.40.14; python_version >= '3.10' and python_version < '4.0'
227
+ Requires-Dist: opentelemetry-instrumentation-openai>=0.40.14; python_version >= '3.10' and python_version < '4.0'
227
228
  Requires-Dist: prompt-toolkit>=3.0.50
228
229
  Requires-Dist: pydantic-settings>=2.7.0
229
230
  Requires-Dist: pydantic>=2.10.4
@@ -261,7 +262,9 @@ Description-Content-Type: text/markdown
261
262
  > [!TIP]
262
263
  > Documentation site is in production here : https://fast-agent.ai. Feel free to feed back what's helpful and what's not. There is also an LLMs.txt [here](https://fast-agent.ai/llms.txt)
263
264
 
264
- **`fast-agent`** enables you to create and interact with sophisticated Agents and Workflows in minutes. It is the first framework with complete, end-to-end tested MCP Feature support including Sampling. Both Anthropic (Haiku, Sonnet, Opus) and OpenAI models (gpt-4o/gpt-4.1 family, o1/o3 family) are supported.
265
+ **`fast-agent`** enables you to create and interact with sophisticated Agents and Workflows in minutes. It is the first framework with complete, end-to-end tested MCP Feature support including Sampling. Model support is comprehensive with native support for Anthropic, OpenAI and Google as well as Azure, Ollama, Deepseek and dozens of others via TensorZero.
266
+
267
+ ![multi_model_trim](https://github.com/user-attachments/assets/c8bf7474-2c41-4ef3-8924-06e29907d7c6)
265
268
 
266
269
  The simple declarative syntax lets you concentrate on composing your Prompts and MCP Servers to [build effective agents](https://www.anthropic.com/research/building-effective-agents).
267
270
 
@@ -1,11 +1,11 @@
1
1
  mcp_agent/__init__.py,sha256=18T0AG0W9sJhTY38O9GFFOzliDhxx9p87CvRyti9zbw,1620
2
2
  mcp_agent/app.py,sha256=3mtHP1nRQcRaKhhxgTmCOv00alh70nT7UxNA8bN47QE,5560
3
- mcp_agent/config.py,sha256=ZIGFCSWrhMqhlHhapQf3QXo9N6EuTVy5iZIFiiqwE2M,16289
3
+ mcp_agent/config.py,sha256=QzApCp2DaSchi11Hv_BrGAAbLixHuGGMDlDyWre_tdo,16669
4
4
  mcp_agent/console.py,sha256=Gjf2QLFumwG1Lav__c07X_kZxxEUSkzV-1_-YbAwcwo,813
5
- mcp_agent/context.py,sha256=f729LJcW4YoFXb0Rg_kEU-5FlrOnFgqplI6W0fVqomg,7631
5
+ mcp_agent/context.py,sha256=9s1F1-UfcI8rz9Yxm6EXHZ4cInuE_cOl_HFu8N8k3yc,7497
6
6
  mcp_agent/context_dependent.py,sha256=QXfhw3RaQCKfscEEBRGuZ3sdMWqkgShz2jJ1ivGGX1I,1455
7
7
  mcp_agent/event_progress.py,sha256=d7T1hQ1D289MYh2Z5bMPB4JqjGqTOzveJuOHE03B_Xo,3720
8
- mcp_agent/mcp_server_registry.py,sha256=b3iSb-0ULYc5yUG2KHav41WGwSYWiJCGQsOwWHWByxo,12346
8
+ mcp_agent/mcp_server_registry.py,sha256=lmz-aES-l7Gbg4itDF0iCmpso_KD8bVazVKSVzjwNE4,12398
9
9
  mcp_agent/progress_display.py,sha256=GeJU9VUt6qKsFVymG688hCMVCsAygG9ifiiEb5IcbN4,361
10
10
  mcp_agent/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  mcp_agent/agents/agent.py,sha256=EAYlcP1qqI1D0_CS808I806z1048FBjZQxxpcCZPeIU,3154
@@ -24,18 +24,18 @@ mcp_agent/cli/main.py,sha256=XjrgXMBaPKkVqAFo8T9LJz6Tp1-ivrKDOuNYWke99YA,3090
24
24
  mcp_agent/cli/terminal.py,sha256=GRwD-RGW7saIz2IOWZn5vD6JjiArscELBThm1GTFkuI,1065
25
25
  mcp_agent/cli/commands/check_config.py,sha256=JKOHniuMlU1bJ5vmyY7g05HDP7ZYGSQktl19bNx5I4Y,18775
26
26
  mcp_agent/cli/commands/go.py,sha256=LIsOJQuTdfCUcNm7JT-NQDU8cI-GCnYwYjN2VOWxvqs,8658
27
- mcp_agent/cli/commands/quickstart.py,sha256=SM3CHMzDgvTxIpKjFuX9BrS_N1vRoXNBDaO90aWx1Rk,14586
27
+ mcp_agent/cli/commands/quickstart.py,sha256=e4JkGwKGXxVn2yODn50NBxr5-49gqo_3IJVZTVOSPG4,17127
28
28
  mcp_agent/cli/commands/setup.py,sha256=eOEd4TL-b0DaDeSJMGOfNOsTEItoZ67W88eTP4aP-bo,6482
29
29
  mcp_agent/cli/commands/url_parser.py,sha256=5VdtcHRHzi67YignStVbz7u-rcvNNErw9oJLAUFOtEY,5855
30
30
  mcp_agent/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
31
  mcp_agent/core/agent_app.py,sha256=KJdx0Qbh7Gb4wA8_LwKriogc27SraRIrvMqHsOCVVt0,12119
32
- mcp_agent/core/agent_types.py,sha256=DogMcOoRwk70CFSetZ09madRcPDlhPn1iXZVeOcLV8Q,1507
33
- mcp_agent/core/direct_decorators.py,sha256=HY_7S7OtfZPqAeqC3_hPYa1d6zTnEyiOeI7JxvnWqTM,16786
34
- mcp_agent/core/direct_factory.py,sha256=UNAjHHFRLrQ3D934RMsKsh0Oas7LXLIVslgrzcetM6A,19090
32
+ mcp_agent/core/agent_types.py,sha256=HYeX4tleNs3yqsDpRah6KWUefSoMqn8lsHgUu_0_R6Y,1505
33
+ mcp_agent/core/direct_decorators.py,sha256=_-kV5UmRf5Juq6-4w27DH-bh3zx-MrI1fGhNxO5zRck,17539
34
+ mcp_agent/core/direct_factory.py,sha256=2qmIYYpHseiGoVf-IyrSrzYq1qi97KmuywZtvRj1jA8,19167
35
35
  mcp_agent/core/enhanced_prompt.py,sha256=5i676U9IUret8aLJ034jdCaetkGmKCcsGpOH8KVAGCY,26058
36
36
  mcp_agent/core/error_handling.py,sha256=xoyS2kLe0eG0bj2eSJCJ2odIhGUve2SbDR7jP-A-uRw,624
37
37
  mcp_agent/core/exceptions.py,sha256=ENAD_qGG67foxy6vDkIvc-lgopIUQy6O7zvNPpPXaQg,2289
38
- mcp_agent/core/fastagent.py,sha256=ak5rAyoreN5SqqoMUMP-Cr46JsOL5R2ieGyG7B5P3E8,23658
38
+ mcp_agent/core/fastagent.py,sha256=jbk4lNKTWZqqLgxUqXPZU8mBkjtFz3YjoK5VoRCh7oA,24653
39
39
  mcp_agent/core/interactive_prompt.py,sha256=J4MGENnBSmTFIv09kRAevTJutGbCdQsX2fqRwjDuK8s,30669
40
40
  mcp_agent/core/mcp_content.py,sha256=2D7KHY9mG_vxoDwFLKvsPQV9VRIzHItM7V-jcEnACh8,8878
41
41
  mcp_agent/core/prompt.py,sha256=qnintOUGEoDPYLI9bu9G2OlgVMCe5ZPUZilgMzydXhc,7919
@@ -47,6 +47,10 @@ mcp_agent/executor/executor.py,sha256=E44p6d-o3OMRoP_dNs_cDnyti91LQ3P9eNU88mSi1k
47
47
  mcp_agent/executor/task_registry.py,sha256=PCALFeYtkQrPBg4RBJnlA0aDI8nHclrNkHGUS4kV3W8,1242
48
48
  mcp_agent/executor/workflow_signal.py,sha256=Cg1uZBk3fn8kXhPOg-wINNuVaf3v9pvLD6NbqWy5Z6E,11142
49
49
  mcp_agent/human_input/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
+ mcp_agent/human_input/elicitation_form.py,sha256=RAVxAWbhTlTWclQ5Tb7OOtWIrZdFsKSssIrEOWUemvk,27004
51
+ mcp_agent/human_input/elicitation_forms.py,sha256=w8XQ1GfZX8Jw-VB4jnDI0Im4mF-T9Ts8mT2zRZBtL6M,3824
52
+ mcp_agent/human_input/elicitation_handler.py,sha256=YfVhIhSBc9wuszPS4zoHho4n1pwmIoq13huN4MSRkIs,3305
53
+ mcp_agent/human_input/elicitation_state.py,sha256=Unl9uhEybUqACCUimnETdfUprJNpYDMq3DdbbHw5oAw,1175
50
54
  mcp_agent/human_input/handler.py,sha256=s712Z5ssTCwjL9-VKoIdP5CtgMh43YvepynYisiWTTA,3144
51
55
  mcp_agent/human_input/types.py,sha256=RtWBOVzy8vnYoQrc36jRLn8z8N3C4pDPMBN5vF6qM5Y,1476
52
56
  mcp_agent/llm/__init__.py,sha256=d8zgwG-bRFuwiMNMYkywg_qytk4P8lawyld_meuUmHI,68
@@ -70,9 +74,9 @@ mcp_agent/llm/providers/augmented_llm_anthropic.py,sha256=Ve5Fy-cORgntFQQan3oajd
70
74
  mcp_agent/llm/providers/augmented_llm_azure.py,sha256=amhDGnFL9m8Jj_Eze5C98DVwC7Gm6s25WdGPdepH3fU,5903
71
75
  mcp_agent/llm/providers/augmented_llm_deepseek.py,sha256=zI9a90dwT4r6E1f_xp4K50Cj9sD7y7kNRgjo0s1pd5w,3804
72
76
  mcp_agent/llm/providers/augmented_llm_generic.py,sha256=5Uq8ZBhcFuQTt7koP_5ykolREh2iWu8zKhNbh3pM9lQ,1210
73
- mcp_agent/llm/providers/augmented_llm_google_native.py,sha256=knMIUt-XvnIwpch8Er9_B9faraN4ZKKYYtZBk9Uvpho,22161
77
+ mcp_agent/llm/providers/augmented_llm_google_native.py,sha256=pv-fgxvl8Wpyyeo6mQMYgxKNYQ4jIexh2pjhBRdWOKc,22309
74
78
  mcp_agent/llm/providers/augmented_llm_google_oai.py,sha256=cO4dvjTl9ymqEurCOo5nP09ATfXVjgkuk1yZAlWpS1s,1137
75
- mcp_agent/llm/providers/augmented_llm_openai.py,sha256=J2lTyXW4Fl6rxKNmmzTDkMuZ4sqk-vJNBfV9YuW0tvo,24073
79
+ mcp_agent/llm/providers/augmented_llm_openai.py,sha256=CvtJ4t2RZHkwr-6n7R8ELbmJqMYvCuqUgCDEuE0H3hs,24094
76
80
  mcp_agent/llm/providers/augmented_llm_openrouter.py,sha256=V_TlVKm92GHBxYIo6gpvH_6cAaIdppS25Tz6x5T7LW0,2341
77
81
  mcp_agent/llm/providers/augmented_llm_tensorzero.py,sha256=Mol_Wzj_ZtccW-LMw0oFwWUt1m1yfofloay9QYNP23c,20729
78
82
  mcp_agent/llm/providers/google_converter.py,sha256=zsqxJJ636WzCL2K6w-yB94O8bdNR6mo8f5mQEnUJFyg,16831
@@ -92,13 +96,15 @@ mcp_agent/logging/rich_progress.py,sha256=NQbW010VxfzgJw8BRaqKVTIFlTNvDfmMcoOt7p
92
96
  mcp_agent/logging/transport.py,sha256=m8YsLLu5T8eof_ndpLQs4gHOzqqEL98xsVwBwDsBfxI,17335
93
97
  mcp_agent/mcp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
94
98
  mcp_agent/mcp/common.py,sha256=MpSC0fLO21RcDz4VApah4C8_LisVGz7OXkR17Xw-9mY,431
99
+ mcp_agent/mcp/elicitation_factory.py,sha256=gY0gEsF8Jdg01nSsrVbbl62ZS1A725QgDRB6UDPCadc,3162
100
+ mcp_agent/mcp/elicitation_handlers.py,sha256=w2S4kBn05pIKdq2-X13MErinFg5jSElwFsoTuW3zFSs,6618
95
101
  mcp_agent/mcp/gen_client.py,sha256=fAVwFVCgSamw4PwoWOV4wrK9TABx1S_zZv8BctRyF2k,3030
96
102
  mcp_agent/mcp/hf_auth.py,sha256=YwEt7hMDJODFUIc6Zi1HLYsfVnvANGvyhpQwcPCMAgI,3379
97
103
  mcp_agent/mcp/interfaces.py,sha256=NxUDi4eI-qWfaOS1QHWr3EjAweV-CX_CBJeBCwTwr7g,7102
98
104
  mcp_agent/mcp/logger_textio.py,sha256=vljC1BtNTCxBAda9ExqNB-FwVNUZIuJT3h1nWmCjMws,3172
99
- mcp_agent/mcp/mcp_agent_client_session.py,sha256=V17Lj21rMGIKKVAIyNx5l5gmC8jQuohjJGpRcoCXfVA,6862
100
- mcp_agent/mcp/mcp_aggregator.py,sha256=CrUtj-BHXXCb7sUlc_MF1d7HkiF9rjh6MKaGprflBB4,47076
101
- mcp_agent/mcp/mcp_connection_manager.py,sha256=5JekxOJsB46spHsiXt7pyRPicg8TGHMiSJRtXRW2JB8,17074
105
+ mcp_agent/mcp/mcp_agent_client_session.py,sha256=34gQozI87Rw3HwpphbLRv9NMLP9EKRLRsKmWlcyW624,8886
106
+ mcp_agent/mcp/mcp_aggregator.py,sha256=kVLzNjik7VIlu60ci4iNO_VvseX2G16E8DAjPxK232I,49072
107
+ mcp_agent/mcp/mcp_connection_manager.py,sha256=dJxjnv2IRzlFIxrbPFl39-pmGcZHgyeMXVlMfqpREhE,17974
102
108
  mcp_agent/mcp/mime_utils.py,sha256=difepNR_gpb4MpMLkBRAoyhDk-AjXUHTiqKvT_VwS1o,1805
103
109
  mcp_agent/mcp/prompt_message_multipart.py,sha256=BDwRdNwyWHb2q2bccDb2iR2VlORqVvkvoG3xYzcMpCE,4403
104
110
  mcp_agent/mcp/prompt_render.py,sha256=k3v4BZDThGE2gGiOYVQtA6x8WTEdOuXIEnRafANhN1U,2996
@@ -106,8 +112,8 @@ mcp_agent/mcp/prompt_serialization.py,sha256=MQY6QxnhQTiq0oBDsyRzFtX8sBiovUjzUFX
106
112
  mcp_agent/mcp/resource_utils.py,sha256=K4XY8bihmBMleRTZ2viMPiD2Y2HWxFnlgIJi6dd_PYE,6588
107
113
  mcp_agent/mcp/sampling.py,sha256=kge2r-a72fRY2ncsvQSXHr6ahYjV_fJJvkoapPQT_V4,6388
108
114
  mcp_agent/mcp/helpers/__init__.py,sha256=sKqwlUR3jSsd9PVJKjXtxHgZA1YOdzPtsSW4xVey77Q,52
109
- mcp_agent/mcp/helpers/content_helpers.py,sha256=KsD77eCr1O6gv2Fz7vlVZxLyBgqscgsS25OqSJ8ksoY,3349
110
- mcp_agent/mcp/helpers/server_config_helpers.py,sha256=yOiMFkdLyPuFHXBGqLoVJtefu9Gk-szL6y3eh8em92Y,748
115
+ mcp_agent/mcp/helpers/content_helpers.py,sha256=fOrRq6sIHR0Zn18k9GRRn9PWBB5WosPLhvK0yVXg2Vg,4191
116
+ mcp_agent/mcp/helpers/server_config_helpers.py,sha256=MkyZB2ZzfsBNsqyGd0LfUOoXxhAMS28VF-f747cJJpY,978
111
117
  mcp_agent/mcp/prompts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
112
118
  mcp_agent/mcp/prompts/__main__.py,sha256=gr1Tdz9fcK0EXjEuZg_BOnKUmvhYq5AH2lFZicVyNb0,237
113
119
  mcp_agent/mcp/prompts/prompt_constants.py,sha256=Q9W0t3rOXl2LHIG9wcghApUV2QZ1iICuo7SwVwHUf3c,566
@@ -116,50 +122,42 @@ mcp_agent/mcp/prompts/prompt_load.py,sha256=Zo0FogqWFEG5FtF1d9ZH-RWsCSSMsi5FIEQH
116
122
  mcp_agent/mcp/prompts/prompt_server.py,sha256=38DoKCg0YOUIraNyEfAvQQbXQ2_00l3h-LFDJoklAEw,19378
117
123
  mcp_agent/mcp/prompts/prompt_template.py,sha256=EejiqGkau8OizORNyKTUwUjrPof5V-hH1H_MBQoQfXw,15732
118
124
  mcp_agent/mcp_server/__init__.py,sha256=zBU51ITHIEPScd9nRafnhEddsWqXRPAAvHhkrbRI2_4,155
119
- mcp_agent/mcp_server/agent_server.py,sha256=df3UbPLg52e_SS98F3lc4T8BqqzvQRBl6kplODsaq-M,20096
125
+ mcp_agent/mcp_server/agent_server.py,sha256=WZmRL-4f3eH0hHTYS60Z0rv7-GOTeLKgsSdaXttt5Xw,20201
120
126
  mcp_agent/resources/examples/data-analysis/analysis-campaign.py,sha256=16gxrQ5kM8fb8tPwSCMXaitonk3PSEhz28njWwPxXrw,7269
121
- mcp_agent/resources/examples/data-analysis/analysis.py,sha256=M9z8Q4YC5OGuqSa5uefYmmfmctqMn-WqCSfg5LI407o,2609
127
+ mcp_agent/resources/examples/data-analysis/analysis.py,sha256=UaZk8RzsIj0TVXIM1kx71nfC_mlyJo-wAXlIHnrXH1I,2578
122
128
  mcp_agent/resources/examples/data-analysis/fastagent.config.yaml,sha256=ini94PHyJCfgpjcjHKMMbGuHs6LIj46F1NwY0ll5HVk,1609
123
129
  mcp_agent/resources/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv,sha256=pcMeOL1_r8m8MziE6xgbBrQbjl5Ijo98yycZn7O-dlk,227977
124
- mcp_agent/resources/examples/in_dev/agent_build.py,sha256=BMPjW72Yl8ACSTOUWNg-LEe30BAsKPYrGFVqVQPgugE,2855
125
- mcp_agent/resources/examples/in_dev/css-LICENSE.txt,sha256=zv0cyruZlRdeDUploPpO54kV1x1fFAc90X7vXVPrUIY,1073
126
- mcp_agent/resources/examples/in_dev/slides.py,sha256=-SEFeGIg9SLF253NIxmA0NjlanLe8CR1yjDBBp2LXgs,4904
127
- mcp_agent/resources/examples/internal/agent.py,sha256=JDfb-64gKoEG6ihsyyVWkuY9XNOdC1-P3r9qwG_qN28,497
128
- mcp_agent/resources/examples/internal/fastagent.config.yaml,sha256=EPJW8vsRfYq57w2U2gPF0rTAxGhkaLgiYXw0mnpXsdM,2060
129
- mcp_agent/resources/examples/internal/history_transfer.py,sha256=ETyX2wMMvUnMpUhu4ij9ZTpw2wQR6vPpBwlXJswPnhM,1157
130
- mcp_agent/resources/examples/internal/job.py,sha256=Z-c78iqbgHRZG5GSQekHuRTxFUrKMqMaOSOlRYAgamM,4103
131
- mcp_agent/resources/examples/internal/prompt_category.py,sha256=kMvqNX_zu0sV-kTaAR3skc_tsq9t8QSEofciK0m4aJc,551
132
- mcp_agent/resources/examples/internal/prompt_sizing.py,sha256=bskgxulN57hVkc0V9W0fnjnqSRCK5Tkw9Ggf2MmGIVU,1989
133
- mcp_agent/resources/examples/internal/simple.txt,sha256=lcWo9h4NJE1OshBhRgg2QBHhHHqcrVj5j1LWdlyYlAk,14
134
- mcp_agent/resources/examples/internal/sizer.py,sha256=xP1TBJkp4xIdtJnyk2MP4BufThauzULaMmgnt5Y5Iw4,365
135
- mcp_agent/resources/examples/internal/social.py,sha256=pTKcpHAcvA-vQYgjVfDuU1FivCR004Nq4N2GXd5OMs0,1716
130
+ mcp_agent/resources/examples/mcp/elicitations/elicitation_account_server.py,sha256=ZrPcj0kv75QXvtN0J_vhCmwxycnAodv35adUBZ9_8Ss,2903
131
+ mcp_agent/resources/examples/mcp/elicitations/elicitation_forms_server.py,sha256=n-qVogV2I0GYGwYe-8PG1DEvp4M3JzKHoYmemMEm6Ic,8831
132
+ mcp_agent/resources/examples/mcp/elicitations/elicitation_game_server.py,sha256=z9kHdNc6XWjAWkvet7inVBIcYxfWoxU6n9iHrsEqU7A,6206
133
+ mcp_agent/resources/examples/mcp/elicitations/fastagent.config.yaml,sha256=HPe0cuFL4-rzS4hHNgZiLMPEv0jYXOp7iSsrUliAaqs,1080
134
+ mcp_agent/resources/examples/mcp/elicitations/fastagent.secrets.yaml.example,sha256=1vkBmh9f4mnQZm6-2B7vyU1OepImviPW5MNAJkvUIPE,394
135
+ mcp_agent/resources/examples/mcp/elicitations/forms_demo.py,sha256=Yorh2SPZ0xUiLcMv_oQPGLerO-wSPlBj3V9Z1bS7DqQ,4482
136
+ mcp_agent/resources/examples/mcp/elicitations/game_character.py,sha256=forNICa8SzrvrVuwzDa9HcpjauByQHbkryO2yavxqc4,2372
137
+ mcp_agent/resources/examples/mcp/elicitations/game_character_handler.py,sha256=tOp8rFJ0ZDrzR5siATZT_RUh7wyRpicGwcOcfTeCd2c,11211
138
+ mcp_agent/resources/examples/mcp/elicitations/tool_call.py,sha256=1JWeN5YnbsuASu5eQxY9yvur4KLWtUs7j0c5jSeiq9A,530
136
139
  mcp_agent/resources/examples/mcp/state-transfer/agent_one.py,sha256=HR-Igr8k68HU0tqIpaXujtJxnKSUwwtZqTdZk8QHNgo,455
137
- mcp_agent/resources/examples/mcp/state-transfer/agent_two.py,sha256=TY9SPzJZFv3TL6VEP3IpdJvTjYup5txF_DjpvEzlmbw,476
138
- mcp_agent/resources/examples/mcp/state-transfer/fastagent.config.yaml,sha256=e3Esqw850p9GcapVVhPhAAHWwtt2gH2ivsVIULD9n6Q,798
139
- mcp_agent/resources/examples/mcp/state-transfer/fastagent.secrets.yaml.example,sha256=0n3F2S_Z2CeLHZueZqCGy37mxiMDHLplvxUHYiCpD2A,421
140
- mcp_agent/resources/examples/prompting/__init__.py,sha256=2GSrs9MSDIKo-uDrUI0O311F0UH0RW02ZNdvItJzjfI,50
141
- mcp_agent/resources/examples/prompting/agent.py,sha256=HxzUsidfxoc7Th0Ws55ppQCHNLkdZvcbiAcc2fMd4KI,490
142
- mcp_agent/resources/examples/prompting/delimited_prompt.txt,sha256=T_RRcJVXbrI6fXUIatQxx-8vALJ64qQqh-2WPeRS1b8,305
143
- mcp_agent/resources/examples/prompting/fastagent.config.yaml,sha256=EN9vERBVxIqvhv9EbbaYePMx-0_TpmZBr_vW7UxRdKA,1273
144
- mcp_agent/resources/examples/prompting/image_server.py,sha256=vRDRGi68BqTWcldZ4-sd8j41M3e5TtWIUSzIROK8uFo,1667
145
- mcp_agent/resources/examples/prompting/prompt1.txt,sha256=H3Is5WvS9xeB7eP2-4bWF5PfZhZ6B0BICKGdGeKL9WE,64
146
- mcp_agent/resources/examples/prompting/work_with_image.py,sha256=2MctSPXZsmIyCYvsxsRc1_v_8v0ZKorHH0gWZxLW8Tc,507
140
+ mcp_agent/resources/examples/mcp/state-transfer/agent_two.py,sha256=JWt0Nyv6WPGGILcuavvFou1Ug5JuEy6hJqUfY7wj750,478
141
+ mcp_agent/resources/examples/mcp/state-transfer/fastagent.config.yaml,sha256=A6CUcDqnFXlkhsA_Mw-I0ys2Egn7a37AfVSWl89lvxA,797
142
+ mcp_agent/resources/examples/mcp/state-transfer/fastagent.secrets.yaml.example,sha256=pVGyO_c6j3BToNpnL0d6W1FD5iLcuCNBrqA1sYMV-cA,422
147
143
  mcp_agent/resources/examples/researcher/fastagent.config.yaml,sha256=TbVMHQCKcytVr44o0cpsgP-tAJ2S2OlTgn6VnXSTIpM,2242
148
144
  mcp_agent/resources/examples/researcher/researcher-eval.py,sha256=CR9m4lyoXijS1whvsBDuk6IA-RmNc6iOYbtloETkITY,1833
149
145
  mcp_agent/resources/examples/researcher/researcher-imp.py,sha256=oJxSVnLbZfIn71QbQR1E6j_m_UBrOOGP4SVljXErHLQ,7879
150
146
  mcp_agent/resources/examples/researcher/researcher.py,sha256=SZfExi-FfwYETzGt2O3caS3L5E6EemV3IUrJHyzZqHI,1333
151
147
  mcp_agent/resources/examples/workflows/chaining.py,sha256=tY0kA0U8s2rceAO4ogZFtpQEkiUWcrYnYDgHu_-4G50,889
152
- mcp_agent/resources/examples/workflows/evaluator.py,sha256=cQJCHLqzmzUZwrJoAYLpZv_C_LG26kAUWh3dKQPXtJA,3095
148
+ mcp_agent/resources/examples/workflows/evaluator.py,sha256=pZckGkulwZguSkEaQFejXyZQm143LU_sHqUtCB_m_dA,3096
153
149
  mcp_agent/resources/examples/workflows/fastagent.config.yaml,sha256=qaxk-p7Pl7JepdL3a7BTl0CIp4LHCXies7pFdVWS9xk,783
150
+ mcp_agent/resources/examples/workflows/graded_report.md,sha256=QVF38xEtDIO1a2P-xv2hlBEG6KKYughtFkzDhY2NpzE,2726
154
151
  mcp_agent/resources/examples/workflows/human_input.py,sha256=_I6nS6xYo8IHAmvzsUYOxqVGb4G6BTyJXPAmS3fNcBU,621
155
- mcp_agent/resources/examples/workflows/orchestrator.py,sha256=rOGilFTliWWnZ3Jx5wZOH6AQMBKwaGqSMI4PR9MKcZw,2507
156
- mcp_agent/resources/examples/workflows/parallel.py,sha256=DQ5vY5-h8Qa5QHcYjsWXhZ_FYrYoloVWOdgeXV9p2gI,1890
152
+ mcp_agent/resources/examples/workflows/orchestrator.py,sha256=5Jxfe0s3ai4qRpVXm3DaqtkDvjeWD2CcysW36J6JA-M,2521
153
+ mcp_agent/resources/examples/workflows/parallel.py,sha256=OTWhX33uum_rspAzrSf3uCTj7b67Kvw3UUU8nsosz4g,1839
157
154
  mcp_agent/resources/examples/workflows/router.py,sha256=E4x_-c3l4YW9w1i4ARcDtkdeqIdbWEGfsMzwLYpdbVc,1677
155
+ mcp_agent/resources/examples/workflows/short_story.md,sha256=XN9I2kzCcMmke3dE5F2lyRH5iFUZUQ8Sy-hS3rm_Wlc,1153
158
156
  mcp_agent/resources/examples/workflows/short_story.txt,sha256=X3y_1AyhLFN2AKzCKvucJtDgAFIJfnlbsbGZO5bBWu0,1187
159
157
  mcp_agent/tools/tool_definition.py,sha256=L3Pxl-uLEXqlVoo-bYuFTFALeI-2pIU44YgFhsTKEtM,398
160
158
  mcp_agent/ui/console_display.py,sha256=UKqax5V2TC0hkZZORmmd6UqUk0DGX7A25E3h1k9f42k,10982
161
- fast_agent_mcp-0.2.36.dist-info/METADATA,sha256=a03lmLxEkpn8uOkq0-jZUBsqxwVi80vmZeUgcVSPrxI,30798
162
- fast_agent_mcp-0.2.36.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
163
- fast_agent_mcp-0.2.36.dist-info/entry_points.txt,sha256=oKQeSUVn87pJv8_k1NQ7Ak8cXaaXHCnPAOJRCV_uUVg,230
164
- fast_agent_mcp-0.2.36.dist-info/licenses/LICENSE,sha256=cN3FxDURL9XuzE5mhK9L2paZo82LTfjwCYVT7e3j0e4,10939
165
- fast_agent_mcp-0.2.36.dist-info/RECORD,,
159
+ fast_agent_mcp-0.2.38.dist-info/METADATA,sha256=oFNrGrMZRDaOR125GzE7PhnjsMxTJGv2vD75Bz_suNY,30983
160
+ fast_agent_mcp-0.2.38.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
161
+ fast_agent_mcp-0.2.38.dist-info/entry_points.txt,sha256=oKQeSUVn87pJv8_k1NQ7Ak8cXaaXHCnPAOJRCV_uUVg,230
162
+ fast_agent_mcp-0.2.38.dist-info/licenses/LICENSE,sha256=Gx1L3axA4PnuK4FxsbX87jQ1opoOkSFfHHSytW6wLUU,10935
163
+ fast_agent_mcp-0.2.38.dist-info/RECORD,,
@@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work.
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright [2025] [llmindset.co.uk]
189
+ Copyright 2025 llmindset.co.uk
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
@@ -59,6 +59,23 @@ EXAMPLE_TYPES = {
59
59
  ],
60
60
  "create_subdir": True,
61
61
  },
62
+ "elicitations": {
63
+ "description": "Interactive form examples using MCP elicitations feature.\n"
64
+ "Demonstrates collecting structured data with forms, AI-guided workflows,\n"
65
+ "and custom handlers. Creates examples in an 'elicitations' subdirectory.",
66
+ "files": [
67
+ "elicitation_account_server.py",
68
+ "elicitation_forms_server.py",
69
+ "elicitation_game_server.py",
70
+ "fastagent.config.yaml",
71
+ "fastagent.secrets.yaml.example",
72
+ "forms_demo.py",
73
+ "game_character.py",
74
+ "game_character_handler.py",
75
+ "tool_call.py",
76
+ ],
77
+ "create_subdir": True,
78
+ },
62
79
  }
63
80
 
64
81
 
@@ -96,6 +113,15 @@ def copy_example_files(example_type: str, target_dir: Path, force: bool = False)
96
113
  .joinpath("mcp")
97
114
  .joinpath("state-transfer")
98
115
  )
116
+ elif example_type == "elicitations":
117
+ # The elicitations example is in the mcp subdirectory
118
+ source_dir = (
119
+ files("mcp_agent")
120
+ .joinpath("resources")
121
+ .joinpath("examples")
122
+ .joinpath("mcp")
123
+ .joinpath("elicitations")
124
+ )
99
125
  else:
100
126
  # Other examples are at the top level of examples
101
127
  source_dir = (
@@ -114,6 +140,8 @@ def copy_example_files(example_type: str, target_dir: Path, force: bool = False)
114
140
  package_dir = Path(__file__).parent.parent.parent.parent.parent
115
141
  if example_type == "state-transfer":
116
142
  source_dir = package_dir / "examples" / "mcp" / "state-transfer"
143
+ elif example_type == "elicitations":
144
+ source_dir = package_dir / "examples" / "mcp" / "elicitations"
117
145
  else:
118
146
  source_dir = (
119
147
  package_dir
@@ -129,6 +157,8 @@ def copy_example_files(example_type: str, target_dir: Path, force: bool = False)
129
157
  package_dir = Path(__file__).parent.parent.parent.parent.parent
130
158
  if example_type == "state-transfer":
131
159
  source_dir = package_dir / "examples" / "mcp" / "state-transfer"
160
+ elif example_type == "elicitations":
161
+ source_dir = package_dir / "examples" / "mcp" / "elicitations"
132
162
  else:
133
163
  source_dir = (
134
164
  package_dir
@@ -219,17 +249,19 @@ def show_overview() -> None:
219
249
  # Show usage instructions in a panel
220
250
  usage_text = (
221
251
  "[bold]Commands:[/bold]\n"
222
- " fastagent quickstart workflow DIR Create workflow examples in DIR\n"
223
- " fastagent quickstart researcher DIR Create researcher example in 'researcher' subdirectory\n"
224
- " fastagent quickstart data-analysis DIR Create data analysis examples in 'data-analysis' subdirectory\n"
225
- " fastagent quickstart state-transfer DIR Create state transfer examples in 'state-transfer' subdirectory\n\n"
252
+ " fastagent quickstart workflow DIR Create workflow examples in DIR\n"
253
+ " fastagent quickstart researcher DIR Create researcher example in 'researcher' subdirectory\n"
254
+ " fastagent quickstart data-analysis DIR Create data analysis examples in 'data-analysis' subdirectory\n"
255
+ " fastagent quickstart state-transfer DIR Create state transfer examples in 'state-transfer' subdirectory\n"
256
+ " fastagent quickstart elicitations DIR Create elicitation examples in 'elicitations' subdirectory\n\n"
226
257
  "[bold]Options:[/bold]\n"
227
258
  " --force Overwrite existing files\n\n"
228
259
  "[bold]Examples:[/bold]\n"
229
260
  " fastagent quickstart workflow . Create in current directory\n"
230
261
  " fastagent quickstart researcher . Create in researcher subdirectory\n"
231
262
  " fastagent quickstart data-analysis . --force Force overwrite files in data-analysis subdirectory\n"
232
- " fastagent quickstart state-transfer . Create state transfer examples"
263
+ " fastagent quickstart state-transfer . Create state transfer examples\n"
264
+ " fastagent quickstart elicitations . Create elicitation form examples"
233
265
  )
234
266
  console.print(Panel(usage_text, title="Usage", border_style="blue"))
235
267
 
@@ -306,6 +338,24 @@ def state_transfer(
306
338
  _show_completion_message("state-transfer", created)
307
339
 
308
340
 
341
+ @app.command()
342
+ def elicitations(
343
+ directory: Path = typer.Argument(
344
+ Path("."),
345
+ help="Directory where elicitation examples will be created (in 'elicitations' subdirectory)",
346
+ ),
347
+ force: bool = typer.Option(False, "--force", "-f", help="Force overwrite existing files"),
348
+ ) -> None:
349
+ """Create interactive form examples using MCP elicitations."""
350
+ target_dir = directory.resolve()
351
+ if not target_dir.exists():
352
+ target_dir.mkdir(parents=True)
353
+ console.print(f"Created directory: {target_dir}")
354
+
355
+ created = copy_example_files("elicitations", target_dir, force)
356
+ _show_completion_message("elicitations", created)
357
+
358
+
309
359
  def _show_completion_message(example_type: str, created: list[str]) -> None:
310
360
  """Show completion message and next steps."""
311
361
  if created:
@@ -342,6 +392,11 @@ def _show_completion_message(example_type: str, created: list[str]) -> None:
342
392
  )
343
393
  elif example_type == "state-transfer":
344
394
  console.print("Check https://fast-agent.ai for quick start walkthroughs")
395
+ elif example_type == "elicitations":
396
+ console.print("1. Try the forms demo: uv run forms_demo.py")
397
+ console.print("2. For the AI assistant example, configure your API keys first")
398
+ console.print("3. Run the game character creator: uv run game_character.py")
399
+ console.print("4. Check the README.md for detailed information about elicitations")
345
400
  else:
346
401
  console.print("\n[yellow]No files were created.[/yellow]")
347
402
 
mcp_agent/config.py CHANGED
@@ -26,6 +26,13 @@ class MCPSamplingSettings(BaseModel):
26
26
  model_config = ConfigDict(extra="allow", arbitrary_types_allowed=True)
27
27
 
28
28
 
29
+ class MCPElicitationSettings(BaseModel):
30
+ mode: Literal["forms", "auto_cancel", "none"] = "none"
31
+ """Elicitation mode: 'forms' (default UI), 'auto_cancel', 'none' (no capability)"""
32
+
33
+ model_config = ConfigDict(extra="allow", arbitrary_types_allowed=True)
34
+
35
+
29
36
  class MCPRootSettings(BaseModel):
30
37
  """Represents a root directory configuration for an MCP server."""
31
38
 
@@ -95,6 +102,9 @@ class MCPServerSettings(BaseModel):
95
102
  sampling: MCPSamplingSettings | None = None
96
103
  """Sampling settings for this Client/Server pair"""
97
104
 
105
+ elicitation: MCPElicitationSettings | None = None
106
+ """Elicitation settings for this Client/Server pair"""
107
+
98
108
  cwd: str | None = None
99
109
  """Working directory for the executed server command."""
100
110
 
mcp_agent/context.py CHANGED
@@ -10,10 +10,7 @@ from typing import TYPE_CHECKING, Any, Optional, Union
10
10
  from mcp import ServerSession
11
11
  from opentelemetry import trace
12
12
  from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
13
- from opentelemetry.instrumentation.anthropic import AnthropicInstrumentor
14
13
  from opentelemetry.instrumentation.google_genai import GoogleGenAiSdkInstrumentor
15
-
16
- # from opentelemetry.instrumentation.mcp import McpInstrumentor
17
14
  from opentelemetry.instrumentation.openai import OpenAIInstrumentor
18
15
  from opentelemetry.propagate import set_global_textmap
19
16
  from opentelemetry.sdk.resources import Resource
@@ -112,7 +109,7 @@ async def configure_otel(config: "Settings") -> None:
112
109
 
113
110
  # Set as global tracer provider
114
111
  trace.set_tracer_provider(tracer_provider)
115
- AnthropicInstrumentor().instrument()
112
+ # AnthropicInstrumentor().instrument()
116
113
  OpenAIInstrumentor().instrument()
117
114
  GoogleGenAiSdkInstrumentor().instrument()
118
115
 
@@ -2,10 +2,11 @@
2
2
  Type definitions for agents and agent configurations.
3
3
  """
4
4
 
5
+ from dataclasses import dataclass, field
5
6
  from enum import Enum
6
7
  from typing import List
7
8
 
8
- from pydantic import BaseModel, Field, model_validator
9
+ from mcp.client.session import ElicitationFnT
9
10
 
10
11
  # Forward imports to avoid circular dependencies
11
12
  from mcp_agent.core.request_params import RequestParams
@@ -23,21 +24,22 @@ class AgentType(Enum):
23
24
  CHAIN = "chain"
24
25
 
25
26
 
26
- class AgentConfig(BaseModel):
27
+ @dataclass
28
+ class AgentConfig:
27
29
  """Configuration for an Agent instance"""
28
30
 
29
31
  name: str
30
32
  instruction: str = "You are a helpful agent."
31
- servers: List[str] = Field(default_factory=list)
33
+ servers: List[str] = field(default_factory=list)
32
34
  model: str | None = None
33
35
  use_history: bool = True
34
36
  default_request_params: RequestParams | None = None
35
37
  human_input: bool = False
36
38
  agent_type: AgentType = AgentType.BASIC
37
39
  default: bool = False
40
+ elicitation_handler: ElicitationFnT | None = None
38
41
 
39
- @model_validator(mode="after")
40
- def ensure_default_request_params(self) -> "AgentConfig":
42
+ def __post_init__(self):
41
43
  """Ensure default_request_params exists with proper history setting"""
42
44
  if self.default_request_params is None:
43
45
  self.default_request_params = RequestParams(
@@ -46,4 +48,3 @@ class AgentConfig(BaseModel):
46
48
  else:
47
49
  # Override the request params history setting if explicitly configured
48
50
  self.default_request_params.use_history = self.use_history
49
- return self
@@ -19,6 +19,8 @@ from typing import (
19
19
  cast,
20
20
  )
21
21
 
22
+ from mcp.client.session import ElicitationFnT
23
+
22
24
  from mcp_agent.agents.agent import AgentConfig
23
25
  from mcp_agent.core.agent_types import AgentType
24
26
  from mcp_agent.core.request_params import RequestParams
@@ -135,6 +137,7 @@ def _decorator_impl(
135
137
  use_history=use_history,
136
138
  human_input=human_input,
137
139
  default=default,
140
+ elicitation_handler=extra_kwargs.get("elicitation_handler"),
138
141
  )
139
142
 
140
143
  # Update request params if provided
@@ -178,6 +181,7 @@ def agent(
178
181
  request_params: RequestParams | None = None,
179
182
  human_input: bool = False,
180
183
  default: bool = False,
184
+ elicitation_handler: Optional[ElicitationFnT] = None,
181
185
  ) -> Callable[[AgentCallable[P, R]], DecoratedAgentProtocol[P, R]]:
182
186
  """
183
187
  Decorator to create and register a standard agent with type-safe signature.
@@ -192,6 +196,7 @@ def agent(
192
196
  request_params: Additional request parameters for the LLM
193
197
  human_input: Whether to enable human input capabilities
194
198
  default: Whether to mark this as the default agent
199
+ elicitation_handler: Custom elicitation handler function (ElicitationFnT)
195
200
 
196
201
  Returns:
197
202
  A decorator that registers the agent with proper type annotations
@@ -209,6 +214,7 @@ def agent(
209
214
  request_params=request_params,
210
215
  human_input=human_input,
211
216
  default=default,
217
+ elicitation_handler=elicitation_handler,
212
218
  )
213
219
 
214
220
 
@@ -225,6 +231,7 @@ def custom(
225
231
  request_params: RequestParams | None = None,
226
232
  human_input: bool = False,
227
233
  default: bool = False,
234
+ elicitation_handler: Optional[ElicitationFnT] = None,
228
235
  ) -> Callable[[AgentCallable[P, R]], DecoratedAgentProtocol[P, R]]:
229
236
  """
230
237
  Decorator to create and register a standard agent with type-safe signature.
@@ -238,6 +245,7 @@ def custom(
238
245
  use_history: Whether to maintain conversation history
239
246
  request_params: Additional request parameters for the LLM
240
247
  human_input: Whether to enable human input capabilities
248
+ elicitation_handler: Custom elicitation handler function (ElicitationFnT)
241
249
 
242
250
  Returns:
243
251
  A decorator that registers the agent with proper type annotations
@@ -256,6 +264,7 @@ def custom(
256
264
  human_input=human_input,
257
265
  agent_class=cls,
258
266
  default=default,
267
+ elicitation_handler=elicitation_handler,
259
268
  )
260
269
 
261
270
 
@@ -333,6 +342,9 @@ def router(
333
342
  request_params: RequestParams | None = None,
334
343
  human_input: bool = False,
335
344
  default: bool = False,
345
+ elicitation_handler: Optional[
346
+ ElicitationFnT
347
+ ] = None, ## exclude from docs, decide whether allowable
336
348
  ) -> Callable[[AgentCallable[P, R]], DecoratedRouterProtocol[P, R]]:
337
349
  """
338
350
  Decorator to create and register a router agent with type-safe signature.
@@ -346,6 +358,7 @@ def router(
346
358
  request_params: Additional request parameters for the LLM
347
359
  human_input: Whether to enable human input capabilities
348
360
  default: Whether to mark this as the default agent
361
+ elicitation_handler: Custom elicitation handler function (ElicitationFnT)
349
362
 
350
363
  Returns:
351
364
  A decorator that registers the router with proper type annotations
@@ -369,6 +382,7 @@ def router(
369
382
  human_input=human_input,
370
383
  default=default,
371
384
  router_agents=agents,
385
+ elicitation_handler=elicitation_handler,
372
386
  ),
373
387
  )
374
388
 
@@ -237,6 +237,7 @@ async def create_agents_by_type(
237
237
  context=app_instance.context,
238
238
  fan_in_agent=fan_in_agent,
239
239
  fan_out_agents=fan_out_agents,
240
+ include_request=agent_data.get("include_request", True),
240
241
  )
241
242
  await parallel.initialize()
242
243
  result_agents[name] = parallel
@@ -81,7 +81,8 @@ class FastAgent:
81
81
  name: str,
82
82
  config_path: str | None = None,
83
83
  ignore_unknown_args: bool = False,
84
- parse_cli_args: bool = True, # Add new parameter with default True
84
+ parse_cli_args: bool = True,
85
+ quiet: bool = False, # Add quiet parameter
85
86
  ) -> None:
86
87
  """
87
88
  Initialize the fast-agent application.
@@ -94,8 +95,10 @@ class FastAgent:
94
95
  parse_cli_args: If True, parse command line arguments using argparse.
95
96
  Set to False when embedding FastAgent in another framework
96
97
  (like FastAPI/Uvicorn) that handles its own arguments.
98
+ quiet: If True, disable progress display, tool and message logging for cleaner output
97
99
  """
98
100
  self.args = argparse.Namespace() # Initialize args always
101
+ self._programmatic_quiet = quiet # Store the programmatic quiet setting
99
102
 
100
103
  # --- Wrap argument parsing logic ---
101
104
  if parse_cli_args:
@@ -173,6 +176,10 @@ class FastAgent:
173
176
  sys.exit(0)
174
177
  # --- End of wrapped logic ---
175
178
 
179
+ # Apply programmatic quiet setting (overrides CLI if both are set)
180
+ if self._programmatic_quiet:
181
+ self.args.quiet = True
182
+
176
183
  self.name = name
177
184
  self.config_path = config_path
178
185
 
@@ -180,12 +187,26 @@ class FastAgent:
180
187
  # Load configuration directly for this instance
181
188
  self._load_config()
182
189
 
190
+ # Apply programmatic quiet mode to config before creating app
191
+ if self._programmatic_quiet and hasattr(self, "config"):
192
+ if "logger" not in self.config:
193
+ self.config["logger"] = {}
194
+ self.config["logger"]["progress_display"] = False
195
+ self.config["logger"]["show_chat"] = False
196
+ self.config["logger"]["show_tools"] = False
197
+
183
198
  # Create the app with our local settings
184
199
  self.app = MCPApp(
185
200
  name=name,
186
201
  settings=config.Settings(**self.config) if hasattr(self, "config") else None,
187
202
  )
188
203
 
204
+ # Stop progress display immediately if quiet mode is requested
205
+ if self._programmatic_quiet:
206
+ from mcp_agent.progress_display import progress_display
207
+
208
+ progress_display.stop()
209
+
189
210
  except yaml.parser.ParserError as e:
190
211
  handle_error(
191
212
  e,
@@ -486,7 +507,7 @@ class FastAgent:
486
507
 
487
508
  async def start_server(
488
509
  self,
489
- transport: str = "sse",
510
+ transport: str = "http",
490
511
  host: str = "0.0.0.0",
491
512
  port: int = 8000,
492
513
  server_name: Optional[str] = None,