Skip to main content

Open-source autonomous AI agent: label an issue, get a tested pull request. Runs in your CI (GitHub Actions, GitLab CI, Bitbucket Pipelines, or Azure Pipelines).

Project description

Relay

Label an issue, get a tested pull request. Autonomously, in your own CI, on whatever VCS you already use.

License: MIT Status Built by ThinkNext

Status: Pre-alpha, building in public. No working code yet. The README below describes the intended developer experience. Star + watch this repo to follow the build, or read about the bigger picture on the ThinkNext site.


What is Relay?

Relay is the autonomous cousin of Cascade. Where Cascade has humans in the loop at every gate (story review, PR review), Relay runs hands-off from a label on an issue to a tested PR waiting for review.

Drop a single workflow file in your repo. Label any issue with relay. The agent:

  1. Reads the issue and understands what is being asked
  2. Plans the code changes
  3. Implements them on a new branch
  4. Writes and runs tests
  5. Opens a PR for human review

All running in your CI, using your LLM API key, with code that never leaves your org.

Why Relay sits next to Cascade, not on top of it

Different problem, same author. The two are complementary:

Cascade Relay
Entry point Meeting recording, tracker ticket, or one-line prompt Labeled issue
Where it runs Your laptop or CI on demand Your CI, triggered by the label
Human gates Story review BEFORE code, PR review BEFORE merge PR review BEFORE merge
Best for Translating fuzzy requirements into code with deliberation Backlog clearing, well-scoped tickets, autonomy
Status Alpha, live on PyPI Pre-alpha, building in public

Pick Cascade when you want to think about the work before code gets written. Pick Relay when the work is well-defined and you want it ticked off without context-switching.

Supported (planned)

Cascade's multi-provider stance, applied to autonomous CI workflows. v0.1 ships GitHub Actions; the rest land in v0.2 and v0.3.

CI runtime Triggered by Opens v0.1 v0.2 v0.3
GitHub Actions relay label on a GitHub issue GitHub PR
GitLab CI relay label on a GitLab issue GitLab MR
Bitbucket Pipelines relay label on a Bitbucket issue Bitbucket PR
Azure Pipelines relay tag on an Azure Boards work item Azure DevOps PR

LLM providers will mirror Cascade's matrix: Anthropic, OpenAI, Google Gemini, Claude Code, Ollama. Provider choice is one config line.

Languages will mirror Cascade's eight built-in profiles: Python, TypeScript, JavaScript, Go, Rust, Java, Ruby, C#. Adding a ninth is one registry entry, same pattern as Cascade.

Intended developer experience

⚠️ Pre-alpha. The commands below show what the v0.1 install will look like. None of this is functional yet.

GitHub (v0.1)

Add a single workflow file to your repo:

# .github/workflows/relay.yml
name: Relay
on:
  issues:
    types: [labeled]

jobs:
  relay:
    if: github.event.label.name == 'relay'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: thinknext/relay@v0
        with:
          anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}

Add a config file (optional; sensible defaults provided):

# relay.yaml
version: 1

agent:
  provider: anthropic       # anthropic | openai | google | claude_code | ollama
  model: claude-opus-4-7
  max_iterations: 1

