Adding PhariaAI SDKs to your project

Intelligence Layer SDK is deprecated!

The former Intelligence Layer SDK has been split into three separate SDKs, available on PyPI: PhariaInference SDK, PhariaStudio SDK, and PhariaData SDK. These are described below.

The original Intelligence Layer SDK is now deprecated, and you should replace it with the above SDKs. For the documentation on the legacy Intelligence Layer, see (Deprecated) Adding the Intelligence Layer SDK to your project.


The PhariaAI SDKs

PhariaAI includes three SDKs

  • PhariaInference SDK - provides a way to interact with the Aleph Alpha inference stack through composable tasks, and allows for tracing the task execution while developing the logic

  • PhariaStudio SDK - contains the evaluation modules and everything needed to connect your project to PhariaStudio

  • PhariaData SDK - provides PhariaDocument Index capabilities and connection to the PhariaData service

Include the SDKs to your project dependencies

The PhariaAI SDKs are available on PyPI and can be installed using any Python package manager of your choice (pip, poetry, pipenv, uv, etc.).

You can install them to your project quickly with the following:

pip install pharia-inference-sdk
pip install pharia-studio-sdk
pip install pharia-data-sdk

Set your environment variables

Your environment needs to provide the following values:

AA_TOKEN=<YOUR_STUDIO_TOKEN>
STUDIO_URL="https://pharia-studio.{ingressDomain}"
CLIENT_URL="https://inference-api.{ingressDomain}"

Get an authorisation token

To use the Aleph Alpha APIs, you need a valid authorisation token. You get this in PhariaStudio, as follows:

  1. Open PhariaStudio, and log in if necessary.

  2. In the upper-right corner, click your profile icon.

  3. In the popup, click Copy Bearer Token:

PhariaStudio - copy bearer token