A multi-provider LLM orchestrator using a analyse-delegate-judge strategy.
Project description
adj-ai
adj-ai is a multi-provider LLM orchestrator. It generates several candidate
responses to a task from one or more model providers (Anthropic, OpenAI,
DeepSeek), then uses a "judge" model to adjudicate the candidates and return the
best one.
The core idea is analyse-delegate-judge: by producing multiple candidates and scoring them against a judging rubric, you get higher-quality outputs than a single one-shot completion.
Status: Early development. The Anthropic, OpenAI, and DeepSeek generation/judging paths are all implemented.
How it works
- Model selection – A lightweight model (e.g. Anthropic Haiku) inspects the task prompt and picks the most appropriate generation model, balancing cost and performance.
- Candidate generation – The chosen model produces
candidatesresponses to thetask_prompt. - Judging – A stronger model (e.g. Anthropic Sonnet) ranks the candidates
using the
judge_promptand returns them in order of preference. - Result – The top-ranked candidate is returned.
When multiple clients are configured, judging falls back in priority order: Anthropic → OpenAI → DeepSeek.
Installation
pip install adj-ai
This pulls in the official provider SDKs (anthropic, openai) automatically.
DeepSeek and OpenAI share the
openaiSDK (DeepSeek exposes an OpenAI-compatible API).
Usage
from anthropic import Anthropic
from openai import OpenAI
from adj_ai import Orchestrator
anthropic_client = Anthropic(api_key="...")
openai_client = OpenAI(api_key="...")
deepseek_client = OpenAI(api_key="...", base_url="https://api.deepseek.com")
orch = Orchestrator(
task_prompt="Write a concise product description for a smart water bottle.",
judge_prompt="Pick the description that is clearest and most persuasive.",
anthropic_client=anthropic_client,
openai_client=openai_client,
deepseek_client=deepseek_client,
candidate_number=5,
max_task_tokens=1000,
)
best = orch.run_task()
print(best)
At least one of anthropic_client, openai_client, or deepseek_client must be
provided, otherwise an OrchestratorError is raised.
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
task_prompt |
str |
— | The task to generate candidate responses for. |
judge_prompt |
str |
— | The rubric used to rank candidates. |
anthropic_client |
Anthropic |
— | Optional Anthropic client. |
openai_client |
OpenAI |
— | Optional OpenAI client. |
deepseek_client |
OpenAI |
— | Optional DeepSeek (OpenAI-compatible) client. |
candidate_number |
int |
1 |
Number of candidate responses to generate. |
max_task_tokens |
int |
1000 |
Maximum tokens per generated candidate. |
TODO
- Package the project for distribution
License
Released under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file adj_ai-0.1.0.tar.gz.
File metadata
- Download URL: adj_ai-0.1.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21904b41563fc181521c4dd2557380e285dc6004b4090a46650f5b58d9a006d9
|
|
| MD5 |
6aeba4c62e9ab7164cbe7e9da432cbc3
|
|
| BLAKE2b-256 |
4c164a61ebb21995e201adf7e55c7f2c846cd79e6f21709d293008d82c2f047b
|
Provenance
The following attestation bundles were made for adj_ai-0.1.0.tar.gz:
Publisher:
release.yml on TEP-DEV-ACT/adj-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
adj_ai-0.1.0.tar.gz -
Subject digest:
21904b41563fc181521c4dd2557380e285dc6004b4090a46650f5b58d9a006d9 - Sigstore transparency entry: 1959784740
- Sigstore integration time:
-
Permalink:
TEP-DEV-ACT/adj-ai@ff367c7acd9c82a36e38a00c8cc256f5c7899035 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/TEP-DEV-ACT
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ff367c7acd9c82a36e38a00c8cc256f5c7899035 -
Trigger Event:
push
-
Statement type:
File details
Details for the file adj_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: adj_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a995856f0ebcd3a45ba2e0ec24412a626a4bb083b1e081a9e0269dd9a1e9b549
|
|
| MD5 |
fa0550addc02eaa04011fdcdc94cf0fb
|
|
| BLAKE2b-256 |
1aa6290c2e76957d05cc661385cdaf46e3bee8da6ce49f80b32962f18ff0d037
|
Provenance
The following attestation bundles were made for adj_ai-0.1.0-py3-none-any.whl:
Publisher:
release.yml on TEP-DEV-ACT/adj-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
adj_ai-0.1.0-py3-none-any.whl -
Subject digest:
a995856f0ebcd3a45ba2e0ec24412a626a4bb083b1e081a9e0269dd9a1e9b549 - Sigstore transparency entry: 1959784848
- Sigstore integration time:
-
Permalink:
TEP-DEV-ACT/adj-ai@ff367c7acd9c82a36e38a00c8cc256f5c7899035 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/TEP-DEV-ACT
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ff367c7acd9c82a36e38a00c8cc256f5c7899035 -
Trigger Event:
push
-
Statement type: