# GraphCode

> A macOS app that connects live coding-agent sessions as loops on a canvas so they run unattended while staying steerable.

GraphCode is a macOS app maintained by scgopi that lets users run multiple CLI coding-agent sessions as connected nodes on a graph canvas. Each node is a live terminal session running Claude Code, GitHub Copilot CLI, Codex, OpenCode, or pi, and edges hand off work, send messages, or spawn child loops between them. The latest release listed is v0.1.81.

## What It Is

GraphCode is an orchestration layer for coding agents rather than an agent itself. A loop is an agent session that runs repeatedly; users draw graphs of loops, each with its own prompt and chosen backend, and can attach to any running session mid-run to steer it. It bundles none of the agent CLIs, so at least one must be on the user's PATH.

## Loop Types and Edges

The docs describe four loop types, distinguished by what the user hands off: turn-based (the check), goal-based (the stop condition, optionally a shell command that must exit 0), time-based (the trigger, via a /loop cadence in the prompt), and composite (the prompt, run as a sub-graph). Edges can be hand-off, message, or spawn, with conditions such as always, on success, or on failure, plus a cycle guard. Messages to a sleeping loop are staged rather than lost.

## Architecture and Persistence

The SwiftUI app and a `graphcode` CLI both talk to a launchd-managed daemon, `graphcoded`, over a local socket. Each loop's terminal is a zmx session, so it survives quitting the app or rebooting, and relaunching resumes the backend conversation. Terminals render with GhosttyKit. State is stored as plain JSON in `~/.graphcode/`, and nothing is written inside opened project folders.

## Workspaces and Self-Improving Loops

Workspaces are separate GraphCode instances, each with its own projects, loops, and daemon in its own window. Loops can also run maker/reviewer cycles bounded by a guard on pass count, with a metric command run by the orchestrator and a per-loop diary read on relaunch. Projects can be local folders, clones, or remote repositories over SSH.

## Setup Path

Install via Homebrew cask or a signed and notarized .dmg on macOS 15+ with Apple Silicon. The app and daemon are under FSL-1.1-MIT, converting to MIT two years after each release, while GraphcodeKit and the CLI are MIT.

## Features
- Graph canvas of live coding-agent loops
- Turn-based, goal-based, time-based, and composite loop types
- Hand-off, message, and spawn edges with conditions and cycle guards
- Loop-to-loop messaging across graphs and repos
- Sessions persist across app quit and reboot via zmx
- Per-loop terminal workspace with tabs and splits
- Self-improving loops with guard, metric measurement, and diary
- Separate workspaces with own daemon and projects
- Local, cloned, and remote SSH projects
- CLI sharing the daemon socket
- Per-loop backend choice across five agent CLIs

## Integrations
Claude Code, GitHub Copilot CLI, Codex, OpenCode, pi, Ghostty, zmx, Homebrew, GitHub

## Platforms
WINDOWS, MACOS, API, CLI

## Pricing
Free

## Version
v0.1.81

## Links
- Website: https://graphcode.app
- Documentation: https://graphcode.app/shortcuts.html
- Repository: https://github.com/scgopi/GraphCode
- EveryDev.ai: https://www.everydev.ai/tools/graphcode
