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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

testbench_ai_service-1.0.1.tar.gz (217.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

testbench_ai_service-1.0.1-py3-none-any.whl (116.9 kB view details)

Uploaded Python 3

File details

Details for the file testbench_ai_service-1.0.1.tar.gz.

File metadata

  • Download URL: testbench_ai_service-1.0.1.tar.gz
  • Upload date:
  • Size: 217.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.34.2

File hashes

Hashes for testbench_ai_service-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1d5de9f1a1d6ca22fedfc9872b493b8b83b0754ce95e79e6d777f5fde583bdc4
MD5 8c3dfb147ef7b4bcec3f66ac40ed729a
BLAKE2b-256 72c29fbaf6a404dcbb5c23e15dc51c1892b1c93e896e222d0edeae2f30ee0ba0

See more details on using hashes here.

File details

Details for the file testbench_ai_service-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for testbench_ai_service-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d0d2eec21835c3e8c74ba19e6bca7ff2c894ce977fb6d213e7901408ba3d367f
MD5 1069819b3167a59ea4b8ee1091bb73c9
BLAKE2b-256 54a7a5ca4041709c3c3bd0633eb104d3ff07c1aa5695955a73ee507c717e6b0d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page