Installing Sema4.ai SDK

To develop actions for Sema4.ai agents, you need to set up the Sema4.AI SDK before you begin.

  • Visual Studio Code (VS Code): The preferred IDE for developing actions, with dedicated extensions for Sema4.ai integration. Cursor is also supported.

  • Sema4.ai VS Code extension: Use the extension to write, test, and debug actions and agents. It includes commands to bootstrap new action and agent projects and manage their lifecycle.

  • Sema4.ai Data Access extension: Use the extension to develop actions with data access (connections to databases, data models and named queries) for Sema4.ai agents.

What about Python? Actions are written in Python, but out SDK independently manages the Python environment for you in order to keep the environment portable between your machine and the production environment. Check package.yaml file for the Python environment and dependencies!

Visual Studio Code

To get Visual Studio Code, visit code.visualstudio.com (opens in a new tab) and select the option appropriate for your operating system.

You can use any other IDE or text editor, but the Sema4.ai VS Code extension is only available for Visual Studio Code or Cursor (opens in a new tab) editor.

Sema4.ai VS Code extension

Version 2.21.0 is the last release of the Sema4.ai VS Code extension for the legacy agent platform. It won't get further updates. Version 3.0.0 and newer no longer support Agent and Action Packages.

Download the extension for your platform:

To install it, open the Command Palette in VS Code or Cursor, run Extensions: Install from VSIX..., and select the downloaded .vsix file.

To keep VS Code from replacing it with a newer version from the Marketplace, right-click Sema4.ai SDK in the Extensions view and turn off Auto Update.

The extension will provide the functionality you need to develop actions for Sema4.ai agents, and will appear as a new S4 icon in the left-hand sidebar of VS Code.

The extension will handle the rest of the setup for you automatically, using components such as RCC for managing Python environments and Action Server for running and testing AI actions.

Sema4.ai Data Access extension

Version 1.5.0 is the last release of the Sema4.ai Data Access extension. It won't get further updates, and it isn't available from the Visual Studio Marketplace.

To develop actions with data access, download the extension: vscode-sema4ai-data-access-1.5.0.vsix (opens in a new tab). The same file works on Windows, macOS and Linux.

Install it the same way as the Sema4.ai VS Code extension: open the Command Palette, run Extensions: Install from VSIX..., and select the downloaded .vsix file.

The extension will provide the functionality you need to develop actions with data access for Sema4.ai agents, and will appear as a new database icon in the left-hand sidebar of VS Code.

Some of the latest Macs with Apple silicon no longer come with Rosetta pre-installed. Some parts of our tooling still rely on Rosetta today, so in these cases you'll need to install Rosetta manually.

Follow for example this article (opens in a new tab) to install Rosetta on your machine.