Skip to content
noodl-labsPublic

About

CI/CD quality gates for LLM serving and agents. JSON schema checks, latency regression compare — runs in GitHub Actions, not in prod.

Resources

Stars

6 stars

Watchers

0 watching

Forks

Repository files navigation

Connor

CI for AI Agents — and, today, CI smoke tests for LLM HTTP endpoints.

Before you merge: does your gateway still respond? Is the JSON still valid? Does your schema still match?
Next: did the agent call refund twice, blow the latency budget, or explode tool volume vs main?

connor run suite.yaml   # exit 0 = safe to merge · exit 1 = block the PR

Your agent stays Python (or any stack). HTTP smoke tests need an OpenAI-compatible endpoint (/v1/chat/completions). Agent tracing is opt-in: Python trace() / @tool writes run.json; connor inspect explains it.

Not a production observability platform (Langfuse, LangSmith). Not an agent framework. Connor runs in CI — like unit tests for your LLM / agent layer.


The problem

Most teams ship LLM features without automated gates in CI:

  • Gateway returns HTTP 200 but invalid JSON
  • Agent output drifts after a prompt or model change
  • Latency degrades silently (p95 doubles) while functional tests still pass

Connor answers: block the merge before users see it.


What Connor does

Capability Command CI question
Smoke gate connor run suite.yaml Does every case pass right now?
Run artifact connor run suite.yaml --out run.json What were latencies and pass rate?
Regression connor compare baseline.json candidate.json Did p95 get worse vs baseline?
Inspect connor inspect run.json What did the agent actually do? (display only)

Gates today: HTTP 2xx · JSON syntax · JSON Schema · text contains · p95 regression (compare).


Getting started

Requirements

  • An OpenAI-compatible API (CONNOR_BASE_URL must include /v1)
  • API key (required for OpenRouter/OpenAI; optional for some local vLLM setups)

1. Install

Option A — Release binary (fastest)

Download for your platform from Releases (v0.1.0):

# macOS Apple Silicon example
curl -L -o connor https://github.com/noodl-labs/Connor/releases/download/v0.1.0/connor-darwin-arm64
chmod +x connor
sudo mv connor /usr/local/bin/   # or keep in ./connor

Option B — From source

git clone https://github.com/noodl-labs/Connor.git
cd Connor
make install    # needs Go 1.22+

Option C — go install

go install github.com/noodl-labs/ConnorLLM/services/runtime/cmd/connor@latest

2. Configure

export CONNOR_BASE_URL=https://openrouter.ai/api/v1   # or your gateway / vLLM
export CONNOR_API_KEY=sk-your-key

Or copy .env.example and source it.

Self-hosted (vLLM / LiteLLM):

export CONNOR_BASE_URL=http://localhost:8000/v1
# CONNOR_API_KEY optional

3. First run (recommended)

Start with the agent JSON Schema suite — stable and CI-friendly:

connor run benchmarks/examples/agent-json-smoke.yaml
echo $?   # 0 = pass · 1 = fail

Add -v to see response bodies on passed cases.

Expected output:

Connor  v0.1.0
Target  https://openrouter.ai/api/v1
Suite   agent-json-smoke (2 cases)

✓  flight-gpt4o-mini  openai/gpt-4o-mini           …  HTTP 200   schema ✓
✓  flight-gemini      google/gemini-2.5-flash-lite …  HTTP 200   schema ✓
────────────────────────────────────
2/2 passed · …
GATE PASSED — safe to merge
exit 0

4. Single-case mode (no YAML file)

connor run \
  --model openai/gpt-4o-mini \
  --prompt 'Return only valid JSON: {"status":"ok"}' \
  --expect-json

5. Regression compare (optional)

Save two runs of the same suite, then compare latency and pass rate:

mkdir -p runs
connor run benchmarks/examples/agent-json-smoke.yaml --out runs/baseline.json
connor run benchmarks/examples/agent-json-smoke.yaml --out runs/candidate.json

connor compare runs/baseline.json runs/candidate.json \
  --max-p95-regression 20 \
  --min-pass-rate 95
