Skip to main content

Agent Behavior Specification (ABS)

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).

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), claude, or gemini
--agent-auth none, api_key, bearer, or oauth2
--agent-token Auth token or API key
--adapter llm_judge=<name> Route LLM evaluations through an adapter (aievaluator, local, azure) — see below
--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

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 only):

# 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

AI Evaluator (currently the only adapter available for dimension types):

abslang run session.abs.yaml --agent $URL --adapter llm_judge=aievaluator

Private LLM (Ollama, vLLM, any OpenAI-compatible endpoint):

abslang run session.abs.yaml --agent $URL \
  --adapter llm_judge=local \
  --adapter-url http://localhost:11434/v1

Other providers (Azure, Vertex AI, LangSmith, Galileo) 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

Links

License

Apache 2.0

Release files for abslang 0.2.2

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.2.2
File Size Uploaded
abslang-0.2.2.tar.gz 37.5 kB Details

Built distribution (wheel)

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

Total release size: 78.0 kB

Release files / abslang-0.2.2.tar.gz

Download URL abslang-0.2.2.tar.gz
Size 37.5 kB
Tags Source
SHA-256 checksum
How to use checksums
385fc5ce8c85f1a1f5418822fc3460157ebd8503ee26b52dbfbe7c207d148953
BLAKE2b-256 checksum
How to use checksums
deccd378b82ac5263da1253b3ce7146173a7627e81e07ab278528ded8925cb6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 11, 2026.

Transparency log

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

Download URL abslang-0.2.2-py3-none-any.whl
Size 40.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d30a701f6ba601dfffc35ac79c6acf182fc0b9fec9eb5a86a6ee07642fb0c77f
BLAKE2b-256 checksum
How to use checksums
1b6d011fa3a22c7ed6ada3f161451bb61c637a7a280b9d1ebea6b931b75b859f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 11, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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