Docs Navigation

CLI Reference

abslang init, chat, run, report, generate-ci — the commands that take ABS from a file to a quality gate in CI.

The CLI is the first thing anyone touches. It has to make three people happy at the same time:

  • QA: "I want to run this against staging and see if it passed or not, now."
  • Data: "I have 200 cases in a JSONL. Give me an aggregated report."
  • Everyone: "I don't want to learn YAML. Just let me describe the behavior and generate the file for me."

All three should succeed on their first try.


The five commands

abslang init                    # Scaffold a project
abslang chat                    # Generate a session by describing it in plain language
abslang run                     # Execute sessions against an agent
abslang report                  # View results from a previous run
abslang generate-ci             # Generate a CI/CD workflow (GitHub Actions / GitLab CI)

abslang init

Creates a project skeleton in the current directory:

abslang init

Creates:

.
├── abs.config.yaml              # Project-level config (gitignored)
├── sessions/
│   └── order-status.abs.yaml    # Example session with {{placeholders}}
└── datasets/
    └── order-status.jsonl       # 3 rows that bind those placeholders

abslang chat

You don't need to know the YAML format. Describe what the agent should do in plain language and abslang chat builds the .abs.yaml for you:

abslang chat
🤖 ABS Assistant — describe the agent behavior you want to test

You: A customer asks for a refund on a damaged item.
     The agent should verify the order, process the refund,
     and confirm with the amount and reference.

Assistant: I'll draft a refund flow with tool calls…
           [generates complete .abs.yaml with evaluations,
            dataset placeholders, and chain checks]

Uses OPENAI_API_KEY, ANTHROPIC_API_KEY, or DEEPSEEK_API_KEY — whichever is set. Override the model with ABS_CHAT_MODEL and the base URL with ABS_CHAT_BASE_URL.


abslang run

Executes one or more Sessions against an agent.

Simplest invocation

abslang run sessions/order-status.abs.yaml --agent http://localhost:8080/chat

With a single variable override

abslang run sessions/order-status.abs.yaml --agent $URL --var orderId=12345

With a dataset

abslang run sessions/order-status.abs.yaml --agent $URL --dataset datasets/order-status.jsonl

Runs the session once per row in the dataset. The report aggregates everything.

With a dataset and a filter

abslang run sessions/order-status.abs.yaml --agent $URL --dataset datasets/order-status.jsonl --filter "orderId:12345"

Multiple sessions at once

abslang run sessions/ --agent $URL --dataset datasets/

Runs every .abs.yaml in the directory against every .jsonl whose filename starts with the same prefix.

All flags

FlagRequiredDefaultDescription
[session]Yes—Path to a .abs.yaml file or a directory of sessions
--agentYes—Agent endpoint URL
--datasetNo—Path to a .json or .jsonl dataset file or directory
--varNo—Single variable binding (repeatable)
--filterNo—Filter rows by key:value
--agent-formatNoopenaiopenai, responses, claude, gemini, or custom
--agent-authNononenone, api_key, bearer, oauth2
--agent-tokenNo—Token or API key value
--agent-modelNo—Model/deployment for model endpoints (e.g. Azure OpenAI Responses). Omit for agent endpoints that own their model
--agent-forward-authNofalseForward the caller's Authorization header to the agent
--agent-authorizationNo—Raw Authorization header value to forward (e.g. Bearer eyJ...)
--agent-refresh-urlNo—OAuth2 token refresh URL
--agent-refresh-tokenNo—OAuth2 refresh token
--adapterNo—Evaluator adapter binding (repeatable: --adapter llm_judge=azure)
--judge-base-urlNo—Built-in judge: OpenAI-compatible base URL (Azure/Foundry, Ollama, vLLM, gateway)
--judge-api-keyNo—Built-in judge: API key (overrides ABS_JUDGE_API_KEY / OPENAI_API_KEY)
--judge-api-key-headerNoAuthorizationBuilt-in judge: header for the API key (use api-key for Azure)
--judge-modelNogpt-4oBuilt-in judge: model or Azure deployment name
--formatNotabletable, json, junit
--ciNofalseCI mode (no colors, no prompts)
--timeoutNo300Timeout per session run in seconds
--outputNo—Write report to file instead of stdout
--parallelNo1Number of dataset rows to run in parallel

