fast-agent-mcp 0.1.5__py3-none-any.whl → 0.1.7__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.1.5.dist-info → fast_agent_mcp-0.1.7.dist-info}/METADATA +7 -5
- {fast_agent_mcp-0.1.5.dist-info → fast_agent_mcp-0.1.7.dist-info}/RECORD +10 -10
- mcp_agent/core/agent_app.py +9 -0
- mcp_agent/core/enhanced_prompt.py +1 -1
- mcp_agent/core/fastagent.py +3 -0
- mcp_agent/core/proxies.py +20 -3
- mcp_agent/resources/examples/researcher/researcher.py +1 -1
- {fast_agent_mcp-0.1.5.dist-info → fast_agent_mcp-0.1.7.dist-info}/WHEEL +0 -0
- {fast_agent_mcp-0.1.5.dist-info → fast_agent_mcp-0.1.7.dist-info}/entry_points.txt +0 -0
- {fast_agent_mcp-0.1.5.dist-info → fast_agent_mcp-0.1.7.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.1.
|
3
|
+
Version: 0.1.7
|
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
|
@@ -519,10 +519,6 @@ agent["greeter"].send("Good Evening!") # Dictionary access is supported
|
|
519
519
|
)
|
520
520
|
```
|
521
521
|
|
522
|
-
### Prompts
|
523
|
-
|
524
|
-
MCP Prompts are supported with `apply_prompt(name)`. Prompts can be
|
525
|
-
|
526
522
|
#### Chain
|
527
523
|
|
528
524
|
```python
|
@@ -586,6 +582,12 @@ MCP Prompts are supported with `apply_prompt(name)`. Prompts can be
|
|
586
582
|
)
|
587
583
|
```
|
588
584
|
|
585
|
+
### Prompts
|
586
|
+
|
587
|
+
MCP Prompts are supported with `apply_prompt(name,arguments)`, which always returns an Assistant Message. If the last message from the MCP Server is a 'User' message, it is sent to the LLM for processing. Prompts applied to the Agent's Context are retained - meaning that with `use_history=False`, Agents can act as finely tuned responders.
|
588
|
+
|
589
|
+
Prompts can also be applied interactively through the interactive interface by using the `/prompt` command.
|
590
|
+
|
589
591
|
### Secrets File
|
590
592
|
|
591
593
|
> [!TIP]
|
@@ -17,16 +17,16 @@ mcp_agent/cli/commands/bootstrap.py,sha256=Rmwbuwl52eHfnya7fnwKk2J7nCsHpSh6irka4
|
|
17
17
|
mcp_agent/cli/commands/config.py,sha256=32YTS5jmsYAs9QzAhjkG70_daAHqOemf4XbZBBSMz6g,204
|
18
18
|
mcp_agent/cli/commands/setup.py,sha256=_SCpd6_PrixqbSaE72JQ7erIRkZnJGmh_3TvvwSzEiE,6392
|
19
19
|
mcp_agent/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
20
|
-
mcp_agent/core/agent_app.py,sha256=
|
20
|
+
mcp_agent/core/agent_app.py,sha256=gnoRibyPTc9cV49Thtxn2ZU-INRLf1lf-yX7Jvra7lM,27443
|
21
21
|
mcp_agent/core/agent_types.py,sha256=yKiMbv9QO2dduq4zXmoMZlOZpXJZhM4oNwIq1-134FE,318
|
22
22
|
mcp_agent/core/agent_utils.py,sha256=QMvwmxZyCqYhBzSyL9xARsxTuwdmlyjQvrPpsH36HnQ,1888
|
23
23
|
mcp_agent/core/decorators.py,sha256=gYqXvwF0pFL-FFU2Vkq5-HsqBWJsXy3YeEdesL8o-jM,16110
|
24
|
-
mcp_agent/core/enhanced_prompt.py,sha256=
|
24
|
+
mcp_agent/core/enhanced_prompt.py,sha256=QpFRc4QuA2VqI1sFMwg4t427VqkLbvSkiBasyIuSoUk,16382
|
25
25
|
mcp_agent/core/error_handling.py,sha256=D3HMW5odrbJvaKqcpCGj6eDXrbFcuqYaCZz7fyYiTu4,623
|
26
26
|
mcp_agent/core/exceptions.py,sha256=a2-JGRwFFRoQEPuAq0JC5PhAJ5TO3xVJfdS4-VN29cw,2225
|
27
27
|
mcp_agent/core/factory.py,sha256=cmsv6qhdxdYoQ2Xjc0bIBKFbg3yQPe2bAjDovx4Wrus,20447
|
28
|
-
mcp_agent/core/fastagent.py,sha256=
|
29
|
-
mcp_agent/core/proxies.py,sha256=
|
28
|
+
mcp_agent/core/fastagent.py,sha256=v8LN-Oux3X0zSnLeE_vtHYN8JR1nZakhO2CBdYbCGQI,19461
|
29
|
+
mcp_agent/core/proxies.py,sha256=fUhuB3GoIdDIHg7rXn24O3C_tPiAzkZ9sTGuaQl4gxs,8827
|
30
30
|
mcp_agent/core/server_validation.py,sha256=_59cn16nNT4HGPwg19HgxMtHK4MsdWYDUw_CuL-5xek,1696
|
31
31
|
mcp_agent/core/simulator_registry.py,sha256=rcd1cyFGx8MAnN5O0UgwElmVKU_uoIBh9s24pxP33Jc,573
|
32
32
|
mcp_agent/core/types.py,sha256=Zhi9iW7uiOfdpSt9NC0FCtGRFtJPg4mpZPK2aYi7a7M,817
|
@@ -75,7 +75,7 @@ mcp_agent/resources/examples/mcp_researcher/researcher-eval.py,sha256=kNPjIU-JwE
|
|
75
75
|
mcp_agent/resources/examples/researcher/fastagent.config.yaml,sha256=bNOnID9OgdSBTUEhdimKB8LjaZLa1B6igmp-nxx8nr4,2271
|
76
76
|
mcp_agent/resources/examples/researcher/researcher-eval.py,sha256=kNPjIU-JwE0oIBQKwhv6lZsUF_SPtYVkiEEbY1ZVZxk,1807
|
77
77
|
mcp_agent/resources/examples/researcher/researcher-imp.py,sha256=Xfw2YAyjXd47pQz-uljgG5ii5x77fVuCP2XCivRDI48,7885
|
78
|
-
mcp_agent/resources/examples/researcher/researcher.py,sha256=
|
78
|
+
mcp_agent/resources/examples/researcher/researcher.py,sha256=iE6hlwoJVCgCvJfSPYrBvoXKFqkvXah8NHSHX5EgTxA,1431
|
79
79
|
mcp_agent/resources/examples/workflows/agent_build.py,sha256=ioG4X8IbR8wwja8Zdncsk8YAu0VD2Xt1Vhr7saNJCZQ,2855
|
80
80
|
mcp_agent/resources/examples/workflows/chaining.py,sha256=1G_0XBcFkSJCOXb6N_iXWlSc_oGAlhENR0k_CN1vJKI,1208
|
81
81
|
mcp_agent/resources/examples/workflows/evaluator.py,sha256=3XmW1mjImlaWb0c5FWHYS9yP8nVGTbEdJySAoWXwrDg,3109
|
@@ -129,8 +129,8 @@ mcp_agent/workflows/swarm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
129
129
|
mcp_agent/workflows/swarm/swarm.py,sha256=-lAIeSWDqbGHGRPTvjiP9nIKWvxxy9DAojl9yQzO1Pw,11050
|
130
130
|
mcp_agent/workflows/swarm/swarm_anthropic.py,sha256=pW8zFx5baUWGd5Vw3nIDF2oVOOGNorij4qvGJKdYPcs,1624
|
131
131
|
mcp_agent/workflows/swarm/swarm_openai.py,sha256=wfteywvAGkT5bLmIxX_StHJq8144whYmCRnJASAjOes,1596
|
132
|
-
fast_agent_mcp-0.1.
|
133
|
-
fast_agent_mcp-0.1.
|
134
|
-
fast_agent_mcp-0.1.
|
135
|
-
fast_agent_mcp-0.1.
|
136
|
-
fast_agent_mcp-0.1.
|
132
|
+
fast_agent_mcp-0.1.7.dist-info/METADATA,sha256=4WESrFqCtAwSRDeSR3nwxGyQMjqGLW5VIiUYIhPk3Ag,28388
|
133
|
+
fast_agent_mcp-0.1.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
134
|
+
fast_agent_mcp-0.1.7.dist-info/entry_points.txt,sha256=2IXtSmDK9XjWN__RWuRIJTgWyW17wJnJ_h-pb0pZAxo,174
|
135
|
+
fast_agent_mcp-0.1.7.dist-info/licenses/LICENSE,sha256=cN3FxDURL9XuzE5mhK9L2paZo82LTfjwCYVT7e3j0e4,10939
|
136
|
+
fast_agent_mcp-0.1.7.dist-info/RECORD,,
|
mcp_agent/core/agent_app.py
CHANGED
@@ -443,6 +443,15 @@ class AgentApp:
|
|
443
443
|
rich_print(
|
444
444
|
f" [dim]{arg_name}: {description}[/dim]"
|
445
445
|
)
|
446
|
+
|
447
|
+
# Collect required argument value
|
448
|
+
arg_value = await PromptSession().prompt_async(
|
449
|
+
HTML(
|
450
|
+
f"Enter value for <ansibrightcyan>{arg_name}</ansibrightcyan> (required): "
|
451
|
+
)
|
452
|
+
)
|
453
|
+
# Add to arg_values
|
454
|
+
arg_values[arg_name] = arg_value
|
446
455
|
|
447
456
|
# Only include non-empty values for optional arguments
|
448
457
|
if optional_args:
|
@@ -430,7 +430,7 @@ async def handle_special_commands(command, agent_app=None):
|
|
430
430
|
agent_name = command.split(":", 1)[1]
|
431
431
|
if agent_name in available_agents:
|
432
432
|
if agent_app:
|
433
|
-
rich_print(f"[green]Switching to agent: {agent_name}[/green]")
|
433
|
+
# rich_print(f"[green]Switching to agent: {agent_name}[/green]")
|
434
434
|
return {"switch_agent": agent_name}
|
435
435
|
else:
|
436
436
|
rich_print(
|
mcp_agent/core/fastagent.py
CHANGED
@@ -372,6 +372,9 @@ class FastAgent(ContextDependent):
|
|
372
372
|
|
373
373
|
# Create wrapper with all agents
|
374
374
|
wrapper = AgentApp(agent_app, active_agents)
|
375
|
+
|
376
|
+
# Store reference to AgentApp in MCPApp for proxies to access
|
377
|
+
agent_app._agent_app = wrapper
|
375
378
|
|
376
379
|
# Handle direct message sending if --agent and --message are provided
|
377
380
|
if self.args.agent and self.args.message:
|
mcp_agent/core/proxies.py
CHANGED
@@ -28,18 +28,35 @@ class BaseAgentProxy:
|
|
28
28
|
self._name = name
|
29
29
|
|
30
30
|
async def __call__(self, message: Optional[str] = None) -> str:
|
31
|
-
"""Allow: agent.researcher('message')"""
|
31
|
+
"""Allow: agent.researcher('message') or just agent.researcher()"""
|
32
|
+
if message is None:
|
33
|
+
# When called with no arguments, use prompt() to open the interactive interface
|
34
|
+
return await self.prompt()
|
32
35
|
return await self.send(message)
|
33
36
|
|
34
37
|
async def send(self, message: Optional[str] = None) -> str:
|
35
38
|
"""Allow: agent.researcher.send('message')"""
|
36
39
|
if message is None:
|
40
|
+
# For consistency with agent(), use prompt() to open the interactive interface
|
37
41
|
return await self.prompt()
|
38
42
|
return await self.generate_str(message)
|
39
43
|
|
40
44
|
async def prompt(self, default_prompt: str = "") -> str:
|
41
45
|
"""Allow: agent.researcher.prompt()"""
|
42
|
-
|
46
|
+
from mcp_agent.core.agent_app import AgentApp
|
47
|
+
|
48
|
+
# First check if _app is directly an AgentApp
|
49
|
+
if isinstance(self._app, AgentApp):
|
50
|
+
return await self._app.prompt(self._name, default_prompt)
|
51
|
+
|
52
|
+
# If not, check if it's an MCPApp with an _agent_app attribute
|
53
|
+
if hasattr(self._app, "_agent_app"):
|
54
|
+
agent_app = self._app._agent_app
|
55
|
+
if agent_app:
|
56
|
+
return await agent_app.prompt(self._name, default_prompt)
|
57
|
+
|
58
|
+
# If we can't find an AgentApp, return an error message
|
59
|
+
return "ERROR: Cannot prompt() - AgentApp not found"
|
43
60
|
|
44
61
|
async def generate_str(self, message: str) -> str:
|
45
62
|
"""Generate response for a message - must be implemented by subclasses"""
|
@@ -203,4 +220,4 @@ class ChainProxy(BaseAgentProxy):
|
|
203
220
|
proxy = self._agent_proxies[agent_name]
|
204
221
|
current_message = await proxy.generate_str(current_message)
|
205
222
|
|
206
|
-
return current_message
|
223
|
+
return current_message
|
File without changes
|
File without changes
|
File without changes
|