Skip to main content

TestBench AI Service

PyPI version Python versions License

An asynchronous REST API service that connects imbus TestBench to external LLM providers to support AI-driven Agents during test design and execution.

Features

  • Multiple Agents: test case set reviews, description generation, and defect explanations, each configurable independently
  • Pluggable LLM providers: ships with OpenAI, Azure OpenAI, and Anthropic support; implement a custom LLMClient to bring your own
  • Automatic provider routing: model names starting with gpt-* and o-series (o1, o3, o4-mini, …) are routed to OpenAI, claude-* to Anthropic — regardless of the global provider setting
  • Configurable prompts: YAML-based templates with Jinja2 variables and per-project overrides
  • Per-project configuration: language, LLM provider, prompt variant, and enabled agents can be overridden per TestBench project
  • Localization: built-in English and German translations for AI-generated output
  • JWT authentication: every request is validated against the TestBench REST API using a JWT token; no separate credential management
  • Async processing: Agents run as background tasks so the API responds immediately
  • Swagger UI: interactive API docs at /docs
  • SSL/TLS & reverse proxy support: optional HTTPS with mTLS and trusted-proxy headers

Installation

With pip (Python 3.10–3.14 required):

pip install testbench-ai-service

Standalone executable (no Python required): download the pre-built binary from the GitHub releases page.

Quick Start

1. Set your LLM API key

Create a .env file in the installation directory with the key for your chosen provider:

# .env
# OpenAI
OPENAI_API_KEY=your_openai_api_key

# Azure OpenAI
# AZURE_OPENAI_API_KEY=your_azure_openai_api_key

# Anthropic
# ANTHROPIC_API_KEY=your_anthropic_api_key

2. Initialize configuration

testbench-ai-service init

Open config.toml and point tb_server_url at your TestBench REST API:

[testbench-ai-service]
tb_server_url = "https://localhost:9443/api/"

[testbench-ai-service.llm_config]
# openai (default), azure_openai, anthropic, or custom
provider = "openai"

3. Start the service

testbench-ai-service start

The service runs at http://127.0.0.1:8010 by default. Open /docs for the interactive Swagger UI.

Documentation

Full documentation is available in the docs/ folder of the repository:

Contributing

Contributions are welcome. See CONTRIBUTING.md for setup instructions and guidelines.

Changelog

See CHANGELOG.md for release history.

License

Apache 2.0. See LICENSE for details.

Metadata

Release files for testbench-ai-service 1.3.0

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

Source distribution (sdist)

Source distribution for testbench-ai-service 1.3.0
File Size Uploaded Provenance Actions
testbench_ai_service-1.3.0.tar.gz 246.7 kB Without provenance Details for testbench_ai_service-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for testbench-ai-service 1.3.0
File Interpreter ABI Platform Actions
testbench_ai_service-1.3.0-py3-none-any.whl Python 3 none any Details for testbench_ai_service-1.3.0-py3-none-any.whl

Total release size: 374.6 kB

Release files / testbench_ai_service-1.3.0.tar.gz

Download URL testbench_ai_service-1.3.0.tar.gz
Size 246.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c3adf5f9f133071dddff605cb887a1202e8d6403746416161213f8924e11a834
BLAKE2b-256 checksum
How to use checksums
fcaa376888cd3586db2943973caacc39cc62c6a26989868f94962389490a6278
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.34.2

Release files / testbench_ai_service-1.3.0-py3-none-any.whl

Download URL testbench_ai_service-1.3.0-py3-none-any.whl
Size 127.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
34a01cca3cb01889cfe39d0d0024e5afcf0b7a0e169e754961816d254dccfafd
BLAKE2b-256 checksum
How to use checksums
aa3d0aa5d20af914b59e8bd7e5a8017ac9d5d644cdb3b04475044c9105df29cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.34.2

Security for testbench-ai-service 1.3.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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