Environment variables

Every flag can also be set via environment variable:

VariableEquivalent flag
ABS_AGENT_URL--agent
ABS_AGENT_FORMAT--agent-format
ABS_AGENT_AUTH--agent-auth
ABS_AGENT_TOKEN--agent-token
ABS_AGENT_MODEL--agent-model
ABS_AGENT_FORWARD_AUTH--agent-forward-auth
ABS_AGENT_AUTHORIZATION--agent-authorization
ABS_AGENT_REFRESH_URL--agent-refresh-url
ABS_AGENT_REFRESH_TOKEN--agent-refresh-token
ABS_AGENT_CLIENT_ID--agent-client-id
ABS_DATASET--dataset
ABS_FILTER--filter
ABS_JUDGE_PROVIDER— (forces openai, anthropic, or gemini)
ABS_JUDGE_MODEL--judge-model
ABS_JUDGE_BASE_URL--judge-base-url
ABS_JUDGE_API_KEY--judge-api-key
ABS_JUDGE_API_KEY_HEADER--judge-api-key-header
ABS_FORMAT--format
ABS_CI--ci
ABS_TIMEOUT--timeout
ABS_OUTPUT--output
ABS_PARALLEL--parallel
ABS_LOG_FORMAT--log-format
ABS_LOG_LEVEL--log-level
ABS_LOG_FILE--log-file
ABS_NO_LOG_CONTENT--no-log-content
ABS_VAR_orderId--var orderId=...

Structured logs and progress

run writes progress and events to stderr and the final report to stdout, so abslang run ... --format json > report.json stays clean:

abslang run session.abs.yaml --agent $URL --log-format jsonl --log-file events.jsonl
  • --log-format pretty (default) or jsonl (one JSON object per line).
  • --log-level error | warn | info | debug.
  • --log-file always writes JSONL, regardless of the console format.
  • --no-log-content omits trace content and reasons (privacy).

Events cover run, session, agent.request/response/error, behavior.match/skipped, evaluation.result, and report.written, with a stable envelope (v, ts, level, event, run_id). Failed evaluations also carry a machine-readable code (evaluator.threshold_not_met, adapter.not_configured, …) alongside the human reason.


Evaluator adapters

Pick where LLM-based evaluations are judged — without touching the session file:

# Built-in judge — auto-detects OpenAI / Anthropic / Gemini
OPENAI_API_KEY=sk-... abslang run session.abs.yaml --agent $URL

# Built-in judge on any OpenAI-compatible endpoint (Azure/Foundry, Ollama, vLLM, gateway)
abslang run session.abs.yaml --agent $URL \
  --judge-base-url "https://<resource>.openai.azure.com/openai/v1" \
  --judge-api-key "$AZURE_OPENAI_API_KEY" \
  --judge-api-key-header api-key \
  --judge-model gpt-4o-mini

# Azure AI Foundry — quality dimensions (Groundedness, Relevance, …)
abslang run session.abs.yaml --agent $URL --adapter azure

# AWS Bedrock — llm_judge + custom metrics
abslang run session.abs.yaml --agent $URL --adapter aws

# Google Vertex AI — quality + safety
abslang run session.abs.yaml --agent $URL --adapter google

# AI Evaluator — free tier, no infrastructure
abslang run session.abs.yaml --agent $URL --adapter llm_judge=aievaluator

Safety dimensions (Violence, HateUnfairness, Sexual, SelfHarm) work with the built-in judge out of the box — no criteria required. See Evaluations.

azure ships with both the Python and npm CLIs (the npm adapter renders the official Azure prompt templates locally, without the Python SDK). aws and google also ship on npm — they need @aws-sdk/client-bedrock-runtime and @google-cloud/vertexai respectively.


abslang report

Reads a JSON report from a previous abslang run --output and displays it.

abslang run session.abs.yaml --agent $URL --output report.json
abslang report report.json
abslang report report.json --format table   # Default, human-readable
abslang report report.json --format json    # Machine-readable
abslang report report.json --format junit   # CI integration
abslang report report.json --failed         # Show only failed cases
abslang report report.json --detail 3       # Show full trace for case #3

Config file

Every option can be set three ways: as a CLI flag, as an ABS_* environment variable, or in a config file. Precedence:

CLI flag  >  environment variable  >  config file  >  built-in default

By default ABS loads abs.config.yaml (searched from the current directory upward), or an explicit file with --config-file path.yaml (YAML or JSON). Unknown sections/keys are reported as warnings so typos don't silently get ignored.

# abs.config.yaml — every key maps to a CLI flag / ABS_* env var
agent:
  url: http://localhost:8080/chat   # --agent / ABS_AGENT_URL
  format: openai                    # --agent-format / ABS_AGENT_FORMAT
  auth: none                        # --agent-auth / ABS_AGENT_AUTH
  token: sk-...                     # --agent-token / ABS_AGENT_TOKEN
  model: gpt-4o                     # --agent-model / ABS_AGENT_MODEL
  forward_auth: true                # --agent-forward-auth / ABS_AGENT_FORWARD_AUTH
  authorization: "Bearer eyJ..."    # --agent-authorization / ABS_AGENT_AUTHORIZATION
  refresh_url: ...                  # --agent-refresh-url / ABS_AGENT_REFRESH_URL
  refresh_token: ...                # --agent-refresh-token / ABS_AGENT_REFRESH_TOKEN
  client_id: ...                    # --agent-client-id / ABS_AGENT_CLIENT_ID

adapters:
  llm_judge: aievaluator            # --adapter llm_judge=aievaluator

judge:
  base_url: ...                     # --judge-base-url / ABS_JUDGE_BASE_URL
  api_key: ...                      # --judge-api-key / ABS_JUDGE_API_KEY
  api_key_header: ...               # --judge-api-key-header / ABS_JUDGE_API_KEY_HEADER
  model: ...                        # --judge-model / ABS_JUDGE_MODEL

defaults:
  dataset: datasets/                # --dataset / ABS_DATASET
  filter: key:value                 # --filter / ABS_FILTER
  timeout: 120                      # --timeout / ABS_TIMEOUT
  parallel: 4                       # --parallel / ABS_PARALLEL
  output: report.json               # --output / ABS_OUTPUT
  vars:                             # fixed bindings (ABS_VAR_* / --var override)
    orderId: "12345"

run:
  format: table                     # --format / ABS_FORMAT (table | json | junit)
  ci: true                          # --ci / ABS_CI

logging:
  format: pretty                    # --log-format / ABS_LOG_FORMAT
  level: info                       # --log-level / ABS_LOG_LEVEL
  file: run.log.jsonl               # --log-file / ABS_LOG_FILE
  no_content: true                  # --no-log-content / ABS_NO_LOG_CONTENT

report:
  format: table                     # --format / ABS_FORMAT
  failed: false                     # --failed / ABS_FAILED
  detail: 3                         # --detail / ABS_DETAIL

CI/CD integration

abslang run sessions/ --agent $STAGING_AGENT --dataset datasets/ --format junit --ci > report.xml

Exit code 0 if all sessions passed. Exit code 1 if any failed. Drops straight into any CI system.


The four personas the CLI serves

PersonaWhat they typeWhat they get
QA engineerabslang run session.abs.yaml --agent $STAGING --dataset regression.jsonl --format junit --ciA JUnit report that blocks the deploy if it fails
Data scientistabslang run session.abs.yaml --agent $URL --dataset 200-cases.jsonl --output report.jsonA JSON artifact to analyze offline
Product ownerabslang report report.jsonA table that says 197/200 passed, with failures explained
Developerabslang run session.abs.yaml --agent localhost:8080 --var orderId=12345Instant feedback during development

One file. Four use cases.