fast-agent-mcp 0.2.4__py3-none-any.whl → 0.2.6__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.
- {fast_agent_mcp-0.2.4.dist-info → fast_agent_mcp-0.2.6.dist-info}/METADATA +2 -2
- {fast_agent_mcp-0.2.4.dist-info → fast_agent_mcp-0.2.6.dist-info}/RECORD +32 -33
- mcp_agent/agents/agent.py +1 -1
- mcp_agent/agents/base_agent.py +25 -13
- mcp_agent/agents/workflow/chain_agent.py +7 -1
- mcp_agent/agents/workflow/evaluator_optimizer.py +6 -0
- mcp_agent/agents/workflow/orchestrator_agent.py +6 -1
- mcp_agent/agents/workflow/parallel_agent.py +7 -1
- mcp_agent/agents/workflow/router_agent.py +7 -2
- mcp_agent/cli/commands/setup.py +2 -2
- mcp_agent/cli/main.py +11 -0
- mcp_agent/config.py +29 -7
- mcp_agent/context.py +2 -0
- mcp_agent/core/agent_app.py +8 -19
- mcp_agent/core/agent_types.py +1 -0
- mcp_agent/core/direct_decorators.py +2 -1
- mcp_agent/core/direct_factory.py +6 -15
- mcp_agent/core/enhanced_prompt.py +3 -3
- mcp_agent/core/fastagent.py +202 -46
- mcp_agent/core/interactive_prompt.py +1 -1
- mcp_agent/llm/augmented_llm.py +8 -10
- mcp_agent/llm/augmented_llm_passthrough.py +3 -1
- mcp_agent/llm/model_factory.py +5 -7
- mcp_agent/mcp/interfaces.py +5 -0
- mcp_agent/mcp/prompt_serialization.py +42 -0
- mcp_agent/mcp/prompts/prompt_load.py +51 -3
- mcp_agent/mcp_server/agent_server.py +61 -12
- mcp_agent/resources/examples/internal/agent.py +2 -2
- mcp_agent/resources/examples/internal/fastagent.config.yaml +5 -0
- mcp_agent/mcp/mcp_agent_server.py +0 -56
- {fast_agent_mcp-0.2.4.dist-info → fast_agent_mcp-0.2.6.dist-info}/WHEEL +0 -0
- {fast_agent_mcp-0.2.4.dist-info → fast_agent_mcp-0.2.6.dist-info}/entry_points.txt +0 -0
- {fast_agent_mcp-0.2.4.dist-info → fast_agent_mcp-0.2.6.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: fast-agent-mcp
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.6
|
4
4
|
Summary: Define, Prompt and Test MCP enabled Agents and Workflows
|
5
5
|
Author-email: Shaun Smith <fastagent@llmindset.co.uk>, Sarmad Qadri <sarmad@lastmileai.dev>
|
6
6
|
License: Apache License
|
@@ -244,7 +244,7 @@ Description-Content-Type: text/markdown
|
|
244
244
|
<a href="https://pypi.org/project/fast-agent-mcp/"><img src="https://img.shields.io/pypi/v/fast-agent-mcp?color=%2334D058&label=pypi" /></a>
|
245
245
|
<a href="#"><img src="https://github.com/evalstate/fast-agent/actions/workflows/main-checks.yml/badge.svg" /></a>
|
246
246
|
<a href="https://github.com/evalstate/fast-agent/issues"><img src="https://img.shields.io/github/issues-raw/evalstate/fast-agent" /></a>
|
247
|
-
<a href="https://
|
247
|
+
<a href="https://discord.gg/xg5cJ7ndN6"><img src="https://img.shields.io/discord/1358470293990936787" alt="discord" /></a>
|
248
248
|
<img alt="Pepy Total Downloads" src="https://img.shields.io/pepy/dt/fast-agent-mcp?label=pypi%20%7C%20downloads"/>
|
249
249
|
<a href="https://github.com/evalstate/fast-agent-mcp/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/fast-agent-mcp" /></a>
|
250
250
|
</p>
|
@@ -1,40 +1,40 @@
|
|
1
1
|
mcp_agent/__init__.py,sha256=-AIoeL4c9UAp_P4U0z-uIWTTmQWdihOis5nbQ5L_eao,1664
|
2
2
|
mcp_agent/app.py,sha256=jBmzYM_o50g8vhlTgkkf5TGiBWNbXWViYnd0WANbpzo,10276
|
3
|
-
mcp_agent/config.py,sha256=
|
3
|
+
mcp_agent/config.py,sha256=V6TZlKOUelv5N75fypWKFVvkY5YsgpoHrdiSsKxOiM0,11725
|
4
4
|
mcp_agent/console.py,sha256=Gjf2QLFumwG1Lav__c07X_kZxxEUSkzV-1_-YbAwcwo,813
|
5
|
-
mcp_agent/context.py,sha256=
|
5
|
+
mcp_agent/context.py,sha256=pp_F1Q1jgAxGrRccSZJutn1JUxYfVue-St3S8tUyptM,7903
|
6
6
|
mcp_agent/context_dependent.py,sha256=QXfhw3RaQCKfscEEBRGuZ3sdMWqkgShz2jJ1ivGGX1I,1455
|
7
7
|
mcp_agent/event_progress.py,sha256=25iz0yyg-O4glMmtijcYpDdUmtUIKsCmR_8A52GgeC4,2716
|
8
8
|
mcp_agent/mcp_server_registry.py,sha256=r24xX4BYXj4BbWbU37uwuW9e1mFOYgpb258OMb21SaY,9928
|
9
9
|
mcp_agent/progress_display.py,sha256=GeJU9VUt6qKsFVymG688hCMVCsAygG9ifiiEb5IcbN4,361
|
10
10
|
mcp_agent/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
|
-
mcp_agent/agents/agent.py,sha256=
|
12
|
-
mcp_agent/agents/base_agent.py,sha256=
|
11
|
+
mcp_agent/agents/agent.py,sha256=Tn2YKw_ytx9b8jC-65WYQmrnD43kYiZsLa4sVHxn9d4,3854
|
12
|
+
mcp_agent/agents/base_agent.py,sha256=9IExAXyPpao4t7J_uF2pjSlbnlKp-229oiOykbE6KDI,23515
|
13
13
|
mcp_agent/agents/workflow/__init__.py,sha256=HloteEW6kalvgR0XewpiFAqaQlMPlPJYg5p3K33IUzI,25
|
14
|
-
mcp_agent/agents/workflow/chain_agent.py,sha256=
|
15
|
-
mcp_agent/agents/workflow/evaluator_optimizer.py,sha256=
|
16
|
-
mcp_agent/agents/workflow/orchestrator_agent.py,sha256=
|
14
|
+
mcp_agent/agents/workflow/chain_agent.py,sha256=EW10IgEnKJ3YfwLY61B1SQlYC-84jcXsrRmzpLQbngE,6384
|
15
|
+
mcp_agent/agents/workflow/evaluator_optimizer.py,sha256=VWdzVIy_qSiVsDJO22ta3RB3drkvBfXk9HxBYMpsC5U,13300
|
16
|
+
mcp_agent/agents/workflow/orchestrator_agent.py,sha256=30hFQyAmtjQTX6Li_zWWIHCpdNpfZkDo57YXXW5xIsI,21561
|
17
17
|
mcp_agent/agents/workflow/orchestrator_models.py,sha256=5P_aXADVT4Et8qT4e1cb9RelmHX5dCRrzu8j8T41Kdg,7230
|
18
18
|
mcp_agent/agents/workflow/orchestrator_prompts.py,sha256=EXKEI174sshkZyPPEnWbwwNafzSPuA39MXL7iqG9cWc,9106
|
19
|
-
mcp_agent/agents/workflow/parallel_agent.py,sha256=
|
20
|
-
mcp_agent/agents/workflow/router_agent.py,sha256=
|
19
|
+
mcp_agent/agents/workflow/parallel_agent.py,sha256=SgIXJx2X_MSlLOv6WXYRezwjDYjU9f95eKQzTm5Y_lk,7087
|
20
|
+
mcp_agent/agents/workflow/router_agent.py,sha256=WLv2ny_-6mAJ7tjU-6nUe2yVhW008vso5NU9tczNTn0,10666
|
21
21
|
mcp_agent/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
22
|
mcp_agent/cli/__main__.py,sha256=AVZ7tQFhU_sDOGuUGJq8ujgKtcxsYJBJwHbVaaiRDlI,166
|
23
|
-
mcp_agent/cli/main.py,sha256=
|
23
|
+
mcp_agent/cli/main.py,sha256=PZdPJfsAJOm80vTu7j_XpMPhaDZOpqSe-ciU3YQsmA4,3149
|
24
24
|
mcp_agent/cli/terminal.py,sha256=GRwD-RGW7saIz2IOWZn5vD6JjiArscELBThm1GTFkuI,1065
|
25
25
|
mcp_agent/cli/commands/bootstrap.py,sha256=Pv3LQUQLK_5-8nbOQ6iibJI7awgD04P9xh6-VpU15pw,11571
|
26
26
|
mcp_agent/cli/commands/config.py,sha256=jU2gl4d5YESrdUboh3u6mxf7CxVT-_DT_sK8Vuh3ajw,231
|
27
|
-
mcp_agent/cli/commands/setup.py,sha256=
|
27
|
+
mcp_agent/cli/commands/setup.py,sha256=CsmfIvKFfOhU1bOkm1cTqNseQdn3qdlfXN4BALwQ3Ik,6345
|
28
28
|
mcp_agent/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
|
-
mcp_agent/core/agent_app.py,sha256=
|
30
|
-
mcp_agent/core/agent_types.py,sha256=
|
31
|
-
mcp_agent/core/direct_decorators.py,sha256=
|
32
|
-
mcp_agent/core/direct_factory.py,sha256=
|
33
|
-
mcp_agent/core/enhanced_prompt.py,sha256=
|
29
|
+
mcp_agent/core/agent_app.py,sha256=5nQJNo8DocIRWiX4pVKAHUZF8s6HWpc-hJnfzl_1v1c,9697
|
30
|
+
mcp_agent/core/agent_types.py,sha256=LuWslu9YI6JRnAWwh_A1ZejK72-e839wH7tf2MHxSIU,1389
|
31
|
+
mcp_agent/core/direct_decorators.py,sha256=Q6t3VpRPLCRzqJycPZIkKbbEJMVocxdScp5o2xn4gLU,14460
|
32
|
+
mcp_agent/core/direct_factory.py,sha256=hYFCucZVAQ2wrfqIe9Qameoa-cCRaQ53R97EMHvUZAM,17572
|
33
|
+
mcp_agent/core/enhanced_prompt.py,sha256=P9FAtc0rqIYQfUDkTNVXitFIZEtB3fdq_Nr0-st64Qg,17948
|
34
34
|
mcp_agent/core/error_handling.py,sha256=xoyS2kLe0eG0bj2eSJCJ2odIhGUve2SbDR7jP-A-uRw,624
|
35
35
|
mcp_agent/core/exceptions.py,sha256=ENAD_qGG67foxy6vDkIvc-lgopIUQy6O7zvNPpPXaQg,2289
|
36
|
-
mcp_agent/core/fastagent.py,sha256=
|
37
|
-
mcp_agent/core/interactive_prompt.py,sha256=
|
36
|
+
mcp_agent/core/fastagent.py,sha256=HTy1OCAhpHIM-4cd37-dxvb97eZUELN-ICAEFgqmJMk,18503
|
37
|
+
mcp_agent/core/interactive_prompt.py,sha256=zU53h8mmaJBnddYy2j57tH7jreQ9PUz7vLEo2gdDrio,17704
|
38
38
|
mcp_agent/core/mcp_content.py,sha256=2D7KHY9mG_vxoDwFLKvsPQV9VRIzHItM7V-jcEnACh8,8878
|
39
39
|
mcp_agent/core/prompt.py,sha256=qnintOUGEoDPYLI9bu9G2OlgVMCe5ZPUZilgMzydXhc,7919
|
40
40
|
mcp_agent/core/request_params.py,sha256=bEjWo86fqxdiWm2U5nPDd1uCUpcIQO9oiCinhB8lQN0,1185
|
@@ -50,11 +50,11 @@ mcp_agent/human_input/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
50
50
|
mcp_agent/human_input/handler.py,sha256=s712Z5ssTCwjL9-VKoIdP5CtgMh43YvepynYisiWTTA,3144
|
51
51
|
mcp_agent/human_input/types.py,sha256=RtWBOVzy8vnYoQrc36jRLn8z8N3C4pDPMBN5vF6qM5Y,1476
|
52
52
|
mcp_agent/llm/__init__.py,sha256=d8zgwG-bRFuwiMNMYkywg_qytk4P8lawyld_meuUmHI,68
|
53
|
-
mcp_agent/llm/augmented_llm.py,sha256=
|
54
|
-
mcp_agent/llm/augmented_llm_passthrough.py,sha256=
|
53
|
+
mcp_agent/llm/augmented_llm.py,sha256=AFNA_v7cuxy9MSpCigv9FM9CEg27NsaUfeme4tiy1y8,18125
|
54
|
+
mcp_agent/llm/augmented_llm_passthrough.py,sha256=U0LssNWNVuZRuD9I7Wuvpo7vdDW4xtoPLirnYCgBGTY,6128
|
55
55
|
mcp_agent/llm/augmented_llm_playback.py,sha256=YVR2adzjMf9Q5WfYBytryWMRqJ87a3kNBnjxhApsMcU,3413
|
56
56
|
mcp_agent/llm/memory.py,sha256=UakoBCJBf59JBtB6uyZM0OZjlxDW_VHtSfDs08ibVEc,3312
|
57
|
-
mcp_agent/llm/model_factory.py,sha256=
|
57
|
+
mcp_agent/llm/model_factory.py,sha256=WOm2IkZLhgFTplmgjVAzNzjpawm3D_aTVcGdgu1DReg,7606
|
58
58
|
mcp_agent/llm/prompt_utils.py,sha256=yWQHykoK13QRF7evHUKxVF0SpVLN-Bsft0Yixzvn0g0,4825
|
59
59
|
mcp_agent/llm/sampling_converter.py,sha256=C7wPBlmT0eD90XWabC22zkxsrVHKCrjwIwg6cG628cI,2926
|
60
60
|
mcp_agent/llm/sampling_format_converter.py,sha256=xGz4odHpOcP7--eFaJaFtUR8eR9jxZS7MnLH6J7n0EU,1263
|
@@ -80,17 +80,16 @@ mcp_agent/logging/tracing.py,sha256=d5lSXakzzi5PtQpUkVkOnYaGX8NduGPq__S7vx-Ln8U,
|
|
80
80
|
mcp_agent/logging/transport.py,sha256=m8YsLLu5T8eof_ndpLQs4gHOzqqEL98xsVwBwDsBfxI,17335
|
81
81
|
mcp_agent/mcp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
82
82
|
mcp_agent/mcp/gen_client.py,sha256=fAVwFVCgSamw4PwoWOV4wrK9TABx1S_zZv8BctRyF2k,3030
|
83
|
-
mcp_agent/mcp/interfaces.py,sha256=
|
83
|
+
mcp_agent/mcp/interfaces.py,sha256=vma7bbWbY3zp1RM6hMYxVO4aV6Vfaygm-nLwzK2jFKI,6748
|
84
84
|
mcp_agent/mcp/logger_textio.py,sha256=OpnqMam9Pu0oVzYQWFMhrX1dRg2f5Fqb3qqPA6QAATM,2778
|
85
85
|
mcp_agent/mcp/mcp_activity.py,sha256=CajXCFWZ2cKEX9s4-HfNVAj471ePTVs4NOkvmIh65tE,592
|
86
86
|
mcp_agent/mcp/mcp_agent_client_session.py,sha256=RMYNltc2pDIzxwEJSS5589RbvPO0KWV4Y3jSyAmhKf0,4181
|
87
|
-
mcp_agent/mcp/mcp_agent_server.py,sha256=SnKJ9KCMnklGLHKZ9UsgAxd9IOKqiSCRPmQeTGu0CK8,1643
|
88
87
|
mcp_agent/mcp/mcp_aggregator.py,sha256=jaWbOvb3wioECohZ47CubyxfJ5QkfNSshu1hwhZksG4,40486
|
89
88
|
mcp_agent/mcp/mcp_connection_manager.py,sha256=desQBreHbIcjY7AidcDO6pFomHOx9oOZPOWIcHAx1K0,13761
|
90
89
|
mcp_agent/mcp/mime_utils.py,sha256=difepNR_gpb4MpMLkBRAoyhDk-AjXUHTiqKvT_VwS1o,1805
|
91
90
|
mcp_agent/mcp/prompt_message_multipart.py,sha256=IpIndd75tAcCbJbfqjpAF0tOUUP1TQceDbWoxO5gvpo,3684
|
92
91
|
mcp_agent/mcp/prompt_render.py,sha256=k3v4BZDThGE2gGiOYVQtA6x8WTEdOuXIEnRafANhN1U,2996
|
93
|
-
mcp_agent/mcp/prompt_serialization.py,sha256
|
92
|
+
mcp_agent/mcp/prompt_serialization.py,sha256=El12k47c9568sju6fqiaYkYySC9RVhScarHeR_QihNk,17323
|
94
93
|
mcp_agent/mcp/resource_utils.py,sha256=K4XY8bihmBMleRTZ2viMPiD2Y2HWxFnlgIJi6dd_PYE,6588
|
95
94
|
mcp_agent/mcp/sampling.py,sha256=vzWrIdI1CyFSxDWO-O69TpD6RwQcCM694BqMlYPVtaw,4584
|
96
95
|
mcp_agent/mcp/helpers/__init__.py,sha256=sKqwlUR3jSsd9PVJKjXtxHgZA1YOdzPtsSW4xVey77Q,52
|
@@ -99,19 +98,19 @@ mcp_agent/mcp/prompts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
99
98
|
mcp_agent/mcp/prompts/__main__.py,sha256=gr1Tdz9fcK0EXjEuZg_BOnKUmvhYq5AH2lFZicVyNb0,237
|
100
99
|
mcp_agent/mcp/prompts/prompt_constants.py,sha256=Q9W0t3rOXl2LHIG9wcghApUV2QZ1iICuo7SwVwHUf3c,566
|
101
100
|
mcp_agent/mcp/prompts/prompt_helpers.py,sha256=Joqo2t09pTKDP-Wge3G-ozPEHikzjaqwV6GVk8hNR50,7534
|
102
|
-
mcp_agent/mcp/prompts/prompt_load.py,sha256=
|
101
|
+
mcp_agent/mcp/prompts/prompt_load.py,sha256=VkcY6dD1jRCu-OB5AtSO8YwVATjEoYCkyAIGIujIHmw,5583
|
103
102
|
mcp_agent/mcp/prompts/prompt_server.py,sha256=tXtQd4EnH86MmdAvHlXm4oOS1dWLSCW5PvoA7uU1TvA,16493
|
104
103
|
mcp_agent/mcp/prompts/prompt_template.py,sha256=EejiqGkau8OizORNyKTUwUjrPof5V-hH1H_MBQoQfXw,15732
|
105
104
|
mcp_agent/mcp_server/__init__.py,sha256=zBU51ITHIEPScd9nRafnhEddsWqXRPAAvHhkrbRI2_4,155
|
106
|
-
mcp_agent/mcp_server/agent_server.py,sha256=
|
105
|
+
mcp_agent/mcp_server/agent_server.py,sha256=LVZNML2_ysK7nVVLDou8pQuQWiEsMFZLryn_KihmkUQ,6431
|
107
106
|
mcp_agent/resources/examples/data-analysis/analysis-campaign.py,sha256=QdNdo0-7LR4Uzw61hEU_jVKmWyk6A9YpGo81kMwVobM,7267
|
108
107
|
mcp_agent/resources/examples/data-analysis/analysis.py,sha256=M9z8Q4YC5OGuqSa5uefYmmfmctqMn-WqCSfg5LI407o,2609
|
109
108
|
mcp_agent/resources/examples/data-analysis/fastagent.config.yaml,sha256=ini94PHyJCfgpjcjHKMMbGuHs6LIj46F1NwY0ll5HVk,1609
|
110
109
|
mcp_agent/resources/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv,sha256=pcMeOL1_r8m8MziE6xgbBrQbjl5Ijo98yycZn7O-dlk,227977
|
111
110
|
mcp_agent/resources/examples/in_dev/agent_build.py,sha256=eetMEdYDbmnRH4CLO7chpQucAar3OE7iVzD_pnMjIGs,2854
|
112
111
|
mcp_agent/resources/examples/in_dev/slides.py,sha256=-SEFeGIg9SLF253NIxmA0NjlanLe8CR1yjDBBp2LXgs,4904
|
113
|
-
mcp_agent/resources/examples/internal/agent.py,sha256=
|
114
|
-
mcp_agent/resources/examples/internal/fastagent.config.yaml,sha256=
|
112
|
+
mcp_agent/resources/examples/internal/agent.py,sha256=JDfb-64gKoEG6ihsyyVWkuY9XNOdC1-P3r9qwG_qN28,497
|
113
|
+
mcp_agent/resources/examples/internal/fastagent.config.yaml,sha256=EPJW8vsRfYq57w2U2gPF0rTAxGhkaLgiYXw0mnpXsdM,2060
|
115
114
|
mcp_agent/resources/examples/internal/history_transfer.py,sha256=ETyX2wMMvUnMpUhu4ij9ZTpw2wQR6vPpBwlXJswPnhM,1157
|
116
115
|
mcp_agent/resources/examples/internal/job.py,sha256=ANF3c01gHJ4O4pIxaAtC3rdgYqVObMySaCUBS4dApW4,4102
|
117
116
|
mcp_agent/resources/examples/internal/prompt_category.py,sha256=kMvqNX_zu0sV-kTaAR3skc_tsq9t8QSEofciK0m4aJc,551
|
@@ -135,8 +134,8 @@ mcp_agent/resources/examples/workflows/orchestrator.py,sha256=rOGilFTliWWnZ3Jx5w
|
|
135
134
|
mcp_agent/resources/examples/workflows/parallel.py,sha256=n0dFN26QvYd2wjgohcaUBflac2SzXYx-bCyxMSousJE,1884
|
136
135
|
mcp_agent/resources/examples/workflows/router.py,sha256=E4x_-c3l4YW9w1i4ARcDtkdeqIdbWEGfsMzwLYpdbVc,1677
|
137
136
|
mcp_agent/ui/console_display.py,sha256=TVGDtJ37hc6UG0ei9g7ZPZZfFNeS1MYozt-Mx8HsPCk,9752
|
138
|
-
fast_agent_mcp-0.2.
|
139
|
-
fast_agent_mcp-0.2.
|
140
|
-
fast_agent_mcp-0.2.
|
141
|
-
fast_agent_mcp-0.2.
|
142
|
-
fast_agent_mcp-0.2.
|
137
|
+
fast_agent_mcp-0.2.6.dist-info/METADATA,sha256=f1wgZfK_zZRytbHKacbUDGvP7JS0Qqjp2YemYm1td9Y,29839
|
138
|
+
fast_agent_mcp-0.2.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
139
|
+
fast_agent_mcp-0.2.6.dist-info/entry_points.txt,sha256=qPM7vwtN1_KmP3dXehxgiCxUBHtqP7yfenZigztvY-w,226
|
140
|
+
fast_agent_mcp-0.2.6.dist-info/licenses/LICENSE,sha256=cN3FxDURL9XuzE5mhK9L2paZo82LTfjwCYVT7e3j0e4,10939
|
141
|
+
fast_agent_mcp-0.2.6.dist-info/RECORD,,
|
mcp_agent/agents/agent.py
CHANGED
@@ -66,7 +66,7 @@ class Agent(BaseAgent):
|
|
66
66
|
agent_name_str = str(self.name)
|
67
67
|
|
68
68
|
# Create agent_types dictionary with just this agent
|
69
|
-
agent_types = {agent_name_str:
|
69
|
+
agent_types = {agent_name_str: self.agent_type}
|
70
70
|
|
71
71
|
# Create the interactive prompt
|
72
72
|
prompt = InteractivePrompt(agent_types=agent_types)
|
mcp_agent/agents/base_agent.py
CHANGED
@@ -120,28 +120,30 @@ class BaseAgent(MCPAggregator, AgentProtocol):
|
|
120
120
|
llm_factory: Union[Type[AugmentedLLMProtocol], Callable[..., AugmentedLLMProtocol]],
|
121
121
|
model: Optional[str] = None,
|
122
122
|
request_params: Optional[RequestParams] = None,
|
123
|
-
**additional_kwargs
|
123
|
+
**additional_kwargs,
|
124
124
|
) -> AugmentedLLMProtocol:
|
125
125
|
"""
|
126
126
|
Create and attach an LLM instance to this agent.
|
127
|
-
|
127
|
+
|
128
128
|
Parameters have the following precedence (highest to lowest):
|
129
129
|
1. Explicitly passed parameters to this method
|
130
130
|
2. Agent's default_request_params
|
131
131
|
3. LLM's default values
|
132
|
-
|
132
|
+
|
133
133
|
Args:
|
134
134
|
llm_factory: A class or callable that constructs an AugmentedLLM
|
135
135
|
model: Optional model name override
|
136
136
|
request_params: Optional request parameters override
|
137
137
|
**additional_kwargs: Additional parameters passed to the LLM constructor
|
138
|
-
|
138
|
+
|
139
139
|
Returns:
|
140
140
|
The created LLM instance
|
141
141
|
"""
|
142
142
|
# Start with agent's default params
|
143
|
-
effective_params =
|
144
|
-
|
143
|
+
effective_params = (
|
144
|
+
self._default_request_params.model_copy() if self._default_request_params else None
|
145
|
+
)
|
146
|
+
|
145
147
|
# Override with explicitly passed request_params
|
146
148
|
if request_params:
|
147
149
|
if effective_params:
|
@@ -151,18 +153,16 @@ class BaseAgent(MCPAggregator, AgentProtocol):
|
|
151
153
|
setattr(effective_params, k, v)
|
152
154
|
else:
|
153
155
|
effective_params = request_params
|
154
|
-
|
156
|
+
|
155
157
|
# Override model if explicitly specified
|
156
158
|
if model and effective_params:
|
157
159
|
effective_params.model = model
|
158
|
-
|
160
|
+
|
159
161
|
# Create the LLM instance
|
160
162
|
self._llm = llm_factory(
|
161
|
-
agent=self,
|
162
|
-
request_params=effective_params,
|
163
|
-
**additional_kwargs
|
163
|
+
agent=self, request_params=effective_params, context=self._context, **additional_kwargs
|
164
164
|
)
|
165
|
-
|
165
|
+
|
166
166
|
return self._llm
|
167
167
|
|
168
168
|
async def shutdown(self) -> None:
|
@@ -468,7 +468,7 @@ class BaseAgent(MCPAggregator, AgentProtocol):
|
|
468
468
|
|
469
469
|
# Get the prompt - this will search all servers if needed
|
470
470
|
self.logger.debug(f"Loading prompt '{prompt_name}'")
|
471
|
-
prompt_result = await self.get_prompt(prompt_name, arguments, server_name)
|
471
|
+
prompt_result: GetPromptResult = await self.get_prompt(prompt_name, arguments, server_name)
|
472
472
|
|
473
473
|
if not prompt_result or not prompt_result.messages:
|
474
474
|
error_msg = f"Prompt '{prompt_name}' could not be found or contains no messages"
|
@@ -622,6 +622,18 @@ class BaseAgent(MCPAggregator, AgentProtocol):
|
|
622
622
|
response = await self.generate(prompts, request_params)
|
623
623
|
return response.first_text()
|
624
624
|
|
625
|
+
@property
|
626
|
+
def agent_type(self) -> str:
|
627
|
+
"""
|
628
|
+
Return the type of this agent.
|
629
|
+
|
630
|
+
This is used for display purposes in the interactive prompt and other UI elements.
|
631
|
+
|
632
|
+
Returns:
|
633
|
+
String representing the agent type
|
634
|
+
"""
|
635
|
+
return self.config.agent_type
|
636
|
+
|
625
637
|
@property
|
626
638
|
def message_history(self) -> List[PromptMessageMultipart]:
|
627
639
|
"""
|
@@ -9,8 +9,9 @@ from typing import Any, List, Optional, Tuple, Type
|
|
9
9
|
|
10
10
|
from mcp.types import TextContent
|
11
11
|
|
12
|
-
from mcp_agent.agents.agent import Agent
|
12
|
+
from mcp_agent.agents.agent import Agent
|
13
13
|
from mcp_agent.agents.base_agent import BaseAgent
|
14
|
+
from mcp_agent.core.agent_types import AgentConfig, AgentType
|
14
15
|
from mcp_agent.core.prompt import Prompt
|
15
16
|
from mcp_agent.core.request_params import RequestParams
|
16
17
|
from mcp_agent.mcp.interfaces import ModelT
|
@@ -22,6 +23,11 @@ class ChainAgent(BaseAgent):
|
|
22
23
|
A chain agent that processes requests through a series of specialized agents in sequence.
|
23
24
|
Passes the output of each agent to the next agent in the chain.
|
24
25
|
"""
|
26
|
+
|
27
|
+
@property
|
28
|
+
def agent_type(self) -> str:
|
29
|
+
"""Return the type of this agent."""
|
30
|
+
return AgentType.CHAIN.value
|
25
31
|
|
26
32
|
def __init__(
|
27
33
|
self,
|
@@ -14,6 +14,7 @@ from pydantic import BaseModel, Field
|
|
14
14
|
|
15
15
|
from mcp_agent.agents.agent import Agent
|
16
16
|
from mcp_agent.agents.base_agent import BaseAgent
|
17
|
+
from mcp_agent.core.agent_types import AgentType
|
17
18
|
from mcp_agent.core.exceptions import AgentConfigError
|
18
19
|
from mcp_agent.core.prompt import Prompt
|
19
20
|
from mcp_agent.core.request_params import RequestParams
|
@@ -63,6 +64,11 @@ class EvaluatorOptimizerAgent(BaseAgent):
|
|
63
64
|
for refinement, continuing until a quality threshold is reached or a maximum
|
64
65
|
number of refinement cycles is completed.
|
65
66
|
"""
|
67
|
+
|
68
|
+
@property
|
69
|
+
def agent_type(self) -> str:
|
70
|
+
"""Return the type of this agent."""
|
71
|
+
return AgentType.EVALUATOR_OPTIMIZER.value
|
66
72
|
|
67
73
|
def __init__(
|
68
74
|
self,
|
@@ -27,7 +27,7 @@ from mcp_agent.agents.workflow.orchestrator_prompts import (
|
|
27
27
|
SYNTHESIZE_PLAN_PROMPT_TEMPLATE,
|
28
28
|
TASK_PROMPT_TEMPLATE,
|
29
29
|
)
|
30
|
-
from mcp_agent.core.agent_types import AgentConfig
|
30
|
+
from mcp_agent.core.agent_types import AgentConfig, AgentType
|
31
31
|
from mcp_agent.core.exceptions import AgentConfigError
|
32
32
|
from mcp_agent.core.prompt import Prompt
|
33
33
|
from mcp_agent.core.request_params import RequestParams
|
@@ -46,6 +46,11 @@ class OrchestratorAgent(BaseAgent):
|
|
46
46
|
to specialized worker agents, synthesizing their results into a cohesive output.
|
47
47
|
Supports both full planning and iterative planning modes.
|
48
48
|
"""
|
49
|
+
|
50
|
+
@property
|
51
|
+
def agent_type(self) -> str:
|
52
|
+
"""Return the type of this agent."""
|
53
|
+
return AgentType.ORCHESTRATOR.value
|
49
54
|
|
50
55
|
def __init__(
|
51
56
|
self,
|
@@ -3,8 +3,9 @@ from typing import Any, List, Optional, Tuple
|
|
3
3
|
|
4
4
|
from mcp.types import TextContent
|
5
5
|
|
6
|
-
from mcp_agent.agents.agent import Agent
|
6
|
+
from mcp_agent.agents.agent import Agent
|
7
7
|
from mcp_agent.agents.base_agent import BaseAgent
|
8
|
+
from mcp_agent.core.agent_types import AgentConfig, AgentType
|
8
9
|
from mcp_agent.core.request_params import RequestParams
|
9
10
|
from mcp_agent.mcp.interfaces import ModelT
|
10
11
|
from mcp_agent.mcp.prompt_message_multipart import PromptMessageMultipart
|
@@ -17,6 +18,11 @@ class ParallelAgent(BaseAgent):
|
|
17
18
|
This workflow performs both the fan-out and fan-in operations using LLMs.
|
18
19
|
From the user's perspective, an input is specified and the output is returned.
|
19
20
|
"""
|
21
|
+
|
22
|
+
@property
|
23
|
+
def agent_type(self) -> str:
|
24
|
+
"""Return the type of this agent."""
|
25
|
+
return AgentType.PARALLEL.value
|
20
26
|
|
21
27
|
def __init__(
|
22
28
|
self,
|
@@ -12,7 +12,7 @@ from pydantic import BaseModel
|
|
12
12
|
|
13
13
|
from mcp_agent.agents.agent import Agent
|
14
14
|
from mcp_agent.agents.base_agent import BaseAgent
|
15
|
-
from mcp_agent.core.agent_types import AgentConfig
|
15
|
+
from mcp_agent.core.agent_types import AgentConfig, AgentType
|
16
16
|
from mcp_agent.core.exceptions import AgentConfigError
|
17
17
|
from mcp_agent.core.prompt import Prompt
|
18
18
|
from mcp_agent.core.request_params import RequestParams
|
@@ -53,7 +53,7 @@ You are a highly accurate request router that directs incoming requests to the m
|
|
53
53
|
Your task is to analyze the request and determine the most appropriate agent from the options above.
|
54
54
|
|
55
55
|
<fastagent:instruction>
|
56
|
-
Respond in JSON format. NEVER include Code Fences:
|
56
|
+
Respond in JSON format. ONLY include JSON (no explanation). NEVER include Code Fences:
|
57
57
|
{{
|
58
58
|
"agent": "<agent name>",
|
59
59
|
"confidence": "<high, medium or low>",
|
@@ -87,6 +87,11 @@ class RouterAgent(BaseAgent):
|
|
87
87
|
A simplified router that uses an LLM to determine the best agent for a request,
|
88
88
|
then dispatches the request to that agent and returns the response.
|
89
89
|
"""
|
90
|
+
|
91
|
+
@property
|
92
|
+
def agent_type(self) -> str:
|
93
|
+
"""Return the type of this agent."""
|
94
|
+
return AgentType.ROUTER.value
|
90
95
|
|
91
96
|
def __init__(
|
92
97
|
self,
|
mcp_agent/cli/commands/setup.py
CHANGED
@@ -73,7 +73,7 @@ mcp:
|
|
73
73
|
|
74
74
|
GITIGNORE_TEMPLATE = """
|
75
75
|
# FastAgent secrets file
|
76
|
-
fastagent
|
76
|
+
fastagent.secrets.yaml
|
77
77
|
|
78
78
|
# Python
|
79
79
|
__pycache__/
|
@@ -215,7 +215,7 @@ def init(
|
|
215
215
|
if "fastagent.secrets.yaml" in created:
|
216
216
|
console.print("\n[yellow]Important:[/yellow] Remember to:")
|
217
217
|
console.print(
|
218
|
-
"1. Add your API keys to fastagent
|
218
|
+
"1. Add your API keys to fastagent.secrets.yaml or set OPENAI_API_KEY and ANTHROPIC_API_KEY environment variables"
|
219
219
|
)
|
220
220
|
console.print(
|
221
221
|
"2. Keep fastagent.secrets.yaml secure and never commit it to version control"
|
mcp_agent/cli/main.py
CHANGED
@@ -62,6 +62,7 @@ def main(
|
|
62
62
|
verbose: bool = typer.Option(False, "--verbose", "-v", help="Enable verbose mode"),
|
63
63
|
quiet: bool = typer.Option(False, "--quiet", "-q", help="Disable output"),
|
64
64
|
color: bool = typer.Option(True, "--color/--no-color", help="Enable/disable color output"),
|
65
|
+
version: bool = typer.Option(False, "--version", help="Show version and exit"),
|
65
66
|
) -> None:
|
66
67
|
"""FastAgent CLI - Build effective agents using Model Context Protocol (MCP).
|
67
68
|
|
@@ -70,6 +71,16 @@ def main(
|
|
70
71
|
application.verbosity = 1 if verbose else 0 if not quiet else -1
|
71
72
|
application.console = application.console if color else None
|
72
73
|
|
74
|
+
# Handle version flag
|
75
|
+
if version:
|
76
|
+
from importlib.metadata import version as get_version
|
77
|
+
try:
|
78
|
+
app_version = get_version("fast-agent-mcp")
|
79
|
+
except: # noqa: E722
|
80
|
+
app_version = "unknown"
|
81
|
+
console.print(f"fast-agent-mcp v{app_version}")
|
82
|
+
raise typer.Exit()
|
83
|
+
|
73
84
|
# Show welcome message if no command was invoked
|
74
85
|
if ctx.invoked_subcommand is None:
|
75
86
|
show_welcome()
|
mcp_agent/config.py
CHANGED
@@ -40,7 +40,7 @@ class MCPRootSettings(BaseModel):
|
|
40
40
|
@classmethod
|
41
41
|
def validate_uri(cls, v: str) -> str:
|
42
42
|
"""Validate that the URI starts with file:// (required by specification 2024-11-05)"""
|
43
|
-
if not v.startswith("file://"):
|
43
|
+
if v and not v.startswith("file://"):
|
44
44
|
raise ValueError("Root URI must start with file://")
|
45
45
|
return v
|
46
46
|
|
@@ -276,9 +276,9 @@ class Settings(BaseSettings):
|
|
276
276
|
# Check current directory and parent directories
|
277
277
|
while current_dir != current_dir.parent:
|
278
278
|
for filename in [
|
279
|
+
"fastagent.config.yaml",
|
279
280
|
"mcp-agent.config.yaml",
|
280
281
|
"mcp_agent.config.yaml",
|
281
|
-
"fastagent.config.yaml",
|
282
282
|
]:
|
283
283
|
config_path = current_dir / filename
|
284
284
|
if config_path.exists():
|
@@ -306,15 +306,33 @@ def get_settings(config_path: str | None = None) -> Settings:
|
|
306
306
|
return merged
|
307
307
|
|
308
308
|
global _settings
|
309
|
-
|
309
|
+
|
310
|
+
# If we have a specific config path, always reload settings
|
311
|
+
# This ensures each test gets its own config
|
312
|
+
if config_path:
|
313
|
+
# Reset for the new path
|
314
|
+
_settings = None
|
315
|
+
elif _settings:
|
316
|
+
# Use cached settings only for no specific path
|
310
317
|
return _settings
|
311
318
|
|
312
|
-
|
319
|
+
# Handle config path - convert string to Path if needed
|
320
|
+
if config_path:
|
321
|
+
config_file = Path(config_path)
|
322
|
+
# If it's a relative path and doesn't exist, try finding it
|
323
|
+
if not config_file.is_absolute() and not config_file.exists():
|
324
|
+
# Try resolving against current directory first
|
325
|
+
resolved_path = Path.cwd() / config_file.name
|
326
|
+
if resolved_path.exists():
|
327
|
+
config_file = resolved_path
|
328
|
+
else:
|
329
|
+
config_file = Settings.find_config()
|
330
|
+
|
313
331
|
merged_settings = {}
|
314
332
|
|
315
333
|
if config_file:
|
316
334
|
if not config_file.exists():
|
317
|
-
|
335
|
+
print(f"Warning: Specified config file does not exist: {config_file}")
|
318
336
|
else:
|
319
337
|
import yaml # pylint: disable=C0415
|
320
338
|
|
@@ -326,11 +344,14 @@ def get_settings(config_path: str | None = None) -> Settings:
|
|
326
344
|
# but stop after finding the first one
|
327
345
|
current_dir = config_file.parent
|
328
346
|
found_secrets = False
|
347
|
+
# Start with the absolute path of the config file's directory
|
348
|
+
current_dir = config_file.parent.resolve()
|
349
|
+
|
329
350
|
while current_dir != current_dir.parent and not found_secrets:
|
330
351
|
for secrets_filename in [
|
352
|
+
"fastagent.secrets.yaml",
|
331
353
|
"mcp-agent.secrets.yaml",
|
332
354
|
"mcp_agent.secrets.yaml",
|
333
|
-
"fastagent.secrets.yaml",
|
334
355
|
]:
|
335
356
|
secrets_file = current_dir / secrets_filename
|
336
357
|
if secrets_file.exists():
|
@@ -340,7 +361,8 @@ def get_settings(config_path: str | None = None) -> Settings:
|
|
340
361
|
found_secrets = True
|
341
362
|
break
|
342
363
|
if not found_secrets:
|
343
|
-
|
364
|
+
# Get the absolute path of the parent directory
|
365
|
+
current_dir = current_dir.parent.resolve()
|
344
366
|
|
345
367
|
_settings = Settings(**merged_settings)
|
346
368
|
return _settings
|
mcp_agent/context.py
CHANGED
@@ -234,5 +234,7 @@ def get_current_context() -> Context:
|
|
234
234
|
def get_current_config():
|
235
235
|
"""
|
236
236
|
Get the current application config.
|
237
|
+
|
238
|
+
Returns the context config if available, otherwise falls back to global settings.
|
237
239
|
"""
|
238
240
|
return get_current_context().config or get_settings()
|
mcp_agent/core/agent_app.py
CHANGED
@@ -69,7 +69,7 @@ class AgentApp:
|
|
69
69
|
if message:
|
70
70
|
return await self._agent(agent_name).send(message)
|
71
71
|
|
72
|
-
return await self.interactive(
|
72
|
+
return await self.interactive(agent=agent_name, default_prompt=default_prompt)
|
73
73
|
|
74
74
|
async def send(
|
75
75
|
self,
|
@@ -220,9 +220,9 @@ class AgentApp:
|
|
220
220
|
"""
|
221
221
|
Deprecated - use interactive() instead.
|
222
222
|
"""
|
223
|
-
return await self.interactive(
|
223
|
+
return await self.interactive(agent=agent_name, default_prompt=default_prompt)
|
224
224
|
|
225
|
-
async def interactive(self,
|
225
|
+
async def interactive(self, agent: str | None = None, default_prompt: str = "") -> str:
|
226
226
|
"""
|
227
227
|
Interactive prompt for sending messages with advanced features.
|
228
228
|
|
@@ -235,11 +235,11 @@ class AgentApp:
|
|
235
235
|
"""
|
236
236
|
|
237
237
|
# Get the default agent name if none specified
|
238
|
-
if
|
238
|
+
if agent:
|
239
239
|
# Validate that this agent exists
|
240
|
-
if
|
241
|
-
raise ValueError(f"Agent '{
|
242
|
-
target_name =
|
240
|
+
if agent not in self._agents:
|
241
|
+
raise ValueError(f"Agent '{agent}' not found")
|
242
|
+
target_name = agent
|
243
243
|
else:
|
244
244
|
# Use the first agent's name as default
|
245
245
|
target_name = next(iter(self._agents.keys()))
|
@@ -248,18 +248,7 @@ class AgentApp:
|
|
248
248
|
# The agent's prompt method doesn't fully support switching between agents
|
249
249
|
|
250
250
|
# Create agent_types dictionary mapping agent names to their types
|
251
|
-
agent_types = {}
|
252
|
-
for name, agent in self._agents.items():
|
253
|
-
# Determine agent type if possible
|
254
|
-
agent_type = "Agent" # Default type
|
255
|
-
|
256
|
-
# Try to get the type from the agent directly
|
257
|
-
if hasattr(agent, "agent_type"):
|
258
|
-
agent_type = agent.agent_type
|
259
|
-
elif hasattr(agent, "config") and hasattr(agent.config, "agent_type"):
|
260
|
-
agent_type = agent.config.agent_type
|
261
|
-
|
262
|
-
agent_types[name] = agent_type
|
251
|
+
agent_types = {name: agent.agent_type for name, agent in self._agents.items()}
|
263
252
|
|
264
253
|
# Create the interactive prompt
|
265
254
|
prompt = InteractivePrompt(agent_types=agent_types)
|
mcp_agent/core/agent_types.py
CHANGED
@@ -33,6 +33,7 @@ class AgentConfig:
|
|
33
33
|
use_history: bool = True
|
34
34
|
default_request_params: RequestParams | None = None
|
35
35
|
human_input: bool = False
|
36
|
+
agent_type: str = AgentType.BASIC.value
|
36
37
|
|
37
38
|
def __post_init__(self) -> None:
|
38
39
|
"""Ensure default_request_params exists with proper history setting"""
|
@@ -269,6 +269,7 @@ def router(
|
|
269
269
|
*,
|
270
270
|
agents: List[str],
|
271
271
|
instruction: Optional[str] = None,
|
272
|
+
servers: List[str] = [],
|
272
273
|
model: Optional[str] = None,
|
273
274
|
use_history: bool = False,
|
274
275
|
request_params: RequestParams | None = None,
|
@@ -301,7 +302,7 @@ def router(
|
|
301
302
|
AgentType.ROUTER,
|
302
303
|
name=name,
|
303
304
|
instruction=instruction or default_instruction,
|
304
|
-
servers=
|
305
|
+
servers=servers,
|
305
306
|
model=model,
|
306
307
|
use_history=use_history,
|
307
308
|
request_params=request_params,
|