Files
langchain/libs/cli/langchain_cli/integration_template/docs/toolkits.ipynb
T
Oskar StarkandEugene Yurtsev 0d2cea747c docs: streamline LangSmith teasing (#30302)
This can only be reviewed by [hiding
whitespaces](https://github.com/langchain-ai/langchain/pull/30302/files?diff=unified&w=1).

The motivation behind this PR is to get my hands on the docs and make
the LangSmith teasing short and clear.

Right now I don't know how to do it, but this could be an include in the
future.

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-03-28 15:13:22 -04:00

5.4 KiB

Cell:
[Cell type raw - unsupported, skipped]

__ModuleName__Toolkit

  • TODO: Make sure API reference link is correct.

This will help you getting started with the ModuleName toolkit. For detailed documentation of all __ModuleName__Toolkit features and configurations head to the API reference.

Setup

  • TODO: Update with relevant info.

To enable automated tracing of individual tools, set your LangSmith API key:

In [ ]:
# os.environ["LANGSMITH_API_KEY"] = getpass.getpass("Enter your LangSmith API key: ")
# os.environ["LANGSMITH_TRACING"] = "true"

Installation

This toolkit lives in the __package_name__ package:

In [ ]:
%pip install -qU __package_name__

Instantiation

Now we can instantiate our toolkit:

  • TODO: Update model instantiation with relevant params.
In [ ]:
from __module_name__ import __ModuleName__Toolkit

toolkit = __ModuleName__Toolkit(
    # ...
)

Tools

View available tools:

In [ ]:
toolkit.get_tools()

TODO: list API reference pages for individual tools.

Use within an agent

In [ ]:
from langgraph.prebuilt import create_react_agent

agent_executor = create_react_agent(llm, tools)
In [ ]:
example_query = "..."

events = agent_executor.stream(
    {"messages": [("user", example_query)]},
    stream_mode="values",
)
for event in events:
    event["messages"][-1].pretty_print()

TODO: Any functionality or considerations specific to this toolkit

Fill in or delete if not relevant.

API reference

For detailed documentation of all __ModuleName__Toolkit features and configurations head to the API reference.