TypeError: SlackGetChannel._run() got multiple values for argument 'run_manager'
Labels: name: area: agent, name: auto:bug

### System Info

Python 3.10.12
langchain 0.0.354

### Who can help?

@hwch

### Information

- [ ] The official example notebooks/scripts
- [X] My own modified scripts

### Related Components

- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [X] Agents / Agent Executors
- [X] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

from langchain.agents.agent_toolkits.slack.toolkit import SlackToolkit
stoolkit = SlackToolkit()
tools = stoolkit.get_tools()

agent = OpenAIAssistantRunnable.create_assistant(
    name="Sales assistant",
    instructions="""You are a admin agent, tasked with the following jobs:
        2. Read and post messages on Slack""",
         tools=tools,
    model="gpt-4-1106-preview",
    as_agent=True
)

from langchain.agents.agent import AgentExecutor

agent_executor = AgentExecutor.from_agent_and_tools(agent=agent, tools=tools)
agent_executor.invoke({"content":"list all messages in #budget-decisions"})
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[11], line 13
      agent_executor = AgentExecutor.from_agent_and_tools(agent=agent, tools=tools)
      ---> agent_executor.invoke({"content":"list all messages in #budget-decisions"})

File ~/smith/lib/python3.10/site-packages/langchain/chains/base.py:93, in Chain.invoke(self, input, config, **kwargs)
     86 def invoke(
     87     self,
     88     input: Dict[str, Any],
     89     config: Optional[RunnableConfig] = None,
     90     **kwargs: Any,
     91 ) -> Dict[str, Any]:
     92     config = ensure_config(config)
---> 93     return self(
     94         input,
     95         callbacks=config.get("callbacks"),
     96         tags=config.get("tags"),
     97         metadata=config.get("metadata"),
     98         run_name=config.get("run_name"),
     99         **kwargs,
    100     )

File ~/smith/lib/python3.10/site-packages/langchain/chains/base.py:316, in Chain.__call__(self, inputs, return_only_outputs, callbacks, tags, metadata, run_name, include_run_info)
    314 except BaseException as e:
    315     run_manager.on_chain_error(e)
--> 316     raise e
    317 run_manager.on_chain_end(outputs)
    318 final_outputs: Dict[str, Any] = self.prep_outputs(
    319     inputs, outputs, return_only_outputs
    320 )

File ~/smith/lib/python3.10/site-packages/langchain/chains/base.py:310, in Chain.__call__(self, inputs, return_only_outputs, callbacks, tags, metadata, run_name, include_run_info)
    303 run_manager = callback_manager.on_chain_start(
    304     dumpd(self),
    305     inputs,
    306     name=run_name,
    307 )
    308 try:
    309     outputs = (
--> 310         self._call(inputs, run_manager=run_manager)
    311         if new_arg_supported
    312         else self._call(inputs)
    313     )
    314 except BaseException as e:
    315     run_manager.on_chain_error(e)

File ~/smith/lib/python3.10/site-packages/langchain/agents/agent.py:1312, in AgentExecutor._call(self, inputs, run_manager)
   1310 # We now enter the agent loop (until it returns something).
   1311 while self._should_continue(iterations, time_elapsed):
-> 1312     next_step_output = self._take_next_step(
   1313         name_to_tool_map,
   1314         color_mapping,
   1315         inputs,
   1316         intermediate_steps,
   1317         run_manager=run_manager,
   1318     )
   1319     if isinstance(next_step_output, AgentFinish):
   1320         return self._return(
   1321             next_step_output, intermediate_steps, run_manager=run_manager
   1322         )

File ~/smith/lib/python3.10/site-packages/langchain/agents/agent.py:1038, in AgentExecutor._take_next_step(self, name_to_tool_map, color_mapping, inputs, intermediate_steps, run_manager)
   1029 def _take_next_step(
   1030     self,
   1031     name_to_tool_map: Dict[str, BaseTool],
   (...)
   1035     run_manager: Optional[CallbackManagerForChainRun] = None,
   1036 ) -> Union[AgentFinish, List[Tuple[AgentAction, str]]]:
   1037     return self._consume_next_step(
-> 1038         [
   1039             a
   1040             for a in self._iter_next_step(
   1041                 name_to_tool_map,
   1042                 color_mapping,
   1043                 inputs,
   1044                 intermediate_steps,
   1045                 run_manager,
   1046             )
   1047         ]
   1048     )

File ~/smith/lib/python3.10/site-packages/langchain/agents/agent.py:1038, in <listcomp>(.0)
   1029 def _take_next_step(
   1030     self,
   1031     name_to_tool_map: Dict[str, BaseTool],
   (...)
   1035     run_manager: Optional[CallbackManagerForChainRun] = None,
   1036 ) -> Union[AgentFinish, List[Tuple[AgentAction, str]]]:
   1037     return self._consume_next_step(
-> 1038         [
   1039             a
   1040             for a in self._iter_next_step(
   1041                 name_to_tool_map,
   1042                 color_mapping,
   1043                 inputs,
   1044                 intermediate_steps,
   1045                 run_manager,
   1046             )
   1047         ]
   1048     )

File ~/smith/lib/python3.10/site-packages/langchain/agents/agent.py:1134, in AgentExecutor._iter_next_step(self, name_to_tool_map, color_mapping, inputs, intermediate_steps, run_manager)
   1132         tool_run_kwargs["llm_prefix"] = ""
   1133     # We then call the tool on the tool input to get an observation
-> 1134     observation = tool.run(
   1135         agent_action.tool_input,
   1136         verbose=self.verbose,
   1137         color=color,
   1138         callbacks=run_manager.get_child() if run_manager else None,
   1139         **tool_run_kwargs,
   1140     )
   1141 else:
   1142     tool_run_kwargs = self.agent.tool_run_logging_kwargs()

File ~/smith/lib/python3.10/site-packages/langchain_core/tools.py:365, in BaseTool.run(self, tool_input, verbose, start_color, color, callbacks, tags, metadata, run_name, **kwargs)
    363 except (Exception, KeyboardInterrupt) as e:
    364     run_manager.on_tool_error(e)
--> 365     raise e
    366 else:
    367     run_manager.on_tool_end(
    368         str(observation), color=color, name=self.name, **kwargs
    369     )

File ~/smith/lib/python3.10/site-packages/langchain_core/tools.py:337, in BaseTool.run(self, tool_input, verbose, start_color, color, callbacks, tags, metadata, run_name, **kwargs)
    334 try:
    335     tool_args, tool_kwargs = self._to_args_and_kwargs(parsed_input)
    336     observation = (
--> 337         self._run(*tool_args, run_manager=run_manager, **tool_kwargs)
    338         if new_arg_supported
    339         else self._run(*tool_args, **tool_kwargs)
    340     )
    341 except ToolException as e:
    342     if not self.handle_tool_error:

TypeError: SlackGetChannel._run() got multiple values for argument 'run_manager'

### Expected behavior

The slack agent should send a message on the said channel.