SYSTEMS · AGENT INFRA

Relay

A vendor-neutral orchestrator that hands off in-flight work between AI coding agents using signed continuation contracts.

↓ SCROLL

The problem

AI coding agents hit walls. They exhaust quotas, need a model switch, or run out of context mid-task, and when they do the plan, the intent, and the half-written code vanish. The real bottleneck is no longer any single model but the handoff between them. Picking up where a dead session left off means reconstructing all of that by hand, on a fresh agent that knows nothing about what came before.

The approach

Relay serializes a live session into a continuation contract: a signed, portable document that captures intent, plans, and in-flight code. A daemon drives the workflow through a finite state machine, manages an adapter per provider, watches quota burn across every connected account, and forecasts when an agent will run out. Before the wall arrives it routes the contract to a fresh agent or provider, so work resumes instead of restarting. Decisions and constraints persist in a knowledge graph so context survives the switch.

System design

Language / runtimeGo 1.24 and Rust (stable)
Core componentsHTTP daemon (port 4748), desktop UI, CLI, MCP server mode
OrchestrationFSM-driven daemon with an adapter per provider
Data storeSQLite-backed knowledge graph
ProvidersClaude, Codex, Ollama, GitHub Copilot
SecurityHMAC-signed contracts, automatic secret scrubbing
LicenseApache-2.0

How it works

01

Detect

Relay scans running AI coding sessions across Claude Code, Codex, Copilot, Cursor, Cline, Continue, and Antigravity, and lifts their work.

02

Serialize

The session's intent, plan, and in-flight code are written into an HMAC-signed continuation contract, with AWS, OpenAI, Anthropic, GitHub, and JWT secrets scrubbed automatically.

03

Track quota

The daemon reports remaining capacity, reset times, and burn-rate ETAs for every account in one dashboard.

04

Predict and hand off

When it forecasts that an agent is about to exhaust its quota, it triggers a handoff before the task is interrupted.

05

Resume

A fresh agent or provider adopts the contract and continues, with decisions and constraints preserved in the knowledge graph.

What it does

Detection and adoption

Finds live agent sessions from seven coding tools and takes over their work through signed contracts.

Multi-provider routing

Sends tasks to Claude, Codex, Ollama, or GitHub Copilot based on which account still has quota.

Quota management

Unifies remaining capacity, reset times, and burn-rate forecasts across all accounts in one dashboard.

Predictive handoff

Forecasts exhaustion points and initiates the handoff before hitting a wall, preventing mid-task interruptions.

Knowledge persistence

SQLite-backed graph of decisions, constraints, and searchable code symbols across Go, Rust, TypeScript, Python, and Java.

Secret scrubbing

Strips AWS, OpenAI, Anthropic, GitHub, and JWT patterns from contracts before they leave the machine.

Stack

Go 1.24RustSQLiteMCPHMACFSMHTTP daemonCLI
2025Year
Go 1.24 · RustStack
SoloRole
Apache-2.0License