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

Install the Sema4.ai VS Code extension (opens in a new tab) from the Visual Studio Marketplace, or within VS Code.

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

To develop actions with data access, you need to install the Sema4.ai Data Access extension (opens in a new tab) from the Visual Studio Marketplace, or within VS Code.

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.