@@ -42,6 +42,7 @@ def __init__(
4242 output_type ,
4343 config_path : str = None ,
4444 config_type = None ,
45+ auth_header : dict = None
4546 ):
4647 """ Instantiate a Langgraph node encapsulating a remote ACP agent
4748
@@ -65,6 +66,7 @@ def __init__(
6566 self .outputType = output_type
6667 self .configPath = config_path
6768 self .configType = config_type
69+ self .auth_header = auth_header
6870
6971 def get_name (self ):
7072 return self .__name__
@@ -118,7 +120,7 @@ def invoke(self, state: Any, config: RunnableConfig) -> Any:
118120
119121 run_create = self ._prepare_run_create (state , config )
120122
121- api_client = ApiClient (configuration = self .clientConfig )
123+ api_client = ApiClient (configuration = self .clientConfig , header_name = self . auth_header [ "name" ], header_value = self . auth_header [ "value" ]),
122124 acp_client = ACPClient (api_client = api_client )
123125 run : Run = acp_client .create_run (run_create )
124126 run_output = acp_client .get_run_output (run_id = run .run_id , block_timeout = 120 )
@@ -127,7 +129,7 @@ def invoke(self, state: Any, config: RunnableConfig) -> Any:
127129
128130 async def ainvoke (self , state : Any , config : RunnableConfig ) -> Any :
129131 run_create = self ._prepare_run_create (state , config )
130- api_client = AsyncApiClient (configuration = self .clientConfig )
132+ api_client = AsyncApiClient (configuration = self .clientConfig , header_name = self . auth_header [ "name" ], header_value = self . auth_header [ "value" ] )
131133 acp_client = AsyncACPClient (api_client = api_client )
132134
133135 run : Run = await acp_client .create_run (run_create )
0 commit comments