allowed_paths:
  - src/**
  - tests/**
  - docs/**

disallowed_paths:
  - .github/**
  - migrations/**

test_command: pytest

That is it. Label any issue with relay and watch it work.

GitLab (v0.2)

# .gitlab-ci.yml
relay:
  rules:
    - if: '$CI_PIPELINE_SOURCE == "trigger" && $RELAY_ISSUE_IID'
  script:
    - pip install relay-agent
    - relay run --issue $RELAY_ISSUE_IID

With a webhook on the GitLab project that fires when an issue gets the relay label.

Bitbucket Pipelines (v0.2)

# bitbucket-pipelines.yml
custom:
  relay:
    - step:
        script:
          - pip install relay-agent
          - relay run --issue $RELAY_ISSUE_ID

With a Bitbucket webhook triggering the custom pipeline on the relay label.

Azure Pipelines (v0.3)

# azure-pipelines.yml
trigger: none
pr: none

pool:
  vmImage: 'ubuntu-latest'

steps:
- script: pip install relay-agent
- script: relay run --work-item $(Build.SourceBranch)
  env:
    ANTHROPIC_API_KEY: $(ANTHROPIC_API_KEY)

Triggered by a service hook from Azure Boards when a work item is tagged relay.

How it works (every backend)

                  YOUR ISSUE TRACKER                     YOUR CI                    YOUR VCS
                  ==================                     =======                    ========

  Label "relay" added  ───►  webhook fires  ───►  Relay agent runs:        ───►   PR / MR opened
  (GitHub Issues /                                 plan → code → test →             on a new branch
   GitLab Issues /                                 self-review                       awaiting human
   Bitbucket Issues /                                                                review
   Azure Boards)
                                                  (Python, runs in YOUR
                                                   GitHub Actions /
                                                   GitLab CI /
                                                   Bitbucket Pipelines /
                                                   Azure Pipelines runner)

Five sub-agents, sequential, focused

Agent Job Output
Planner Read issue + repo, decide what files to touch and how File list + plan summary
Coder Implement the plan Diffs
Tester Add tests, run full suite Pass/fail + new test files
Reviewer Self-critique the diff Issue list or "looks good"
PR Opener Compose PR title/body, push branch, open PR or MR PR/MR URL

Each is a focused LLM call with a focused prompt. We deliberately don't use heavy agent frameworks in v0.1, so the code stays small and hackable.

Security model

Security is the differentiator, so it is also the bar to clear. Relay's design boundaries:

  • ✅ Only triggered by a label you control on issues your team already owns
  • ✅ Code generation happens in YOUR CI runner. Not on a third-party SaaS, not on a ThinkNext server
  • ✅ Uses YOUR LLM API key. Multi-provider; pick whichever your team is authorized for
  • ✅ Source code never leaves your org's network, except to the LLM provider you explicitly configured
  • ✅ All file changes live on a new branch, never on default
  • Relay never merges. Every change requires human approval
  • ✅ Sandboxed to allowed paths in relay.yaml
  • ✅ Cannot modify CI/CD configs or .github/ / .gitlab-ci.yml / equivalent
  • ✅ Cannot modify its own config file (relay.yaml)
  • ✅ Only runs pytest (or the configured test command) and git commands. No arbitrary shell access

Want a deeper dive? See docs/security.md (lands with v0.1).

Comparison vs alternatives

Cursor Aider Devin Sweep Relay Cascade
Autonomous (issue → PR) partial (review gate)
Open source partial
Self-hosted (your infra)
Source never leaves your org
Multi-VCS (GitHub, GitLab, Bitbucket, Azure) partial GitHub only ✅ (planned)
Multi-LLM provider partial ✅ (planned)
Bring your own LLM key
Free for individuals partial partial

Roadmap

Version Status Highlights
v0.1 In progress, target 2026-07-19 GitHub Actions runtime, Anthropic + Claude Code providers, Python + TypeScript profiles, label-triggered, 1 iteration round
v0.2 Planned Q4 2026 GitLab CI + Bitbucket Pipelines runtimes, OpenAI + Google + Ollama providers, all 8 language profiles, cost monitoring, --max-cost budget caps
v0.3 Planned Q1 2027 Azure Pipelines runtime, multi-repo coordination, PR-comment iteration loop (Relay reads review comments and ships a follow-up commit), Slack/Teams notifications
v1.0 Planned mid-2027 Stable API, full provider/language parity with Cascade, hosted-runner option for teams without their own CI

Roadmap is directional. We will adjust based on real user feedback once people start trying v0.1.

FAQ

Q: How is this different from Cascade? A: Cascade is interactive. You feed it a meeting / ticket / prompt; you review the extracted stories; you review the resulting PR. Relay is autonomous: you label an issue, you review the PR. Same agent loop underneath; different human-in-the-loop posture. Pick whichever matches the work.

Q: Why not just use Devin? A: Devin is closed-source and SaaS-only. Many companies cannot send code to a third party. Relay solves that.

Q: Why not use Cursor with macros? A: Cursor is great for active development. Relay is for autonomous backlog clearing, a different use case. They are complementary, not competitive.

Q: How much will it cost to run? A: You pay your own LLM costs. Rough estimate on Claude Opus: a small bug fix costs $0.50-$2; a larger feature: $5-$15. Highly variable by task complexity. Configurable --max-cost will cap it.

Q: What if Relay produces bad code? A: It opens a PR for human review. You merge or reject. Relay never merges. Bad PRs can be closed with no harm done.

Q: Can I use this on a private repo? A: Yes, that is the primary use case. Relay runs in your own CI, so private repos work fine.

Q: Does it work with monorepos? A: v0.1 supports single-repo. Multi-repo / monorepo-aware features are v0.3.

Q: Will there be a hosted version? A: Not from us in the foreseeable future. We are committed to OSS + self-hosted. If you want hosted, fork it.

Q: When can I actually try this? A: v0.1 targets 2026-07-19. Star + watch this repo to be notified.

Contributing

We welcome contributions. See CONTRIBUTING.md for the full guide.

Quick version:

  • Issues and PRs welcome
  • Discuss in GitHub Discussions for non-trivial changes before opening PRs
  • Code style: Black + Ruff for Python
  • Tests required for new features

License

MIT. See LICENSE.

About

Relay is built and maintained by ThinkNext Software, an AI-augmented engineering and staffing firm. We use AI at every step of the SDLC and ship the tools we use ourselves. Relay is the autonomous-CI counterpart to our flagship Cascade.

If Relay (or Cascade) is helpful to your team, consider working with us on your next project.

Follow along: @ThinkNextHQ · LinkedIn · Blog

Project details


Download files

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

Source Distribution

relay_agent-0.1.0a1.tar.gz (32.2 kB view details)

Uploaded Source

Built Distribution

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

relay_agent-0.1.0a1-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

Details for the file relay_agent-0.1.0a1.tar.gz.

File metadata

  • Download URL: relay_agent-0.1.0a1.tar.gz
  • Upload date:
  • Size: 32.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for relay_agent-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 56479e7817fa645e0e2fe0586439f92a20f0a014df8f1f06fd272f1f3e1edaec
MD5 db6f60ddc14e61cf6c8c24f89f3b67e9
BLAKE2b-256 049e55c0d4353ae847c3f11c140cc0c5e1fd8013ef595a492798d03b2f0274ab

See more details on using hashes here.

File details

Details for the file relay_agent-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: relay_agent-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 26.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for relay_agent-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 cce42d52704da9730c185da37fa445fb3bd96144904450dccc442932ea615707
MD5 1ae1dddc1eb06944d4221059aad78bb2
BLAKE2b-256 f13d050df459e7b6169c8f815f697e142623f086c8bef8ce3c57cddceece4247

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