Set up for Local Development

Before you can start building data-enabled agents, you'll need to set up your local development environment. This setup enables you to create and test Actions with Data Access before deploying them to production.

Prerequisites

In order to follow this tutorial, you'll need have at least the following in place.

  • Basic familiarity with SQL and Python
  • VS Code (or Cursor) and Sema4.ai extensions installed on your development machine
  • Sema4.ai Studio installed on your machine
  • (Optional) Access to Sema4.ai Control Room with minimim Operator role

Installation

Install IDE of your choice

Our SDK is made and tested to work with VS Code, but extensions based on the same project, such as Cursor, also work. Choose the one that you are comfortable with!

Install Sema4.ai SDK extension for VS Code

Install the Sema4.ai SDK from the VS Code Marketplace (opens in a new tab) or follow the detailed instructions in Install SDK.

Install Sema4.ai Data Access extension for VS Code

Install the Sema4.ai Data Access extension from VS Code Marketplace (opens in a new tab).

Install Sema4.ai Studio

Install Sema4.ai Studio by following the instructions in Install Studio

Connect Studio to Control Room

This step is optional, but recommended. It allows you to test publishing and deploying agents to Control Room.

Sema4.ai Data Server

The Sema4.ai Data Server is a component that provides the zero-copy access to enterprise data sources. On a developer laptop our extensions and Studio shares one Data Server, and automatically install and run it. The data server maintains connections to the data sources and provides a unified query interface to all of them - regardless of the data source type.

If you have not used the Data Server on VS Code or Cursor before Studio, you will need to download and install it manually before starting to work with Data Access.

Download and install Data Server in Studio
Download and install Data Server in Studio

You will see the same data sources ("the Data Server state") in both VS Code and Studio. This is useful when you are developing Actions that use data sources, you don't need to manually configure the data sources in VS Code or Studio.

Restarting Data Server

In some cases you might want to restart the Data Server. You can do this directly in VS Code by clicking the Stop Data Server button in the status bar and then starting it again.

Restarting the Data Server in SDK
Restarting the Data Server in SDK

Similiarty in Studio through Data Sources view, Stop Data Server and Start Data Server.

Restarting the Data Server in Studio
Restarting the Data Server in Studio

Troubleshooting

You can view the Data Server logs in Studio through Settings view Advanced tab by clicking Data Server Log button.

View Data Server logs
View Data Server logs