Install Vijil, register an Agent, run a trust Evaluation, and retrieve results, through the CLI, MCP, or REST API.
Vijil exposes four programmatic interfaces. This quickstart takes you from a fresh setup to a completed trust Evaluation. The workflow is the same for all four, so pick the tab for the interface you prefer at each step.
You will be prompted for your email and password. The CLI stores your token in ~/.vijil/config.yaml.If you belong to multiple teams, select the one you want to work with:
vijil team listvijil team use <team_id>
Every subsequent command uses the active team automatically, so you do not need to pass a team ID manually.
vijil-mcp reads the same credentials as the CLI. Configure and log in once:
vijil auth init --url https://console-api.example.comvijil auth loginvijil team use <team_id> # if you belong to multiple teams
Then create a .mcp.json file in your project root so Claude Code launches the server:
Create an API key in the Console under Settings > API Keys — a client ID (vk_…) plus a one-time secret shown only at creation. Export the pair; the SDK exchanges it for a short-lived access token automatically:
export VIJIL_CLIENT_ID="vk_..."export VIJIL_CLIENT_SECRET="..." # shown once at creation
Construct the client, pointing it at your Console gateway:
from vijil import Vijilclient = Vijil(gateway="https://console-api.example.com")
Vijil() reads the credentials from the environment automatically. If you already have a bearer access token, use it directly instead with VIJIL_API_KEY or Vijil(api_key="<access-token>") — but note that a bearer token is a JWT that expires 24 hours after it is issued. The client ID and secret do not expire, and the SDK refreshes the token from them automatically, so prefer the pair for long-lived automation.
In CI/CD, set VIJIL_CLIENT_ID and VIJIL_CLIENT_SECRET as secrets rather than committing them.
3
Register an Agent
CLI
MCP
REST API
SDK
Create an Agent configuration for the model you want to evaluate. Export your provider API key first to keep it out of your shell history:
Claude calls agent_create and shows you the new Agent including its ID. Note that ID, you will use it in the next steps. To see all registered Agents at any time:
List my agents
Create an Agent configuration pointing at the AI model you want to evaluate. The team is derived from your JWT token, so no team_id parameter is needed:
Keep the returned agent object, you will pass agent.id to the Evaluation. To see all registered Agents at any time:
for a in client.agents.list().items: print(a.id, a.name)
4
Choose a Harness
Harnesses are test suites that cover a specific trust dimension. The standard Harnesses include safety, security, reliability, privacy, toxicity, and ethics. For this quickstart you will run safety and security.
for harness in client.harnesses.list().items: print(harness.name)
For this quickstart you will use the standard trust Harnesses, which client.evaluate(..., baseline=True) runs in the next step. To run a specific custom Harness instead, pass its harness_id.
--sample-size 50 runs 50 Probes per Harness, enough for a meaningful score in a few minutes. Omit it to run the full Harness (~1,250 Probes for security). The CLI polls every 5 seconds and prints the evaluation ID when complete. Save it:
export EVAL_ID="e5f6a7b8-..."
Start a trust Evaluation and wait for it to finish:
Run a safety and security evaluation on agent a1b2c3d4-… with a sample size of 50, and wait for it to complete
Claude calls eval_run with wait=True, polls every 5 seconds, and reports back when the Evaluation finishes, including the per-Harness scores.
Ask for a sample size of 10 for fast iteration during development. Run the full Harness before releasing to production.
Start a trust Evaluation. Evaluations run asynchronously, so the API returns immediately with a 202 Accepted status and an evaluation_id:
Polling runs every 5 seconds by default. Adjust it with the _poll_interval argument. baseline=True covers the reliability, security, and safety dimensions in a single run.
6
View the Results
CLI
MCP
REST API
SDK
Retrieve your Trust Score and per-Harness breakdown:
vijil eval results-detail "$EVAL_ID"
This returns scores per Harness (0 to 1), individual Probe results, and identified failure patterns. To filter with jq: