Setup
This section will guide you through the process of preparing your development environment to use Vijil cloud services. Set up Vijil Evaluate to measure your system’s trustworthiness, or Vijil Dome to protect your agent.Vijil Evaluate
To run evaluation jobs through the Vijil Evalute API and interact with the results, you need to install the client library that provides the necessary functionalities. You can do so through downloading the library from PyPI.-U or --upgrade option.
Authentication using API Keys
You need a Vijil API key to authenticate remotely through the client library. You can obtain the API key by logging into your Vijil account, going to the profile page on the dashboard, then copying the value in the Token field.
.env file and load it into your Python environment using a library such as python-dotenv.
This user token expires after 24 hours. If you plan to use the API over long periods of time, you should use machine-to-machine secrets to regularly refresh the token.
Vijil Dome
Vijil Dome is an open-source library that provides input and output Guardrails for your AI agents. You can install it from PyPI:Running Evaluations
Once the Python client installed, you can instantiate a client class and store an API key for the provider your agent is hosted on.get_status command or utilize the UI. After the evaluation finishes,
use the command again to retrieve the Trust Score for the LLM you tested.
harnesses, you can also supply a list of trust dimensions or evaluation Scenarios.
You will look into them in later examples.
Running Detections
For extra flexibility, you can also run individual metrics or security/safety violation Detectors on atomic payloads provided by the users. For exampleclient.detections.list() to obtain a full list of supported Detectors.
You will take a look into detections in more detail in later examples.
Setting up Guardrails
You can put together components of the Vijil Dome library into input and output Guard configurations for an LLM, AI application, or agent. Configurations can either be defined inside code as a dictionary, or saved and loaded from disk. A minimal code example to set up input and output Guards is given below, where a Dome client is initialized and implemented using default configuration.input_guard.scan or output_guard.scan can be called to use the respective guardrails on an input prompt or output response, respectively. Later on in the documentation, we present detailed usage examples.