Package: robocorp-action-server
robocorp-action-serverRobocorp Action Serveris a Python framework designed to simplify the deployment
of actions (AI or otherwise).Anactionin this case is defined as a Python function (which has inputs/outputs
defined), which is served by theRobocorp Action Server.TheRobocorp Action Serverautomatically generates an OpenAPI spec for your Python code, enabling different AI/LLM Agents to understand and call your Action. It also manages the Action lifecycle and provides full traceability of what happened during runs.1. Install Action ServerAction Server is available as a stand-alone fully signed executable and viapip install robocorp-action-server.We recommend the executable to prevent confusion in case you have multiple/crowded Python environments, etc.For macOS# Install Robocorp Action Serverbrewupdate
brewinstallrobocorp/tools/action-serverFor Windows# Download Robocorp Action Servercurl-oaction-server.exehttps://downloads.robocorp.com/action-server/releases/latest/windows64/action-server.exe# Add to PATH or move to a folder that is in PATHsetxPATH=%PATH%;%CD%For Linux# Download Robocorp Action Servercurl-oaction-serverhttps://downloads.robocorp.com/action-server/releases/latest/linux64/action-server
chmoda+xaction-server# Add to PATH or move to a folder that is in PATHsudomvaction-server/usr/local/bin/2. Run your first Action# Bootstrap a new project using this template.# You'll be prompted for the name of the project (directory):action-servernew# Start Action Servercdmy-project
action-serverstart--expose👉 You should now have an Action Server running locally at:http://localhost:8080, so open that in your browser and the web UI will guide you further.👉 Using the--expose-flag, you also get a public internet-facing URL (something like "https://twently-cuddly-dinosaurs.robocorp.link") and the related token. These are the details that you need to configure your AI Agent to have access to your ActionWhat do you need in your Action PackageAnAction Packageis currently defined as a local folder that contains at least one Python file containing an action entry point
(a Python function marked with@action-decorator fromrobocorp.actions).Theconda.yamlfile is required for specifying the Python environment and dependencies for
your Action (RCCwill be used to
automatically bootstrap it and keep it updated given theconda.yamlcontents).Note: theconda.yamlis optional if the action server is not being used as a standalone
(i.e.: if it was pip-installed it can use the same python environment where it's installed).See:More information onconda.yaml.Arobot.yamlused by RCC is not required, but it may be useful to have it to manually run the actions out of theRobocorp Action Server.We recommend checking outRobocorp Code-extension for VS Code.Bootstrapping a new ActionStart new projects with:action-server newNote: theaction-serverexecutable should be automatically added to your python installation afterpip install robocorp-action-server, but if for some reason it wasn't pip-installed, it's also possible to usepython -m robocorp.action_serverinstead ofaction-server.After creating the project, it's possible to serve the actions under the
current directory with:action-server startFor example: When runningaction-server start, the action server will scan for existing actions under the current directory, and it'll start serving those.After it's started, it's possible to access the following URLs:/index.html: UI for the Action Server./openapi.json: Provides the openapi spec for the action server./docs: Provides access to the APIs available in the server and a UI to test it.API ReferenceInformation on specific functions or classes:robocorp.action-serverChangelogA list of releases and corresponding changes can be found in thechangelog.