Relay
Relay is an open-source AI coding agent that runs in your terminal. It connects to LLMs through OpenRouter, reads and edits your code with a built-in tool set, runs shell commands, and streams everything through a full-screen TUI.
[!WARNING] Work in progress. The agent loop, tool calling, and terminal UI work end to end, but there is no approval flow yet. The interactive TUI auto-approves every tool, so Relay can change files and run commands without asking. Use it in a directory you don't mind it touching.
What it does
- Interactive TUI: full-screen terminal interface built on Textual, with streaming responses, live tool call output, and token usage tracking.
- Single-shot mode: pass a prompt as an argument for non-interactive runs, suitable for scripting.
- File tools:
read,write,edit,grep,glob, andlist_directoriesfor working with a codebase. - Shell access: the
shelltool executes commands in the working directory. - Task planning: a
plantool maintains a todo list across the agent loop. - Network tools: web search via DuckDuckGo and URL fetching.
- Persistent memory: key-value storage that survives across sessions.
- MCP support: connects to external MCP servers for additional tools and data sources.
- Sub-agents: specialized agents (
codebase_investigator,code_reviewer,software_architect,test_writer,debugger) that the main agent can delegate to. - OpenRouter backend: authenticate once with
relay login(browser OAuth) or paste an API key. Model, temperature, and context window are configurable in~/.config/relay/config.toml, with per-project overrides in.relay/config.toml.
Getting started
# 1. Install Relay
pip install relay-code
# 2. Log in (opens your browser to authorize with OpenRouter)
relay login
relay login --paste # or paste an API key directly
# 3. Run it
relay # interactive mode
relay "your prompt" # single-shot mode
relay --cwd /path # run against a different working directory
# Remove the saved API key
relay logout
Roadmap
Currently being worked on:
- Approval flow: prompting before file edits and shell commands instead of auto-approving every tool call.
- Context pruning and compaction: trimming and summarizing conversation history to stay within the context window on long sessions.
- Session management: saving, resuming, and switching between sessions.
License
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 relay_code-0.0.21.tar.gz.
File metadata
- Download URL: relay_code-0.0.21.tar.gz
- Upload date:
- Size: 64.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b949ea3a6c1b4b3313a2c212bcc87181dd6fef806915bdde6b7314847880761c
|
|
| MD5 |
b5f3c3bba2eae9d60c124b7aafd3b148
|
|
| BLAKE2b-256 |
81a900cf0408d1ed35de18adfc3058c692cbc7d1d7cfe2d27ab3414911affbdc
|
Provenance
The following attestation bundles were made for relay_code-0.0.21.tar.gz:
Publisher:
python-publish.yml on andrefetch/relay
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
relay_code-0.0.21.tar.gz -
Subject digest:
b949ea3a6c1b4b3313a2c212bcc87181dd6fef806915bdde6b7314847880761c - Sigstore transparency entry: 2215901350
- Sigstore integration time:
-
Permalink:
andrefetch/relay@7e754c61356d1db5484e1a897f8d5cb787cae68e -
Branch / Tag:
refs/tags/v0.0.21 - Owner: https://github.com/andrefetch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7e754c61356d1db5484e1a897f8d5cb787cae68e -
Trigger Event:
release
-
Statement type:
File details
Details for the file relay_code-0.0.21-py3-none-any.whl.
File metadata
- Download URL: relay_code-0.0.21-py3-none-any.whl
- Upload date:
- Size: 78.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e69a56070cfb278333edfa4b50bba87704259d8420df3645c8e1e74cac7e973b
|
|
| MD5 |
0a7a3f04f944aa20b95c8e7350a9cceb
|
|
| BLAKE2b-256 |
40ae83a1cc82774b9e8e0eff03c52c3b5c59fac807e2f8a193e2f816570ef4aa
|
Provenance
The following attestation bundles were made for relay_code-0.0.21-py3-none-any.whl:
Publisher:
python-publish.yml on andrefetch/relay
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
relay_code-0.0.21-py3-none-any.whl -
Subject digest:
e69a56070cfb278333edfa4b50bba87704259d8420df3645c8e1e74cac7e973b - Sigstore transparency entry: 2215901400
- Sigstore integration time:
-
Permalink:
andrefetch/relay@7e754c61356d1db5484e1a897f8d5cb787cae68e -
Branch / Tag:
refs/tags/v0.0.21 - Owner: https://github.com/andrefetch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7e754c61356d1db5484e1a897f8d5cb787cae68e -
Trigger Event:
release
-
Statement type: