CLI for running and managing Connexity agent evaluations
Project description
connexity-cli
Command-line client for Connexity — drive eval runs, manage agents and test cases, and gate CI on regressions, all from the terminal.
connexity-cli is a thin wrapper over the Connexity REST API. It covers every backend route — auth, agents, eval configs, test cases, runs (with SSE streaming), custom metrics, prompt editor, integrations, environments, calls, config, and health — so you can fully automate eval workflows without touching the web UI.
Installation
pip install connexity-cli
The wheel pulls in only click, httpx, and httpx-sse — no FastAPI, no SQLModel, no LLM SDKs.
Authentication
The CLI authenticates against a Connexity API server using a Bearer JWT.
| Source | When used |
|---|---|
--token / --api-url flags |
Highest precedence — explicit per-invocation |
CONNEXITY_CLI_API_TOKEN / CONNEXITY_CLI_API_URL env vars |
Typical CI usage |
~/.config/connexity-cli/credentials.json (mode 0600) |
Written by connexity-cli login --save |
# One-time interactive login (writes credentials file)
connexity-cli login --email me@example.com --save
# Or set env vars in CI
export CONNEXITY_CLI_API_URL=https://evals.example.com
export CONNEXITY_CLI_API_TOKEN="$CI_EVALS_TOKEN"
Quick start
# Inspect resources
connexity-cli agents list
connexity-cli eval-configs list
connexity-cli test-cases list --tag smoke
# Author resources from JSON files (use "-" to read stdin)
connexity-cli agents create --from-file ./agent.json
connexity-cli eval-configs members replace <eval-config-id> --from-file ./members.json
# End-to-end: trigger a run, wait for completion, mark as baseline
connexity-cli run \
--agent my-agent \
--eval-config smoke-suite \
--stream \
--set-baseline
# CI gate: regression check (exits 1 on regression, 0 on pass)
connexity-cli compare --candidate <run-id> --against-baseline
# Stream agent execution events live
connexity-cli runs stream <run-id>
# AI-assisted prompt editing — SSE events go to stderr, final assistant
# message + edited_prompt to stdout (drops to non-streaming when piping)
connexity-cli prompt-editor chat <session-id> --message "tighten the refusal prose"
# JSON output for piping into jq
connexity-cli --output json agents list | jq '.data[].name'
Authoring patterns
Every command that creates or updates a resource takes a single --from-file PATH (or --from-file - for stdin) with a JSON body that matches the backend Pydantic schema (e.g. AgentCreate, RunCreate, EvalConfigCreate, CustomMetricCreate). The CLI does no schema duplication — the server validates and returns clear errors.
# Create an agent from a file
echo '{"name": "support-bot", "endpoint_url": "https://my-agent.example/api"}' \
| connexity-cli agents create --from-file -
# Patch an eval config
connexity-cli eval-configs update smoke-suite --from-file ./patch.json
# Run with a full RunConfig (judge_config, simulator_config, metrics_selection, ...)
connexity-cli runs create --from-file ./run.json --auto-execute
Output formats
Two formats are supported, switchable per-command via --output or globally via --output on the root group:
table(default) — human-readable tables with auto-detected column widthsjson— pretty-printed JSON, friendly tojq/gron/ scripting
Command tree
Each top-level group mirrors a backend router:
| Group | Purpose |
|---|---|
login / logout / whoami |
Auth & session |
agents |
CRUD, draft/publish/rollback, versions, version diff, guidelines |
eval-configs |
CRUD, member (test-case) management |
test-cases |
CRUD, bulk import/export, generate, AI editor |
test-case-results |
Per-test-case run result CRUD |
runs |
CRUD, execute, cancel, stream (SSE), baselines, compare, suggestions |
custom-metrics |
CRUD plus LLM-backed metric preview generation |
prompt-editor |
Sessions, messages, presets, streaming chat |
integrations |
Third-party providers (Retell), connection test, list provider-side agents |
environments |
Agent deployment-target bindings |
calls |
Observed external calls (Retell), refresh / mark-seen |
config |
Read-only API metadata, available metrics, LLM models |
health |
Server health probe |
run / compare / baseline |
Top-level convenience wrappers for common one-shot CI workflows |
Run connexity-cli <group> --help (or connexity-cli <group> <subcommand> --help) to see flags and arguments.
Exit codes
0— success1— operation completed but indicates failure (run failed/cancelled, regression detected,importreturned errors)2— argument / configuration error, timeout
License
MIT — see 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 connexity_cli-0.1.1.tar.gz.
File metadata
- Download URL: connexity_cli-0.1.1.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edc2daae434b57fad565cfac1d8d3bac4d1f895ef27aa54270f69f2f8d608080
|
|
| MD5 |
8798487793a071725a367863022ff1fb
|
|
| BLAKE2b-256 |
086b12477a06148f8a3d1645ee07fb51557126c65e91d344869fb46e017b9724
|
Provenance
The following attestation bundles were made for connexity_cli-0.1.1.tar.gz:
Publisher:
publish-pypi.yml on Connexity-AI/connexity
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
connexity_cli-0.1.1.tar.gz -
Subject digest:
edc2daae434b57fad565cfac1d8d3bac4d1f895ef27aa54270f69f2f8d608080 - Sigstore transparency entry: 1449123355
- Sigstore integration time:
-
Permalink:
Connexity-AI/connexity@1e10dc0577c0a311fe29a0f188a72c46eef846ca -
Branch / Tag:
refs/tags/cli-v0.1.1 - Owner: https://github.com/Connexity-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@1e10dc0577c0a311fe29a0f188a72c46eef846ca -
Trigger Event:
push
-
Statement type:
File details
Details for the file connexity_cli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: connexity_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 48.4 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 |
cf587a78659ca274b4dae63de80432e97cf224cee77129ce6ea455912fd9ad30
|
|
| MD5 |
dfa70d12fe9fd377c1a6572a51f6710c
|
|
| BLAKE2b-256 |
bcdf689cfa55aa4e2fc898d1363823168174c69627ea38cd2e660a45c7618831
|
Provenance
The following attestation bundles were made for connexity_cli-0.1.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on Connexity-AI/connexity
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
connexity_cli-0.1.1-py3-none-any.whl -
Subject digest:
cf587a78659ca274b4dae63de80432e97cf224cee77129ce6ea455912fd9ad30 - Sigstore transparency entry: 1449123486
- Sigstore integration time:
-
Permalink:
Connexity-AI/connexity@1e10dc0577c0a311fe29a0f188a72c46eef846ca -
Branch / Tag:
refs/tags/cli-v0.1.1 - Owner: https://github.com/Connexity-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@1e10dc0577c0a311fe29a0f188a72c46eef846ca -
Trigger Event:
push
-
Statement type: