Home / Function/ _arun() — langchain Function Reference

_arun() — langchain Function Reference

Architecture documentation for the _arun() function in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  cacbad31_a7b9_0071_1542_3126b1ed8310["_arun()"]
  18e85ff8_9a5d_f800_f722_027398dc89e7["BaseTool"]
  cacbad31_a7b9_0071_1542_3126b1ed8310 -->|defined in| 18e85ff8_9a5d_f800_f722_027398dc89e7
  9dab73a2_4a99_426f_5521_d2e1ca53cecc["arun()"]
  9dab73a2_4a99_426f_5521_d2e1ca53cecc -->|calls| cacbad31_a7b9_0071_1542_3126b1ed8310
  style cacbad31_a7b9_0071_1542_3126b1ed8310 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/tools/base.py lines 788–801

    async def _arun(self, *args: Any, **kwargs: Any) -> Any:
        """Use the tool asynchronously.

        Add `run_manager: AsyncCallbackManagerForToolRun | None = None` to child
        implementations to enable tracing.

        Returns:
            The result of the tool execution.
        """
        if kwargs.get("run_manager") and signature(self._run).parameters.get(
            "run_manager"
        ):
            kwargs["run_manager"] = kwargs["run_manager"].get_sync()
        return await run_in_executor(None, self._run, *args, **kwargs)

Domain

Subdomains

Called By

Frequently Asked Questions

What does _arun() do?
_arun() is a function in the langchain codebase, defined in libs/core/langchain_core/tools/base.py.
Where is _arun() defined?
_arun() is defined in libs/core/langchain_core/tools/base.py at line 788.
What calls _arun()?
_arun() is called by 1 function(s): arun.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free