Skip to main content

ABS — Agent Behavior Specification

Specify how your AI agents behave — then verify it.

PyPI version npm version Tests License

A vendor-neutral, human-readable format for describing the observable behavior of AI agents — what users say, what agents do, and how it should be evaluated. Like OpenAPI for HTTP APIs, ABS gives agent behavior a shared, tool-independent contract.

📖 Full documentation · 📦 GitHub

Install

pip install abslang

Commands

abslang init

Scaffold a new ABS project with an example session and dataset.

abslang init

Creates abs.config.yaml, sessions/order-status.abs.yaml, and sessions/order-status.jsonl (3 rows).

Config file

Every option can be set three ways, highest priority first:

CLI flag  >  ABS_* env var  >  config file  >  built-in default

abslang 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. Sections: agent (url, format, auth, token, model, forward_auth, authorization, refresh_url, refresh_token, client_id), adapters, judge (base_url, api_key, api_key_header, model), defaults (dataset, filter, timeout, parallel, output, vars), run (format, ci), logging (format, level, file, no_content), and report (format, failed, detail). Each key maps to the corresponding --flag / ABS_* env var.

abslang run

Execute ABS sessions against an agent.

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

# With a dataset (parametrized testing — one run per row)
abslang run sessions/order-status.abs.yaml --agent $URL --dataset sessions/order-status.jsonl

# With a single variable override
abslang run sessions/order-status.abs.yaml --agent $URL --var orderId=12345

# All sessions in a directory
abslang run sessions/ --agent $URL --dataset datasets/

# CI mode with JUnit output
abslang run sessions/ --agent $STAGING --dataset datasets/ --format junit --ci > report.xml
Option Description
--agent <url> Agent endpoint URL (or set ABS_AGENT_URL)
--dataset <path> JSON/JSONL dataset file
--var key=value Single variable binding (repeatable)
--filter key:value Filter dataset rows
--agent-format openai (default), responses, claude, or gemini
--agent-auth none, api_key, bearer, or oauth2
--agent-token Auth token or API key
--agent-refresh-url OAuth2 token refresh URL
--agent-refresh-token OAuth2 refresh token
--agent-client-id OAuth2 client ID
--agent-model Model/deployment for model endpoints (e.g. Azure OpenAI Responses) — omit when the agent owns its model
--agent-forward-auth Forward the caller's Authorization header to the agent
--agent-authorization Raw Authorization header value to forward
--adapter llm_judge=<name> Route LLM evaluations through an adapter (aievaluator, azure, aws, google) — see below
--judge-base-url Built-in judge on a custom OpenAI-compatible endpoint (Azure/Foundry, Ollama, vLLM)
--judge-api-key Built-in judge API key (overrides ABS_JUDGE_API_KEY / OPENAI_API_KEY)
--judge-api-key-header Header for the judge key (default Authorization; use api-key for Azure)
--judge-model Built-in judge model or Azure deployment name
--judge-max-tokens-param Token-limit field name: max_tokens (default) or max_completion_tokens (gpt-5/o-series)
--judge-max-tokens Built-in judge token limit for judge responses (default: 512)
--judge-omit-temperature Omit temperature from the request (o-series models reject it)
--judge-param <key=value> Extra request body parameter, repeatable (merged last, can override)
--format table (default), json, or junit
--ci CI mode (no colors)
--timeout <n> Timeout per session in seconds (default: 300)
--output <path> Write report to file
--parallel <n> Run N dataset rows in parallel
--log-format pretty (default) or jsonl (one event per line)
--log-level error, warn, info (default), debug
--log-file Write machine-readable JSONL events to a file
--no-log-content Omit trace content and reasons from logs (privacy)

You can also run the module directly: python -m abslang run ....

abslang report

View results from a previous abslang run --output.

abslang report report.json                  # Table view
abslang report report.json --format json    # Machine-readable
abslang report report.json --format junit   # CI integration
abslang report report.json --failed         # Only failed cases
abslang report report.json --detail 3       # Full trace for row #3

abslang chat

Generate ABS YAML by describing the behavior in plain language.

# Works with OpenAI, Anthropic, or DeepSeek — auto-detects from env
abslang chat

# Or specify a provider
abslang chat --provider openai
abslang chat --provider anthropic
abslang chat --provider deepseek

# You: A customer asks for a refund. The agent should verify the order, process it, and confirm.
# → generates .abs.yaml with evaluations, datasets, and chain checks

Commands inside chat: /save <path>, /force <path>, /quit.

abslang generate-ci

Generate a CI/CD workflow file.

abslang generate-ci --platform github   # GitHub Actions
abslang generate-ci --platform gitlab   # GitLab CI

LLM judge adapters

Evaluations like llm_judge, Groundedness, and Relevance need an LLM to produce the judgment. abslang routes them through an adapter — you pick where the judgment runs.

Built-in judge (zero setup — llm_judge + safety dimensions):

# Auto-detects OpenAI, Anthropic, or Gemini from env
OPENAI_API_KEY=sk-... abslang run session.abs.yaml --agent $URL
ANTHROPIC_API_KEY=sk-ant-... abslang run session.abs.yaml --agent $URL

Point the same judge at any OpenAI-compatible endpoint — CLI flags override the ABS_JUDGE_BASE_URL, ABS_JUDGE_API_KEY, ABS_JUDGE_API_KEY_HEADER, and ABS_JUDGE_MODEL environment variables:

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

Models that reject max_tokens (gpt-5/o-series) use max_completion_tokens; o-series models also reject temperature:

abslang run session.abs.yaml --agent $URL \
  --judge-base-url "https://api.openai.com/v1" --judge-api-key "$OPENAI_API_KEY" \
  --judge-model gpt-5 --judge-max-tokens-param max_completion_tokens \
  --judge-max-tokens 1024 --judge-omit-temperature --judge-param reasoning_effort=low

Azure AI Foundry (quality dimensions + agentic evaluators):

pip install "abslang[azure]"
export AZURE_OPENAI_ENDPOINT=... AZURE_OPENAI_KEY=... AZURE_OPENAI_DEPLOYMENT=...
abslang run session.abs.yaml --agent $URL --adapter azure

AWS Bedrock (LLM-as-judge):

pip install "abslang[aws]"
export AWS_REGION=us-east-1
abslang run session.abs.yaml --agent $URL --adapter aws

Google Vertex AI (quality + safety):

pip install "abslang[google]"
export GOOGLE_CLOUD_PROJECT=... GOOGLE_CLOUD_LOCATION=us-central1
abslang run session.abs.yaml --agent $URL --adapter google

AI Evaluator (free tier):

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. Other providers can ship adapters implementing the same interface. Your session file doesn't change — only the --adapter flag.

Test with the mock agent

# Terminal 1: start mock agent
python tools/mock_agent.py --scenario happy

# Terminal 2: run the example
abslang run examples/order-status.yaml --agent http://localhost:8080/chat

Library usage

from abslang import parse, run
from abslang.runner import AgentConfig
import asyncio

session = parse('session.abs.yaml')
result = asyncio.run(run(session, AgentConfig(
    url='http://localhost:8080/chat',
    format='openai',
)))
print(result.passed)  # True | False

License

Apache 2.0

Metadata

Release files for abslang 0.6.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for abslang 0.6.3
File Size Uploaded Provenance Actions
abslang-0.6.3.tar.gz 107.2 kB With provenance Details for abslang-0.6.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for abslang 0.6.3
File Interpreter ABI Platform Actions
abslang-0.6.3-py3-none-any.whl Python 3 none any Details for abslang-0.6.3-py3-none-any.whl

Total release size: 199.3 kB

Release files / abslang-0.6.3.tar.gz

Download URL abslang-0.6.3.tar.gz
Size 107.2 kB
Tags Source
SHA-256 checksum
How to use checksums
17c143d964eeab0282af89ac02eda7523d39590edc7ad0e52b37730ffb0c366e
BLAKE2b-256 checksum
How to use checksums
984eb0d873758d1c1e4f153c7d9cbc1acd8654419295872b035c85baebf95946
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / abslang-0.6.3-py3-none-any.whl

Download URL abslang-0.6.3-py3-none-any.whl
Size 92.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c94a6418616d35c9d4d2331233b742017fa34ef87687b11aceb934d94f98cba3
BLAKE2b-256 checksum
How to use checksums
c188f868db0aa212b7f05bdcb5d143a572155379da1c77f10a67c651edb3295e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for abslang 0.6.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for abslang-0.6.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page