fast-agent-mcp 0.2.14__py3-none-any.whl → 0.2.17__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.14.dist-info → fast_agent_mcp-0.2.17.dist-info}/METADATA +4 -6
- {fast_agent_mcp-0.2.14.dist-info → fast_agent_mcp-0.2.17.dist-info}/RECORD +46 -46
- mcp_agent/agents/base_agent.py +50 -6
- mcp_agent/agents/workflow/orchestrator_agent.py +6 -7
- mcp_agent/agents/workflow/router_agent.py +70 -136
- mcp_agent/app.py +1 -124
- mcp_agent/cli/commands/setup.py +1 -1
- mcp_agent/config.py +19 -19
- mcp_agent/context.py +4 -22
- mcp_agent/core/agent_types.py +2 -2
- mcp_agent/core/direct_decorators.py +2 -2
- mcp_agent/core/direct_factory.py +2 -1
- mcp_agent/core/enhanced_prompt.py +6 -5
- mcp_agent/core/fastagent.py +1 -1
- mcp_agent/core/interactive_prompt.py +70 -50
- mcp_agent/core/request_params.py +5 -1
- mcp_agent/executor/workflow_signal.py +0 -2
- mcp_agent/llm/augmented_llm.py +183 -57
- mcp_agent/llm/augmented_llm_passthrough.py +1 -1
- mcp_agent/llm/augmented_llm_playback.py +21 -1
- mcp_agent/llm/memory.py +3 -3
- mcp_agent/llm/model_factory.py +3 -1
- mcp_agent/llm/provider_key_manager.py +1 -0
- mcp_agent/llm/provider_types.py +2 -1
- mcp_agent/llm/providers/augmented_llm_anthropic.py +49 -10
- mcp_agent/llm/providers/augmented_llm_deepseek.py +0 -2
- mcp_agent/llm/providers/augmented_llm_generic.py +4 -2
- mcp_agent/llm/providers/augmented_llm_google.py +30 -0
- mcp_agent/llm/providers/augmented_llm_openai.py +95 -158
- mcp_agent/llm/providers/multipart_converter_openai.py +10 -27
- mcp_agent/llm/providers/sampling_converter_openai.py +5 -6
- mcp_agent/mcp/interfaces.py +6 -1
- mcp_agent/mcp/mcp_aggregator.py +2 -8
- mcp_agent/mcp/prompt_message_multipart.py +25 -2
- mcp_agent/resources/examples/data-analysis/analysis-campaign.py +2 -2
- mcp_agent/resources/examples/in_dev/agent_build.py +1 -1
- mcp_agent/resources/examples/internal/job.py +1 -1
- mcp_agent/resources/examples/mcp/state-transfer/fastagent.config.yaml +1 -1
- mcp_agent/resources/examples/prompting/agent.py +0 -2
- mcp_agent/resources/examples/prompting/fastagent.config.yaml +2 -3
- mcp_agent/resources/examples/researcher/fastagent.config.yaml +1 -6
- mcp_agent/resources/examples/workflows/fastagent.config.yaml +0 -1
- mcp_agent/resources/examples/workflows/parallel.py +1 -1
- mcp_agent/executor/decorator_registry.py +0 -112
- {fast_agent_mcp-0.2.14.dist-info → fast_agent_mcp-0.2.17.dist-info}/WHEEL +0 -0
- {fast_agent_mcp-0.2.14.dist-info → fast_agent_mcp-0.2.17.dist-info}/entry_points.txt +0 -0
- {fast_agent_mcp-0.2.14.dist-info → fast_agent_mcp-0.2.17.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.17
|
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
|
@@ -237,8 +237,6 @@ Requires-Dist: ruff>=0.8.4; extra == 'dev'
|
|
237
237
|
Requires-Dist: tomli>=2.2.1; extra == 'dev'
|
238
238
|
Provides-Extra: openai
|
239
239
|
Requires-Dist: openai>=1.58.1; extra == 'openai'
|
240
|
-
Provides-Extra: temporal
|
241
|
-
Requires-Dist: temporalio>=1.8.0; extra == 'temporal'
|
242
240
|
Description-Content-Type: text/markdown
|
243
241
|
|
244
242
|
<p align="center">
|
@@ -255,7 +253,7 @@ Description-Content-Type: text/markdown
|
|
255
253
|
> [!TIP]
|
256
254
|
> Documentation site is in production here : https://fast-agent.ai. Feel free to feed back what's helpful and what's not. llms.txt link is here: https://fast-agent.ai/llms.txt
|
257
255
|
|
258
|
-
**`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 family, o1/o3 family) are supported.
|
256
|
+
**`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.
|
259
257
|
|
260
258
|
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).
|
261
259
|
|
@@ -313,7 +311,7 @@ Or start an interactive chat with the Agent:
|
|
313
311
|
|
314
312
|
```python
|
315
313
|
async with fast.run() as agent:
|
316
|
-
await agent()
|
314
|
+
await agent.interactive()
|
317
315
|
```
|
318
316
|
|
319
317
|
Here is the complete `sizer.py` Agent application, with boilerplate code:
|
@@ -330,7 +328,7 @@ fast = FastAgent("Agent Example")
|
|
330
328
|
)
|
331
329
|
async def main():
|
332
330
|
async with fast.run() as agent:
|
333
|
-
await agent()
|
331
|
+
await agent.interactive()
|
334
332
|
|
335
333
|
if __name__ == "__main__":
|
336
334
|
asyncio.run(main())
|
@@ -1,76 +1,76 @@
|
|
1
1
|
mcp_agent/__init__.py,sha256=-AIoeL4c9UAp_P4U0z-uIWTTmQWdihOis5nbQ5L_eao,1664
|
2
|
-
mcp_agent/app.py,sha256=
|
3
|
-
mcp_agent/config.py,sha256=
|
2
|
+
mcp_agent/app.py,sha256=WRsiUdwy_9IAnaGRDwuLm7pzgQpt2wgsg10vBOpfcwM,5539
|
3
|
+
mcp_agent/config.py,sha256=eEknK8I7DCrh1iGqzva0TemHMzjlbfhFhgwULqaKjDs,12218
|
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=GEZQ64UCvLj6bRXGNm35Hxd5jxrI_P52vhC3opnWwsg,7246
|
6
6
|
mcp_agent/context_dependent.py,sha256=QXfhw3RaQCKfscEEBRGuZ3sdMWqkgShz2jJ1ivGGX1I,1455
|
7
7
|
mcp_agent/event_progress.py,sha256=3dqk5Pn1tAG_m_wn4IPNwLWLyzm7CyKIidqHN-4l-JY,2736
|
8
8
|
mcp_agent/mcp_server_registry.py,sha256=pSD3euU-Oc2LAVenqkLU7UmutAzk6A9liYVLjCj4J70,10068
|
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=GgaUHoilgqzh9PQYr5k2WiPj4pagwicf9-ZLFsHkNNo,3848
|
12
|
-
mcp_agent/agents/base_agent.py,sha256=
|
12
|
+
mcp_agent/agents/base_agent.py,sha256=c_jhC6tt6LdvS1IY4AVdMNj3n_OtluzHQ1-_NEOseEQ,25039
|
13
13
|
mcp_agent/agents/workflow/__init__.py,sha256=HloteEW6kalvgR0XewpiFAqaQlMPlPJYg5p3K33IUzI,25
|
14
14
|
mcp_agent/agents/workflow/chain_agent.py,sha256=eIlImirrSXkqBJmPuAJgOKis81Cl6lZEGM0-6IyaUV8,6105
|
15
15
|
mcp_agent/agents/workflow/evaluator_optimizer.py,sha256=ysUMGM2NzeCIutgr_vXH6kUPpZMw0cX4J_Wl1r8eT84,13296
|
16
|
-
mcp_agent/agents/workflow/orchestrator_agent.py,sha256=
|
16
|
+
mcp_agent/agents/workflow/orchestrator_agent.py,sha256=byZe4bx7D_7BSZZ3hN8BNUWVFPYeqeUwDUCLTRC8mlI,21583
|
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
19
|
mcp_agent/agents/workflow/parallel_agent.py,sha256=GQTxAqwrPEdle-rPWMvoLOuzE_X69_HYEgYSm98eXdM,7087
|
20
|
-
mcp_agent/agents/workflow/router_agent.py,sha256=
|
20
|
+
mcp_agent/agents/workflow/router_agent.py,sha256=NugAJcA1ooZ-TNLNh7H26xIFChZoryxofJ7fTkrw4cU,9128
|
21
21
|
mcp_agent/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
22
|
mcp_agent/cli/__main__.py,sha256=AVZ7tQFhU_sDOGuUGJq8ujgKtcxsYJBJwHbVaaiRDlI,166
|
23
23
|
mcp_agent/cli/main.py,sha256=m0Ndb8y5qCfYyTDBDaJ4g1TuUiX-xtTKNJJDPsltw6o,2884
|
24
24
|
mcp_agent/cli/terminal.py,sha256=GRwD-RGW7saIz2IOWZn5vD6JjiArscELBThm1GTFkuI,1065
|
25
25
|
mcp_agent/cli/commands/check_config.py,sha256=9Ryxo_fLInm3YKdYv46yLrAJgnQtMisGreu6Kkriw2g,16677
|
26
26
|
mcp_agent/cli/commands/quickstart.py,sha256=SM3CHMzDgvTxIpKjFuX9BrS_N1vRoXNBDaO90aWx1Rk,14586
|
27
|
-
mcp_agent/cli/commands/setup.py,sha256=
|
27
|
+
mcp_agent/cli/commands/setup.py,sha256=hToVzlCDucf1RI6Jri7BPuSeNA6Y67ONG-nyUT-n7tE,6472
|
28
28
|
mcp_agent/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
29
|
mcp_agent/core/agent_app.py,sha256=5nQJNo8DocIRWiX4pVKAHUZF8s6HWpc-hJnfzl_1v1c,9697
|
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=
|
30
|
+
mcp_agent/core/agent_types.py,sha256=bQVQMTwKH7qHIJsNglj4C_d6PNFBBzC_0RIkcENSII4,1459
|
31
|
+
mcp_agent/core/direct_decorators.py,sha256=aaVR4G6a8H9pVg6X_PGEZ8GzreP0ZO1-48ksIKvMNDI,14452
|
32
|
+
mcp_agent/core/direct_factory.py,sha256=d96OM1yS3eIocIiaA9FQt6C2zr6VDUyCJBTZCp_D4bs,17912
|
33
|
+
mcp_agent/core/enhanced_prompt.py,sha256=kEgeD7F1s8LRZDc3Xr6CIxQxewxXy9z-0xZsxfIblsY,18851
|
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=NahciY0tY6K-rvSzkSgahzGXAWa-1nN2JgMlvRTze6E,18645
|
37
|
+
mcp_agent/core/interactive_prompt.py,sha256=9s5c-XXGAKAqYh1SUVQIMRGFIcxfFjkaPmke1tyInaA,23854
|
38
38
|
mcp_agent/core/mcp_content.py,sha256=2D7KHY9mG_vxoDwFLKvsPQV9VRIzHItM7V-jcEnACh8,8878
|
39
39
|
mcp_agent/core/prompt.py,sha256=qnintOUGEoDPYLI9bu9G2OlgVMCe5ZPUZilgMzydXhc,7919
|
40
|
-
mcp_agent/core/request_params.py,sha256=
|
40
|
+
mcp_agent/core/request_params.py,sha256=loYf13DN7e-DsdYRd37jWkJWJGwVBL-iFkcANP1J60Q,1366
|
41
41
|
mcp_agent/core/validation.py,sha256=Kmio1Xx-xNyCVd03RLfTxofEAWmVDPxUnQoyOSUMjR0,11445
|
42
42
|
mcp_agent/executor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
43
|
-
mcp_agent/executor/decorator_registry.py,sha256=CozMdIzE1LyyBfE3_R_kuxb5yi-mi--u_czKOZRp6Dg,3832
|
44
43
|
mcp_agent/executor/executor.py,sha256=MzLSnW9nHrLHYChR3oQa5B8dajQGX26q6-S2BJCxv0o,9507
|
45
44
|
mcp_agent/executor/task_registry.py,sha256=PCALFeYtkQrPBg4RBJnlA0aDI8nHclrNkHGUS4kV3W8,1242
|
46
|
-
mcp_agent/executor/workflow_signal.py,sha256=
|
45
|
+
mcp_agent/executor/workflow_signal.py,sha256=Cg1uZBk3fn8kXhPOg-wINNuVaf3v9pvLD6NbqWy5Z6E,11142
|
47
46
|
mcp_agent/human_input/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
48
47
|
mcp_agent/human_input/handler.py,sha256=s712Z5ssTCwjL9-VKoIdP5CtgMh43YvepynYisiWTTA,3144
|
49
48
|
mcp_agent/human_input/types.py,sha256=RtWBOVzy8vnYoQrc36jRLn8z8N3C4pDPMBN5vF6qM5Y,1476
|
50
49
|
mcp_agent/llm/__init__.py,sha256=d8zgwG-bRFuwiMNMYkywg_qytk4P8lawyld_meuUmHI,68
|
51
|
-
mcp_agent/llm/augmented_llm.py,sha256=
|
52
|
-
mcp_agent/llm/augmented_llm_passthrough.py,sha256=
|
53
|
-
mcp_agent/llm/augmented_llm_playback.py,sha256=
|
54
|
-
mcp_agent/llm/memory.py,sha256=
|
55
|
-
mcp_agent/llm/model_factory.py,sha256=
|
50
|
+
mcp_agent/llm/augmented_llm.py,sha256=4zKEErhSROrcc1fojCXRFb13UlaOzWvB0jO_XdlcCWM,23378
|
51
|
+
mcp_agent/llm/augmented_llm_passthrough.py,sha256=zHcctNpwg4EFJvD1x9Eg443SVX-uyzFphLikwF_yVE0,6288
|
52
|
+
mcp_agent/llm/augmented_llm_playback.py,sha256=6L_RWIK__R67oZK7u3Xt3hWy1T2LnHXIO-efqgP3tPw,4177
|
53
|
+
mcp_agent/llm/memory.py,sha256=HQ_c1QemOUjrkY6Z2omE6BG5fXga7y4jN7KCMOuGjPs,3345
|
54
|
+
mcp_agent/llm/model_factory.py,sha256=QK3RrEhpvafKRlTFYR8Z9oNJRGjO7J9wIx5TGcDu6As,7649
|
56
55
|
mcp_agent/llm/prompt_utils.py,sha256=yWQHykoK13QRF7evHUKxVF0SpVLN-Bsft0Yixzvn0g0,4825
|
57
|
-
mcp_agent/llm/provider_key_manager.py,sha256
|
58
|
-
mcp_agent/llm/provider_types.py,sha256=
|
56
|
+
mcp_agent/llm/provider_key_manager.py,sha256=-K_FuibN6hdSnweT32lB8mKTfCARnbja6zYYs0ErTKg,2802
|
57
|
+
mcp_agent/llm/provider_types.py,sha256=3IRRt9UbIHZHVJq1KF1XYfzsQtF9gj_gBNtU3hukIaY,308
|
59
58
|
mcp_agent/llm/sampling_converter.py,sha256=C7wPBlmT0eD90XWabC22zkxsrVHKCrjwIwg6cG628cI,2926
|
60
59
|
mcp_agent/llm/sampling_format_converter.py,sha256=xGz4odHpOcP7--eFaJaFtUR8eR9jxZS7MnLH6J7n0EU,1263
|
61
60
|
mcp_agent/llm/providers/__init__.py,sha256=heVxtmuqFJOnjjxHz4bWSqTAxXoN1E8twC_gQ_yJpHk,265
|
62
61
|
mcp_agent/llm/providers/anthropic_utils.py,sha256=vYDN5G5jKMhD2CQg8veJYab7tvvzYkDMq8M1g_hUAQg,3275
|
63
|
-
mcp_agent/llm/providers/augmented_llm_anthropic.py,sha256=
|
64
|
-
mcp_agent/llm/providers/augmented_llm_deepseek.py,sha256=
|
65
|
-
mcp_agent/llm/providers/augmented_llm_generic.py,sha256=
|
66
|
-
mcp_agent/llm/providers/
|
62
|
+
mcp_agent/llm/providers/augmented_llm_anthropic.py,sha256=GuqBJvkaM8SQ3NYBnMlKrV56dACLafhKec-Hl84qOi8,15344
|
63
|
+
mcp_agent/llm/providers/augmented_llm_deepseek.py,sha256=MHsCffnrXpiWdUCpVTUblILVBTQtBnbX7atwny0X2N8,1210
|
64
|
+
mcp_agent/llm/providers/augmented_llm_generic.py,sha256=5Uq8ZBhcFuQTt7koP_5ykolREh2iWu8zKhNbh3pM9lQ,1210
|
65
|
+
mcp_agent/llm/providers/augmented_llm_google.py,sha256=N0a2fphVtkvNYxKQpEX6J4tlO1C_mRw4sw3LBXnrOeI,1130
|
66
|
+
mcp_agent/llm/providers/augmented_llm_openai.py,sha256=YDumEOjuhvAcqOOdw6xsy902lyC30iqgl1V2lS6PfTA,13911
|
67
67
|
mcp_agent/llm/providers/augmented_llm_openrouter.py,sha256=V_TlVKm92GHBxYIo6gpvH_6cAaIdppS25Tz6x5T7LW0,2341
|
68
68
|
mcp_agent/llm/providers/multipart_converter_anthropic.py,sha256=t5lHYGfFUacJldnrVtMNW-8gEMoto8Y7hJkDrnyZR-Y,16650
|
69
|
-
mcp_agent/llm/providers/multipart_converter_openai.py,sha256=
|
69
|
+
mcp_agent/llm/providers/multipart_converter_openai.py,sha256=XPIulWntNpZWNGWrc240StPzok2RqrDAV7OigDwQ1uU,15850
|
70
70
|
mcp_agent/llm/providers/openai_multipart.py,sha256=qKBn7d3jSabnJmVgWweVzqh8q9mBqr09fsPmP92niAQ,6899
|
71
71
|
mcp_agent/llm/providers/openai_utils.py,sha256=T4bTCL9f7DsoS_zoKgQKv_FUv_4n98vgbvaUpdWZJr8,1875
|
72
72
|
mcp_agent/llm/providers/sampling_converter_anthropic.py,sha256=35WzBWkPklnuMlu5S6XsQIq0YL58NOy8Ja6A_l4m6eM,1612
|
73
|
-
mcp_agent/llm/providers/sampling_converter_openai.py,sha256=
|
73
|
+
mcp_agent/llm/providers/sampling_converter_openai.py,sha256=GA-LfTJzOwH9Vwk0Q4K37nG6zxpzqS-JGaM7cTH-Epc,841
|
74
74
|
mcp_agent/logging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
75
75
|
mcp_agent/logging/events.py,sha256=iHTSgrxK3BWnRoej6NhxVL5899MIHr-ktsA7hxMoo9k,3437
|
76
76
|
mcp_agent/logging/json_serializer.py,sha256=qkfxnR9ka6OgvwSpM2CggELbEtzzkApm0s_KYz11RDY,5791
|
@@ -81,13 +81,13 @@ mcp_agent/logging/tracing.py,sha256=d5lSXakzzi5PtQpUkVkOnYaGX8NduGPq__S7vx-Ln8U,
|
|
81
81
|
mcp_agent/logging/transport.py,sha256=m8YsLLu5T8eof_ndpLQs4gHOzqqEL98xsVwBwDsBfxI,17335
|
82
82
|
mcp_agent/mcp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
83
83
|
mcp_agent/mcp/gen_client.py,sha256=fAVwFVCgSamw4PwoWOV4wrK9TABx1S_zZv8BctRyF2k,3030
|
84
|
-
mcp_agent/mcp/interfaces.py,sha256=
|
84
|
+
mcp_agent/mcp/interfaces.py,sha256=PAou8znAl2HgtvfCpLQOZFbKra9F72OcVRfBJbboNX8,6965
|
85
85
|
mcp_agent/mcp/logger_textio.py,sha256=vljC1BtNTCxBAda9ExqNB-FwVNUZIuJT3h1nWmCjMws,3172
|
86
86
|
mcp_agent/mcp/mcp_agent_client_session.py,sha256=RMYNltc2pDIzxwEJSS5589RbvPO0KWV4Y3jSyAmhKf0,4181
|
87
|
-
mcp_agent/mcp/mcp_aggregator.py,sha256=
|
87
|
+
mcp_agent/mcp/mcp_aggregator.py,sha256=YVLqcv5dS5Z8yEpQggru69NzqQBFKpXG8_CG0XAN3qk,40219
|
88
88
|
mcp_agent/mcp/mcp_connection_manager.py,sha256=FGFF3DruVcHD_8J-VadrRyyrOiiq-N9-_ZzIdx4NUOA,13973
|
89
89
|
mcp_agent/mcp/mime_utils.py,sha256=difepNR_gpb4MpMLkBRAoyhDk-AjXUHTiqKvT_VwS1o,1805
|
90
|
-
mcp_agent/mcp/prompt_message_multipart.py,sha256=
|
90
|
+
mcp_agent/mcp/prompt_message_multipart.py,sha256=BDwRdNwyWHb2q2bccDb2iR2VlORqVvkvoG3xYzcMpCE,4403
|
91
91
|
mcp_agent/mcp/prompt_render.py,sha256=k3v4BZDThGE2gGiOYVQtA6x8WTEdOuXIEnRafANhN1U,2996
|
92
92
|
mcp_agent/mcp/prompt_serialization.py,sha256=MQY6QxnhQTiq0oBDsyRzFtX8sBiovUjzUFX78As8q60,17974
|
93
93
|
mcp_agent/mcp/resource_utils.py,sha256=K4XY8bihmBMleRTZ2viMPiD2Y2HWxFnlgIJi6dd_PYE,6588
|
@@ -103,17 +103,17 @@ mcp_agent/mcp/prompts/prompt_server.py,sha256=SiUR2xYfd3vEpghnYRdzz2rFEMtAbCKx2x
|
|
103
103
|
mcp_agent/mcp/prompts/prompt_template.py,sha256=EejiqGkau8OizORNyKTUwUjrPof5V-hH1H_MBQoQfXw,15732
|
104
104
|
mcp_agent/mcp_server/__init__.py,sha256=zBU51ITHIEPScd9nRafnhEddsWqXRPAAvHhkrbRI2_4,155
|
105
105
|
mcp_agent/mcp_server/agent_server.py,sha256=yne6wdc2sHwzOGuLFikLxUnHEuPEr3l8cfPlT_jbzBI,19811
|
106
|
-
mcp_agent/resources/examples/data-analysis/analysis-campaign.py,sha256=
|
106
|
+
mcp_agent/resources/examples/data-analysis/analysis-campaign.py,sha256=16gxrQ5kM8fb8tPwSCMXaitonk3PSEhz28njWwPxXrw,7269
|
107
107
|
mcp_agent/resources/examples/data-analysis/analysis.py,sha256=M9z8Q4YC5OGuqSa5uefYmmfmctqMn-WqCSfg5LI407o,2609
|
108
108
|
mcp_agent/resources/examples/data-analysis/fastagent.config.yaml,sha256=ini94PHyJCfgpjcjHKMMbGuHs6LIj46F1NwY0ll5HVk,1609
|
109
109
|
mcp_agent/resources/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv,sha256=pcMeOL1_r8m8MziE6xgbBrQbjl5Ijo98yycZn7O-dlk,227977
|
110
|
-
mcp_agent/resources/examples/in_dev/agent_build.py,sha256=
|
110
|
+
mcp_agent/resources/examples/in_dev/agent_build.py,sha256=BMPjW72Yl8ACSTOUWNg-LEe30BAsKPYrGFVqVQPgugE,2855
|
111
111
|
mcp_agent/resources/examples/in_dev/css-LICENSE.txt,sha256=zv0cyruZlRdeDUploPpO54kV1x1fFAc90X7vXVPrUIY,1073
|
112
112
|
mcp_agent/resources/examples/in_dev/slides.py,sha256=-SEFeGIg9SLF253NIxmA0NjlanLe8CR1yjDBBp2LXgs,4904
|
113
113
|
mcp_agent/resources/examples/internal/agent.py,sha256=JDfb-64gKoEG6ihsyyVWkuY9XNOdC1-P3r9qwG_qN28,497
|
114
114
|
mcp_agent/resources/examples/internal/fastagent.config.yaml,sha256=EPJW8vsRfYq57w2U2gPF0rTAxGhkaLgiYXw0mnpXsdM,2060
|
115
115
|
mcp_agent/resources/examples/internal/history_transfer.py,sha256=ETyX2wMMvUnMpUhu4ij9ZTpw2wQR6vPpBwlXJswPnhM,1157
|
116
|
-
mcp_agent/resources/examples/internal/job.py,sha256=
|
116
|
+
mcp_agent/resources/examples/internal/job.py,sha256=Z-c78iqbgHRZG5GSQekHuRTxFUrKMqMaOSOlRYAgamM,4103
|
117
117
|
mcp_agent/resources/examples/internal/prompt_category.py,sha256=kMvqNX_zu0sV-kTaAR3skc_tsq9t8QSEofciK0m4aJc,551
|
118
118
|
mcp_agent/resources/examples/internal/prompt_sizing.py,sha256=bskgxulN57hVkc0V9W0fnjnqSRCK5Tkw9Ggf2MmGIVU,1989
|
119
119
|
mcp_agent/resources/examples/internal/simple.txt,sha256=lcWo9h4NJE1OshBhRgg2QBHhHHqcrVj5j1LWdlyYlAk,14
|
@@ -121,30 +121,30 @@ mcp_agent/resources/examples/internal/sizer.py,sha256=xP1TBJkp4xIdtJnyk2MP4BufTh
|
|
121
121
|
mcp_agent/resources/examples/internal/social.py,sha256=pTKcpHAcvA-vQYgjVfDuU1FivCR004Nq4N2GXd5OMs0,1716
|
122
122
|
mcp_agent/resources/examples/mcp/state-transfer/agent_one.py,sha256=HR-Igr8k68HU0tqIpaXujtJxnKSUwwtZqTdZk8QHNgo,455
|
123
123
|
mcp_agent/resources/examples/mcp/state-transfer/agent_two.py,sha256=TY9SPzJZFv3TL6VEP3IpdJvTjYup5txF_DjpvEzlmbw,476
|
124
|
-
mcp_agent/resources/examples/mcp/state-transfer/fastagent.config.yaml,sha256
|
124
|
+
mcp_agent/resources/examples/mcp/state-transfer/fastagent.config.yaml,sha256=-IIocaehANnWiwFHSNNzDRdV80ApicNmxAY4flKETpk,797
|
125
125
|
mcp_agent/resources/examples/mcp/state-transfer/fastagent.secrets.yaml.example,sha256=0n3F2S_Z2CeLHZueZqCGy37mxiMDHLplvxUHYiCpD2A,421
|
126
126
|
mcp_agent/resources/examples/prompting/__init__.py,sha256=2GSrs9MSDIKo-uDrUI0O311F0UH0RW02ZNdvItJzjfI,50
|
127
|
-
mcp_agent/resources/examples/prompting/agent.py,sha256=
|
127
|
+
mcp_agent/resources/examples/prompting/agent.py,sha256=HxzUsidfxoc7Th0Ws55ppQCHNLkdZvcbiAcc2fMd4KI,490
|
128
128
|
mcp_agent/resources/examples/prompting/delimited_prompt.txt,sha256=T_RRcJVXbrI6fXUIatQxx-8vALJ64qQqh-2WPeRS1b8,305
|
129
|
-
mcp_agent/resources/examples/prompting/fastagent.config.yaml,sha256=
|
129
|
+
mcp_agent/resources/examples/prompting/fastagent.config.yaml,sha256=EN9vERBVxIqvhv9EbbaYePMx-0_TpmZBr_vW7UxRdKA,1273
|
130
130
|
mcp_agent/resources/examples/prompting/image_server.py,sha256=vRDRGi68BqTWcldZ4-sd8j41M3e5TtWIUSzIROK8uFo,1667
|
131
131
|
mcp_agent/resources/examples/prompting/prompt1.txt,sha256=H3Is5WvS9xeB7eP2-4bWF5PfZhZ6B0BICKGdGeKL9WE,64
|
132
132
|
mcp_agent/resources/examples/prompting/work_with_image.py,sha256=2MctSPXZsmIyCYvsxsRc1_v_8v0ZKorHH0gWZxLW8Tc,507
|
133
|
-
mcp_agent/resources/examples/researcher/fastagent.config.yaml,sha256=
|
133
|
+
mcp_agent/resources/examples/researcher/fastagent.config.yaml,sha256=TbVMHQCKcytVr44o0cpsgP-tAJ2S2OlTgn6VnXSTIpM,2242
|
134
134
|
mcp_agent/resources/examples/researcher/researcher-eval.py,sha256=CR9m4lyoXijS1whvsBDuk6IA-RmNc6iOYbtloETkITY,1833
|
135
135
|
mcp_agent/resources/examples/researcher/researcher-imp.py,sha256=oJxSVnLbZfIn71QbQR1E6j_m_UBrOOGP4SVljXErHLQ,7879
|
136
136
|
mcp_agent/resources/examples/researcher/researcher.py,sha256=SZfExi-FfwYETzGt2O3caS3L5E6EemV3IUrJHyzZqHI,1333
|
137
137
|
mcp_agent/resources/examples/workflows/chaining.py,sha256=tY0kA0U8s2rceAO4ogZFtpQEkiUWcrYnYDgHu_-4G50,889
|
138
138
|
mcp_agent/resources/examples/workflows/evaluator.py,sha256=cQJCHLqzmzUZwrJoAYLpZv_C_LG26kAUWh3dKQPXtJA,3095
|
139
|
-
mcp_agent/resources/examples/workflows/fastagent.config.yaml,sha256=
|
139
|
+
mcp_agent/resources/examples/workflows/fastagent.config.yaml,sha256=qaxk-p7Pl7JepdL3a7BTl0CIp4LHCXies7pFdVWS9xk,783
|
140
140
|
mcp_agent/resources/examples/workflows/human_input.py,sha256=_I6nS6xYo8IHAmvzsUYOxqVGb4G6BTyJXPAmS3fNcBU,621
|
141
141
|
mcp_agent/resources/examples/workflows/orchestrator.py,sha256=rOGilFTliWWnZ3Jx5wZOH6AQMBKwaGqSMI4PR9MKcZw,2507
|
142
|
-
mcp_agent/resources/examples/workflows/parallel.py,sha256=
|
142
|
+
mcp_agent/resources/examples/workflows/parallel.py,sha256=DQ5vY5-h8Qa5QHcYjsWXhZ_FYrYoloVWOdgeXV9p2gI,1890
|
143
143
|
mcp_agent/resources/examples/workflows/router.py,sha256=E4x_-c3l4YW9w1i4ARcDtkdeqIdbWEGfsMzwLYpdbVc,1677
|
144
144
|
mcp_agent/resources/examples/workflows/short_story.txt,sha256=X3y_1AyhLFN2AKzCKvucJtDgAFIJfnlbsbGZO5bBWu0,1187
|
145
145
|
mcp_agent/ui/console_display.py,sha256=TVGDtJ37hc6UG0ei9g7ZPZZfFNeS1MYozt-Mx8HsPCk,9752
|
146
|
-
fast_agent_mcp-0.2.
|
147
|
-
fast_agent_mcp-0.2.
|
148
|
-
fast_agent_mcp-0.2.
|
149
|
-
fast_agent_mcp-0.2.
|
150
|
-
fast_agent_mcp-0.2.
|
146
|
+
fast_agent_mcp-0.2.17.dist-info/METADATA,sha256=qH-sDtu59orBDwzB0M73kx9CZUfey-5g2izt3Ewjz0A,29893
|
147
|
+
fast_agent_mcp-0.2.17.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
148
|
+
fast_agent_mcp-0.2.17.dist-info/entry_points.txt,sha256=bRniFM5zk3Kix5z7scX0gf9VnmGQ2Cz_Q1Gh7Ir4W00,186
|
149
|
+
fast_agent_mcp-0.2.17.dist-info/licenses/LICENSE,sha256=cN3FxDURL9XuzE5mhK9L2paZo82LTfjwCYVT7e3j0e4,10939
|
150
|
+
fast_agent_mcp-0.2.17.dist-info/RECORD,,
|
mcp_agent/agents/base_agent.py
CHANGED
@@ -20,6 +20,7 @@ from typing import (
|
|
20
20
|
Union,
|
21
21
|
)
|
22
22
|
|
23
|
+
from a2a_types.types import AgentCapabilities, AgentCard, AgentSkill
|
23
24
|
from mcp.types import (
|
24
25
|
CallToolResult,
|
25
26
|
EmbeddedResource,
|
@@ -58,6 +59,11 @@ if TYPE_CHECKING:
|
|
58
59
|
from mcp_agent.context import Context
|
59
60
|
|
60
61
|
|
62
|
+
DEFAULT_CAPABILITIES = AgentCapabilities(
|
63
|
+
streaming=False, pushNotifications=False, stateTransitionHistory=False
|
64
|
+
)
|
65
|
+
|
66
|
+
|
61
67
|
class BaseAgent(MCPAggregator, AgentProtocol):
|
62
68
|
"""
|
63
69
|
A base Agent class that implements the AgentProtocol interface.
|
@@ -586,7 +592,7 @@ class BaseAgent(MCPAggregator, AgentProtocol):
|
|
586
592
|
|
587
593
|
async def structured(
|
588
594
|
self,
|
589
|
-
|
595
|
+
multipart_messages: List[PromptMessageMultipart],
|
590
596
|
model: Type[ModelT],
|
591
597
|
request_params: RequestParams | None = None,
|
592
598
|
) -> Tuple[ModelT | None, PromptMessageMultipart]:
|
@@ -603,7 +609,7 @@ class BaseAgent(MCPAggregator, AgentProtocol):
|
|
603
609
|
An instance of the specified model, or None if coercion fails
|
604
610
|
"""
|
605
611
|
assert self._llm
|
606
|
-
return await self._llm.structured(
|
612
|
+
return await self._llm.structured(multipart_messages, model, request_params)
|
607
613
|
|
608
614
|
async def apply_prompt_messages(
|
609
615
|
self, prompts: List[PromptMessageMultipart], request_params: RequestParams | None = None
|
@@ -626,13 +632,51 @@ class BaseAgent(MCPAggregator, AgentProtocol):
|
|
626
632
|
def agent_type(self) -> AgentType:
|
627
633
|
"""
|
628
634
|
Return the type of this agent.
|
635
|
+
"""
|
636
|
+
return AgentType.BASIC
|
637
|
+
|
638
|
+
async def agent_card(self) -> AgentCard:
|
639
|
+
"""
|
640
|
+
Return an A2A card describing this Agent
|
641
|
+
"""
|
629
642
|
|
630
|
-
|
643
|
+
skills: List[AgentSkill] = []
|
644
|
+
tools: ListToolsResult = await self.list_tools()
|
645
|
+
for tool in tools.tools:
|
646
|
+
skills.append(await self.convert(tool))
|
631
647
|
|
632
|
-
|
633
|
-
|
648
|
+
return AgentCard(
|
649
|
+
name=self.name,
|
650
|
+
description=self.instruction,
|
651
|
+
url=f"fast-agent://agents/{self.name}/",
|
652
|
+
version="0.1",
|
653
|
+
capabilities=DEFAULT_CAPABILITIES,
|
654
|
+
defaultInputModes=["text/plain"],
|
655
|
+
defaultOutputModes=["text/plain"],
|
656
|
+
provider=None,
|
657
|
+
documentationUrl=None,
|
658
|
+
authentication=None,
|
659
|
+
skills=skills,
|
660
|
+
)
|
661
|
+
|
662
|
+
async def convert(self, tool: Tool) -> AgentSkill:
|
634
663
|
"""
|
635
|
-
|
664
|
+
Convert a Tool to an AgentSkill.
|
665
|
+
"""
|
666
|
+
|
667
|
+
_, tool_without_namespace = await self._parse_resource_name(tool.name, "tool")
|
668
|
+
return AgentSkill(
|
669
|
+
id=tool.name,
|
670
|
+
name=tool_without_namespace,
|
671
|
+
description=tool.description,
|
672
|
+
tags=["tool"],
|
673
|
+
examples=None,
|
674
|
+
inputModes=None, # ["text/plain"],
|
675
|
+
# cover TextContent | ImageContent ->
|
676
|
+
# https://github.com/modelcontextprotocol/modelcontextprotocol/pull/223
|
677
|
+
# https://github.com/modelcontextprotocol/modelcontextprotocol/pull/93
|
678
|
+
outputModes=None, # ,["text/plain", "image/*"],
|
679
|
+
)
|
636
680
|
|
637
681
|
@property
|
638
682
|
def message_history(self) -> List[PromptMessageMultipart]:
|
@@ -57,6 +57,7 @@ class OrchestratorAgent(BaseAgent):
|
|
57
57
|
config: AgentConfig,
|
58
58
|
agents: List[Agent],
|
59
59
|
plan_type: Literal["full", "iterative"] = "full",
|
60
|
+
plan_iterations: int = 5,
|
60
61
|
context: Optional[Any] = None,
|
61
62
|
**kwargs,
|
62
63
|
) -> None:
|
@@ -83,7 +84,7 @@ class OrchestratorAgent(BaseAgent):
|
|
83
84
|
agent_name = agent.name
|
84
85
|
self.logger.info(f"Adding agent '{agent_name}' to orchestrator")
|
85
86
|
self.agents[agent_name] = agent
|
86
|
-
|
87
|
+
self.plan_iterations = plan_iterations
|
87
88
|
# For tracking state during execution
|
88
89
|
self.plan_result: Optional[PlanResult] = None
|
89
90
|
|
@@ -186,8 +187,8 @@ class OrchestratorAgent(BaseAgent):
|
|
186
187
|
"""
|
187
188
|
iterations = 0
|
188
189
|
total_steps_executed = 0
|
189
|
-
max_iterations =
|
190
|
-
max_steps = getattr(request_params, "max_steps", max_iterations *
|
190
|
+
max_iterations = self.plan_iterations
|
191
|
+
max_steps = getattr(request_params, "max_steps", max_iterations * 3)
|
191
192
|
|
192
193
|
# Initialize plan result
|
193
194
|
plan_result = PlanResult(objective=objective, step_results=[])
|
@@ -414,7 +415,7 @@ class OrchestratorAgent(BaseAgent):
|
|
414
415
|
plan_status = "Plan Status: Not Started"
|
415
416
|
|
416
417
|
# Calculate iteration information
|
417
|
-
max_iterations =
|
418
|
+
max_iterations = self.plan_iterations
|
418
419
|
current_iteration = len(plan_result.step_results)
|
419
420
|
current_iteration = min(current_iteration, max_iterations - 1)
|
420
421
|
iterations_remaining = max(0, max_iterations - current_iteration - 1)
|
@@ -536,9 +537,7 @@ class OrchestratorAgent(BaseAgent):
|
|
536
537
|
return ""
|
537
538
|
|
538
539
|
# Get agent instruction or default description
|
539
|
-
instruction =
|
540
|
-
agent.instruction if hasattr(agent, "instruction") else f"Agent '{agent_name}'"
|
541
|
-
)
|
540
|
+
instruction = agent.instruction if agent.instruction else f"Agent '{agent_name}'"
|
542
541
|
|
543
542
|
# Format with XML tags
|
544
543
|
return f'<fastagent:agent name="{agent_name}">{instruction}</fastagent:agent>'
|