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:
All three should succeed on their first try.
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)
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
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.
Executes one or more Sessions against an agent.
abslang run sessions/order-status.abs.yaml --agent http://localhost:8080/chat
abslang run sessions/order-status.abs.yaml --agent $URL --var orderId=12345
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.
abslang run sessions/order-status.abs.yaml --agent $URL --dataset datasets/order-status.jsonl --filter "orderId:12345"
abslang run sessions/ --agent $URL --dataset datasets/
Runs every .abs.yaml in the directory against every .jsonl whose filename starts with the same prefix.
| Flag | Required | Default | Description |
|---|---|---|---|
[session] | Yes | — | Path to a .abs.yaml file or a directory of sessions |
--agent | Yes | — | Agent endpoint URL |
--dataset | No | — | Path to a .json or .jsonl dataset file or directory |
--var | No | — | Single variable binding (repeatable) |
--filter | No | — | Filter rows by key:value |
--agent-format | No | openai | openai, responses, claude, gemini, or custom |
--agent-auth | No | none | none, api_key, bearer, oauth2 |
--agent-token | No | — | Token or API key value |
--agent-model | No | — | Model/deployment for model endpoints (e.g. Azure OpenAI Responses). Omit for agent endpoints that own their model |
--agent-forward-auth | No | false | Forward the caller's Authorization header to the agent |
--agent-authorization | No | — | Raw Authorization header value to forward (e.g. Bearer eyJ...) |
--agent-refresh-url | No | — | OAuth2 token refresh URL |
--agent-refresh-token | No | — | OAuth2 refresh token |
--adapter | No | — | Evaluator adapter binding (repeatable: --adapter llm_judge=azure) |
--judge-base-url | No | — | Built-in judge: OpenAI-compatible base URL (Azure/Foundry, Ollama, vLLM, gateway) |
--judge-api-key | No | — | Built-in judge: API key (overrides ABS_JUDGE_API_KEY / OPENAI_API_KEY) |
--judge-api-key-header | No | Authorization | Built-in judge: header for the API key (use api-key for Azure) |
--judge-model | No | gpt-4o | Built-in judge: model or Azure deployment name |
--format | No | table | table, json, junit |
--ci | No | false | CI mode (no colors, no prompts) |
--timeout | No | 300 | Timeout per session run in seconds |
--output | No | — | Write report to file instead of stdout |
--parallel | No | 1 | Number of dataset rows to run in parallel |
Every flag can also be set via environment variable:
| Variable | Equivalent 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_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_VAR_orderId | --var orderId=... |
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.
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.
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
abs.config.yaml stores project-level settings:
agent:
url: http://localhost:8080/chat
format: openai
auth: none
adapters:
llm_judge: aievaluator
defaults:
dataset: datasets/
timeout: 120
Precedence: CLI flag > environment variable > config file > built-in default.
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.
| Persona | What they type | What they get |
|---|---|---|
| QA engineer | abslang run session.abs.yaml --agent $STAGING --dataset regression.jsonl --format junit --ci | A JUnit report that blocks the deploy if it fails |
| Data scientist | abslang run session.abs.yaml --agent $URL --dataset 200-cases.jsonl --output report.json | A JSON artifact to analyze offline |
| Product owner | abslang report report.json | A table that says 197/200 passed, with failures explained |
| Developer | abslang run session.abs.yaml --agent localhost:8080 --var orderId=12345 | Instant feedback during development |
One file. Four use cases.