Skip to main content
This notebook covers how to get started with Robocorp Action Server action toolkit and LangChain. Robocorp is the easiest way to extend the capabilities of AI agents, assistants and copilots with custom actions.

Installation

First, see the Robocorp Quickstart on how to setup Action Server and create your Actions. In your LangChain application, install the langchain-robocorp package:
When you create the new Action Server following the above quickstart. It will create a directory with files, including action.py. We can add python function as actions as shown here. Let’s add a dummy function to action.py.
We then start the server:
And we can see:
Test locally by going to the server running at http://localhost:8080 and use the UI to run the function.

Environment Setup

Optionally you can set the following environment variables:
  • LANGSMITH_TRACING=true: To enable LangSmith log run tracing that can also be bind to respective Action Server action run logs. See LangSmith documentation for more.

Usage

We started the local action server, above, running on http://localhost:8080.

Single input tools

By default toolkit.get_tools() will return the actions as Structured Tools. To return single input tools, pass a Chat model to be used for processing the inputs.