fast-agent-mcp 0.2.16__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.16.dist-info → fast_agent_mcp-0.2.17.dist-info}/METADATA +4 -6
- {fast_agent_mcp-0.2.16.dist-info → fast_agent_mcp-0.2.17.dist-info}/RECORD +43 -43
- 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 +16 -13
- 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/fastagent.py +1 -1
- 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_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.16.dist-info → fast_agent_mcp-0.2.17.dist-info}/WHEEL +0 -0
- {fast_agent_mcp-0.2.16.dist-info → fast_agent_mcp-0.2.17.dist-info}/entry_points.txt +0 -0
- {fast_agent_mcp-0.2.16.dist-info → fast_agent_mcp-0.2.17.dist-info}/licenses/LICENSE +0 -0
@@ -11,8 +11,6 @@ fast = FastAgent("FastAgent Example")
|
|
11
11
|
"agent",
|
12
12
|
instruction="You are a helpful AI Agent",
|
13
13
|
servers=["prompts"], # , "imgetage", "hfspace"],
|
14
|
-
# model="gpt-4o",
|
15
|
-
# instruction="You are a helpful AI Agent", servers=["prompts","basic_memory"], model="haiku"
|
16
14
|
)
|
17
15
|
async def main() -> None:
|
18
16
|
# use the --model command line switch or agent arguments to change model
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# Takes format:
|
6
6
|
# <provider>.<model_string>.<reasoning_effort?> (e.g. anthropic.claude-3-5-sonnet-20241022 or openai.o3-mini.low)
|
7
7
|
# Accepts aliases for Anthropic Models: haiku, haiku3, sonnet, sonnet35, opus, opus3
|
8
|
-
# and OpenAI Models: gpt-
|
8
|
+
# and OpenAI Models: gpt-4.1-mini, gpt-4.1, o1, o1-mini, o3-mini
|
9
9
|
#
|
10
10
|
# If not specified, defaults to "haiku".
|
11
11
|
# Can be overriden with a command line switch --model=<model>, or within the Agent constructor.
|
@@ -34,11 +34,10 @@ mcp:
|
|
34
34
|
servers:
|
35
35
|
prompts:
|
36
36
|
command: "prompt-server"
|
37
|
-
args: ["sizing.md", "resource.md","resource-exe.md","pdf_prompt.md"]
|
37
|
+
args: ["sizing.md", "resource.md", "resource-exe.md", "pdf_prompt.md"]
|
38
38
|
hfspace:
|
39
39
|
command: "npx"
|
40
40
|
args: ["@llmindset/mcp-hfspace"]
|
41
41
|
image:
|
42
42
|
command: "uv"
|
43
43
|
args: ["run", "image_server.py"]
|
44
|
-
|
@@ -4,7 +4,6 @@
|
|
4
4
|
#
|
5
5
|
#
|
6
6
|
|
7
|
-
execution_engine: asyncio
|
8
7
|
logger:
|
9
8
|
type: console
|
10
9
|
level: error
|
@@ -53,14 +52,10 @@ mcp:
|
|
53
52
|
args: ["mcp-server-fetch"]
|
54
53
|
sequential:
|
55
54
|
command: "npx"
|
56
|
-
args: ["-y","@modelcontextprotocol/server-sequential-thinking"]
|
57
|
-
|
55
|
+
args: ["-y", "@modelcontextprotocol/server-sequential-thinking"]
|
58
56
|
# webmcp:
|
59
57
|
# command: "node"
|
60
58
|
# args: ["/home/ssmith/.webmcp/server.cjs"]
|
61
59
|
# env:
|
62
60
|
# WEBMCP_SERVER_TOKEN: 96e22896d8143fc1d61fec09208fc5ed
|
63
61
|
|
64
|
-
|
65
|
-
|
66
|
-
|
@@ -25,7 +25,7 @@ fast = FastAgent(
|
|
25
25
|
instruction="""Verify the factual consistency within the story. Identify any contradictions,
|
26
26
|
logical inconsistencies, or inaccuracies in the plot, character actions, or setting.
|
27
27
|
Highlight potential issues with reasoning or coherence.""",
|
28
|
-
model="gpt-
|
28
|
+
model="gpt-4.1-mini",
|
29
29
|
)
|
30
30
|
@fast.agent(
|
31
31
|
name="style_enforcer",
|
@@ -1,112 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Keep track of all workflow decorator overloads indexed by executor backend.
|
3
|
-
Different executors may have different ways of configuring workflows.
|
4
|
-
"""
|
5
|
-
|
6
|
-
from typing import Callable, Dict, Type, TypeVar
|
7
|
-
|
8
|
-
R = TypeVar("R")
|
9
|
-
|
10
|
-
|
11
|
-
class DecoratorRegistry:
|
12
|
-
"""Centralized decorator management with validation and metadata."""
|
13
|
-
|
14
|
-
def __init__(self) -> None:
|
15
|
-
self._workflow_defn_decorators: Dict[str, Callable[[Type], Type]] = {}
|
16
|
-
self._workflow_run_decorators: Dict[
|
17
|
-
str, Callable[[Callable[..., R]], Callable[..., R]]
|
18
|
-
] = {}
|
19
|
-
|
20
|
-
def register_workflow_defn_decorator(
|
21
|
-
self,
|
22
|
-
executor_name: str,
|
23
|
-
decorator: Callable[[Type], Type],
|
24
|
-
) -> None:
|
25
|
-
"""
|
26
|
-
Registers a workflow definition decorator for a given executor.
|
27
|
-
|
28
|
-
:param executor_name: Unique name of the executor.
|
29
|
-
:param decorator: The decorator to register.
|
30
|
-
"""
|
31
|
-
if executor_name in self._workflow_defn_decorators:
|
32
|
-
print(
|
33
|
-
"Workflow definition decorator already registered for '%s'. Overwriting.",
|
34
|
-
executor_name,
|
35
|
-
)
|
36
|
-
self._workflow_defn_decorators[executor_name] = decorator
|
37
|
-
|
38
|
-
def get_workflow_defn_decorator(self, executor_name: str) -> Callable[[Type], Type]:
|
39
|
-
"""
|
40
|
-
Retrieves a workflow definition decorator for a given executor.
|
41
|
-
|
42
|
-
:param executor_name: Unique name of the executor.
|
43
|
-
:return: The decorator function.
|
44
|
-
"""
|
45
|
-
return self._workflow_defn_decorators.get(executor_name)
|
46
|
-
|
47
|
-
def register_workflow_run_decorator(
|
48
|
-
self,
|
49
|
-
executor_name: str,
|
50
|
-
decorator: Callable[[Callable[..., R]], Callable[..., R]],
|
51
|
-
) -> None:
|
52
|
-
"""
|
53
|
-
Registers a workflow run decorator for a given executor.
|
54
|
-
|
55
|
-
:param executor_name: Unique name of the executor.
|
56
|
-
:param decorator: The decorator to register.
|
57
|
-
"""
|
58
|
-
if executor_name in self._workflow_run_decorators:
|
59
|
-
print(
|
60
|
-
"Workflow run decorator already registered for '%s'. Overwriting.",
|
61
|
-
executor_name,
|
62
|
-
)
|
63
|
-
self._workflow_run_decorators[executor_name] = decorator
|
64
|
-
|
65
|
-
def get_workflow_run_decorator(
|
66
|
-
self, executor_name: str
|
67
|
-
) -> Callable[[Callable[..., R]], Callable[..., R]]:
|
68
|
-
"""
|
69
|
-
Retrieves a workflow run decorator for a given executor.
|
70
|
-
|
71
|
-
:param executor_name: Unique name of the executor.
|
72
|
-
:return: The decorator function.
|
73
|
-
"""
|
74
|
-
return self._workflow_run_decorators.get(executor_name)
|
75
|
-
|
76
|
-
|
77
|
-
def default_workflow_defn(cls: Type, *args, **kwargs) -> Type:
|
78
|
-
"""Default no-op workflow definition decorator."""
|
79
|
-
return cls
|
80
|
-
|
81
|
-
|
82
|
-
def default_workflow_run(fn: Callable[..., R]) -> Callable[..., R]:
|
83
|
-
"""Default no-op workflow run decorator."""
|
84
|
-
|
85
|
-
def wrapper(*args, **kwargs):
|
86
|
-
return fn(*args, **kwargs)
|
87
|
-
|
88
|
-
return wrapper
|
89
|
-
|
90
|
-
|
91
|
-
def register_asyncio_decorators(decorator_registry: DecoratorRegistry) -> None:
|
92
|
-
"""Registers default asyncio decorators."""
|
93
|
-
executor_name = "asyncio"
|
94
|
-
decorator_registry.register_workflow_defn_decorator(executor_name, default_workflow_defn)
|
95
|
-
decorator_registry.register_workflow_run_decorator(executor_name, default_workflow_run)
|
96
|
-
|
97
|
-
|
98
|
-
def register_temporal_decorators(decorator_registry: DecoratorRegistry) -> None:
|
99
|
-
"""Registers Temporal decorators if Temporal SDK is available."""
|
100
|
-
try:
|
101
|
-
import temporalio.workflow as temporal_workflow
|
102
|
-
|
103
|
-
TEMPORAL_AVAILABLE = True
|
104
|
-
except ImportError:
|
105
|
-
TEMPORAL_AVAILABLE = False
|
106
|
-
|
107
|
-
if not TEMPORAL_AVAILABLE:
|
108
|
-
return
|
109
|
-
|
110
|
-
executor_name = "temporal"
|
111
|
-
decorator_registry.register_workflow_defn_decorator(executor_name, temporal_workflow.defn)
|
112
|
-
decorator_registry.register_workflow_run_decorator(executor_name, temporal_workflow.run)
|
File without changes
|
File without changes
|
File without changes
|