There are several ways to integrate the Heex SDK into your project and connect to your dataflows.

We recommend connecting your implementations (Monitors and Recorders) to your dataflows via your API or middleware, keeping them separate from your main process as standalone executables.

To get started, refer to the get-started or sample folder. You can either incorporate this folder into your build process or use it directly from the SDK to begin creating your implementations.

Alternatively, you can develop and build custom implementations directly within your code and build processes.

To link the HeexSDK in a CMake C++ project, add the following lines to your project:

  • Import the HeexSDK library. Use these lines to integrate the Heex SDK into your project:
    set(HEEX_SDK_DIR ~/heex/)
    find_package(HeexSdk REQUIRED PATHS ${HEEX_SDK_DIR})
    

ℹ️ Info: You may use

The HEEX_SDK_DIR required flag to import the SDK from a specific directory.

  • Add the Heex SDK alias library target to your executable using the target_link_libraries command
    add_executable(myProgram main.cpp)
    target_link_libraries(myProgram PRIVATE HeexSdk::HeexSdk)
    

Build your implementations (for python, you may skip this step)

  1. Build
  • Using the CLI.
    The CLI will only build samples that are located in the get-started or samples folders. If you want to build samples outside of these folders, refer to the CMake usage below. From the root of the SDK folder (ie from inside /path/to/Heex_SDK_<version>), run:

    ./heex sdk build-samples
    

    💡 Tip:

    For faster builds, specify the —jobs flag for multiple parrallel jobs. By default, it uses 1 job.

   ./heex sdk build-samples --jobs n
  • To build your agent using CMakeLists.txt, you may use these commands. From inside the folder containing your CMakeLists.txt (ie from inside /path/to/Heex_SDK_<version>/get-started/cpp), run:
   cmake -DCMAKE_BUILD_TYPE=Release -S . -B build -DHEEX_SDK_DIR=/path/to/Heex_SDK_<version>
   cmake --build build --config Release -j2
  1. Check to see if your Implementation executables are present.
    Example for get-started implementations:
    ls /path/to/Heex_SDK_<version>/get-started/cpp/GetStartedMonitor
    ls /path/to/Heex_SDK_<version>/get-started/cpp/GetStartedRecorder
    

Requirements on your implementations:

  • 2 implementations CANNOT have a same implementation ID.
  • One implementation CAN have more than one implementation ID (ie: you may create a sample that runs a recorder and a monitor).
  • Do not name 2 implementation scripts with the same filename (ie: the implementations/builtin folder may contain some pre-built samples, you cannot add a sample of your own in the implementations folder that would have an identical name as a bulitin one).

Run your implementations

  • If you plan to run your implementations via the Heex Agent, please refer to this section.
  • If you plan to run your implementations via the SDK mode,please refer to this section.