# PASS or FAIL  p95 +N%
# PASS or FAIL  pass rate N%
  • exit 0: compare passed
  • exit 1: a gate failed (p95 and/or pass rate)
  • exit 2: invalid or incomparable run files

On p95 failure, Connor shows the driver case, model, and latency delta. Baseline = your last known-good run (e.g. from main). Candidate = current PR run.

Full CI guide: docs/handbook/ci-regression.md.


GitHub Actions

name: LLM gate

on: [pull_request]

jobs:
  connor-smoke:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Connor
        run: |
          curl -L -o connor https://github.com/noodl-labs/Connor/releases/download/v0.1.0/connor-linux-amd64
          chmod +x connor
          sudo mv connor /usr/local/bin/

      - name: LLM smoke gate
        env:
          CONNOR_BASE_URL: ${{ secrets.CONNOR_BASE_URL }}
          CONNOR_API_KEY: ${{ secrets.CONNOR_API_KEY }}
        run: connor run benchmarks/examples/agent-json-smoke.yaml

For baseline → candidate → --max-p95-regression / --min-pass-rate, see the CI regression handbook.


Write your own suite

Create connor/ci/smoke.yaml in your repo:

suite: my-agent-smoke

defaults:
  timeout_ms: 30000
  retries: 2

cases:
  - id: intent-router
    model: gpt-4o-mini              # slug as exposed by YOUR gateway
    prompt: |
      Return only raw JSON, no markdown.
      User: "book a flight to Paris"
      Schema: {"intent":"string","confidence":"number"}
    expect_json_schema:
      type: object
      required: [intent, confidence]
      properties:
        intent: { type: string }
        confidence: { type: number }
export CONNOR_BASE_URL=https://your-staging-gateway/v1
connor run connor/ci/smoke.yaml

Point CONNOR_BASE_URL at staging, not prod. Use the same prompts and schemas your agent uses in production.


Example suites

File Purpose Use in CI?
agent-json-smoke.yaml JSON Schema gate (2 models) Yes — start here
agent-intent-gate.yaml Intent router + health ping Template for real workflows
serving-smoke.yaml Multi-model serving smoke Post-deploy / exploration
glm-qwen-smoke.yaml 4-model schema smoke Multi-provider demo
agent-json.yaml 1 pass + 2 intentional fails Local demo only
regression-demo/ Offline compare — p95 + pass rate FAIL Local demo / docs

Exit codes

Command 0 1 2
connor run All cases passed Any case failed —
connor compare All enabled gates passed Gate failed (p95 and/or pass rate) Invalid / incomparable run.json

Fail reasons (stable): call_failed · invalid_json · schema_mismatch · content_mismatch


FAQ

Connor vs Langfuse / LangSmith?
They observe production traffic. Connor runs before merge in CI with deterministic gates and exit 0/1.

Connor vs Promptfoo?
Promptfoo excels at eval and prompt comparison. Connor focuses on CI gates: block merges when HTTP/JSON/schema/latency regresses.

Do I need to change my agent code?
Not for HTTP smoke tests. Connor calls the same endpoint your app uses. The planned tracing SDK is opt-in instrumentation (@tool), not a rewrite of your agent.

Can I compare different models (GPT-4 vs GPT-5)?
No. Compare requires the same suite, case IDs, and models per case (baseline vs candidate = same config, different point in time).


Architecture

Connor is organized into six engines (execution, evaluation, benchmark, quality gates, observability, DX).
Details: docs/architecture.md · Roadmap · Agent CI RFC · Changelog


Status

Current release: v0.1.0

  • connor run — YAML suites, JSON / schema / contains gates
  • connor run --out run.json — run artifact
  • connor compare — p95 + pass-rate gates, themed output
  • connor inspect — trajectory tree from run.json (unreleased; RFC 0003 P2)

Docs: Vision · Traceability · CI handbook

Next:

  • v0.2.0 — HTTP tool names + cost — RFC 0002
  • v0.3.0 — Agent tracing / inspect / trajectory gates — RFC 0003 (Draft; P1 trace + P2 inspect in progress)

License

License TBD.

About

CI/CD quality gates for LLM serving and agents. JSON schema checks, latency regression compare — runs in GitHub Actions, not in prod.

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages