{"id":49341780,"url":"https://github.com/timwuhaotian/the-pair","last_synced_at":"2026-04-27T04:06:10.516Z","repository":{"id":346638593,"uuid":"1188907600","full_name":"timwuhaotian/the-pair","owner":"timwuhaotian","description":"The Pair - Automated pair programming — grab a coffee while two AI agents cross-check each other's work","archived":false,"fork":false,"pushed_at":"2026-04-22T19:56:50.000Z","size":101751,"stargazers_count":327,"open_issues_count":2,"forks_count":22,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-22T21:27:27.173Z","etag":null,"topics":["agent","ai","ai-agents","claude-code","codex","codex-cli","coding","gemini","glm","gpt","kimi","minimax","opencode","pair-programming","qwen","vibe-coding"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timwuhaotian.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-22T18:38:00.000Z","updated_at":"2026-04-22T19:33:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/timwuhaotian/the-pair","commit_stats":null,"previous_names":["timwuhaotian/the-pair"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/timwuhaotian/the-pair","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timwuhaotian%2Fthe-pair","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timwuhaotian%2Fthe-pair/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timwuhaotian%2Fthe-pair/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timwuhaotian%2Fthe-pair/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timwuhaotian","download_url":"https://codeload.github.com/timwuhaotian/the-pair/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timwuhaotian%2Fthe-pair/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32321962,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","ai","ai-agents","claude-code","codex","codex-cli","coding","gemini","glm","gpt","kimi","minimax","opencode","pair-programming","qwen","vibe-coding"],"created_at":"2026-04-27T04:06:09.871Z","updated_at":"2026-04-27T04:06:10.509Z","avatar_url":"https://github.com/timwuhaotian.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- prettier-ignore --\u003e\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"./build/icon.png\" alt=\"The Pair\" width=\"128\" /\u003e\n\n# The Pair\n\n**Automated pair programming — grab a coffee while two AI agents cross-check each other's work, built by itself**\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![GitHub release](https://img.shields.io/github/v/release/timwuhaotian/the-pair?include_prereleases\u0026logo=github)](https://github.com/timwuhaotian/the-pair/releases)\n[![Build Status](https://github.com/timwuhaotian/the-pair/actions/workflows/build.yml/badge.svg)](https://github.com/timwuhaotian/the-pair/actions)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.9-3178c6.svg?logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org/)\n[![Tauri](https://img.shields.io/badge/Tauri-2.0-24c8db.svg?logo=tauri\u0026logoColor=white)](https://tauri.app/)\n[![React](https://img.shields.io/badge/React-19-61dafb.svg?logo=react\u0026logoColor=black)](https://react.dev/)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)\n[![Changelog](https://img.shields.io/badge/Changelog-CHANGELOG.md-informational)](CHANGELOG.md)\n\n🌐 **English** • [简体中文](README.zh.md) • [한국어](README.ko.md) • [日本語](README.ja.md)\n\n**macOS** • **Windows** • **Linux**\n\n![CleanShot2026-03-27at03 02 42-ezgif com-optimize](https://github.com/user-attachments/assets/b9d0f06c-c167-45f1-9154-0c49187296ab)\n\n_Watch Mentor and Executor agents collaborate in real-time_\n\n\u003c/div\u003e\n\n---\n\n## Overview\n\n**Worried about AI code hallucinations?** The Pair solves this by running two AI agents that cross-check each other:\n\n- **Mentor Agent** — Plans, reviews, and validates (read-only)\n- **Executor Agent** — Writes code and runs commands\n\nWhile they work, go grab a coffee. Come back to reviewed, cross-validated code.\n\n### Key Benefits\n\n- **Dual-Model Cross-Validation** — Two models check each other's work, dramatically reducing code hallucinations\n- **Automated Collaboration** — Agents work together without constant human intervention\n- **Real-Time Monitoring** — Watch CPU/memory usage per agent with live activity tracking\n- **Git Integration** — Automatic tracking of all file changes made during a session\n- **Human Oversight** — Step in at any time to pause, adjust, or reassign tasks\n- **Session Recovery** — Resume interrupted sessions with full conversation history restoration\n- **Onboarding Wizard** — Guided first-time setup with model configuration and directory selection\n- **Dark/Light Themes** — Automatic system theme detection with manual toggle\n\n### Use Cases\n\n- Autonomous coding sessions — Let AI agents iterate on features while you focus on review\n- Code refactoring — Automated analysis and implementation of improvements\n- Bug fixing — Agents collaborate to diagnose and resolve issues\n- Learning tool — Observe how AI agents break down and solve problems\n- Interrupted work recovery — Restore session state after app restart or crash\n\n---\n\n## Features\n\n- **Dual-Agent Architecture** — Separation of planning (Mentor) and execution (Executor)\n- **Full Automation Mode** — Agents work autonomously with workspace-scoped permissions\n- **Real-Time Activity Tracking** — Live status showing agent activity (thinking, doing, waiting)\n- **Resource Monitoring** — CPU and memory usage per agent, updated every second\n- **Git Change Tracking** — Automatic detection of modified, added, or deleted files\n- **Conversation History** — Full transcript of all agent interactions\n- **Local Orchestration** — Runs the app and agent coordination locally; model calls depend on your selected provider or local model\n- **Multi-Provider** — Works with opencode, Claude Code, Codex, and Gemini CLI\n- **Reasoning Controls** — Adjust thinking effort per agent role (low/medium/high)\n- **Token Tracking** — Real-time per-turn token usage displayed inline\n- **Skill System** — Attach project-specific skill files to guide agent behavior\n- **Auto-Update** — In-app update checking with one-click install\n\n---\n\n## Screenshots\n\nReview Result - Fail With Evidence\n\u003cimg width=\"2800\" height=\"2000\" alt=\"Review result showing failed evidence\" src=\"./docs/assets/intro-1.png\" /\u003e\n\nReview Result - Pass With Evidence\n\u003cimg width=\"2800\" height=\"2000\" alt=\"Review result showing passing evidence\" src=\"./docs/assets/intro-3.png\" /\u003e\n\n---\n\n## Installation\n\nDownload the latest release from [GitHub Releases](https://github.com/timwuhaotian/the-pair/releases):\n\n| Platform    | File                           |\n| ----------- | ------------------------------ |\n| **macOS**   | `the-pair-{version}.zip`       |\n| **Windows** | `the-pair-{version}-setup.exe` |\n| **Linux**   | `the-pair-{version}.AppImage`  |\n\n### From Source\n\n```bash\ngit clone https://github.com/timwuhaotian/the-pair.git\ncd the-pair\nnpm install\nnpm run build:mac  # or build:win / build:linux\n```\n\nOn macOS, `build:mac` produces a local DMG, while `build:mac:release` produces the ZIP-style release bundle used in GitHub Releases. The build script will ensure the required Rust targets are installed before invoking Tauri. If you prefer to set them up manually, run:\n\n```bash\nrustup target add aarch64-apple-darwin x86_64-apple-darwin\n```\n\n---\n\n## Quick Start\n\n\u003e [!NOTE]\n\u003e The Pair requires at least one AI provider CLI: [opencode](https://opencode.ai), [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [Codex](https://github.com/openai/codex), or [Gemini CLI](https://github.com/google-gemini/gemini-cli).\n\n### 1. Install an AI Provider\n\nInstall one or more of the supported CLIs:\n\n- **opencode** — `curl -fsSL https://opencode.ai/install | bash` or `npm install -g opencode-ai`\n- **Claude Code** — see [Claude Code setup](https://docs.anthropic.com/en/docs/claude-code/getting-started), or use `npm install -g @anthropic-ai/claude-code`\n- **Codex** — `npm install -g @openai/codex`\n- **Gemini CLI** — `npm install -g @google/gemini-cli` or `npx @google/gemini-cli`\n\n### 2. Configure AI Models (Optional)\n\nFor opencode-backed models, set up your AI providers in `~/.config/opencode/opencode.json`:\n\n```json\n{\n  \"provider\": {\n    \"openai\": { \"options\": { \"apiKey\": \"your-api-key\" } },\n    \"anthropic\": { \"options\": { \"apiKey\": \"your-api-key\" } }\n  }\n}\n```\n\n\u003e [!TIP]\n\u003e Codex, Claude Code, and Gemini CLI are detected from their installed CLIs and sign-in state. You can also use local models with [Ollama](https://ollama.com) for offline development.\n\n### 3. Launch The Pair\n\nOpen from Applications folder or start menu.\n\n### 4. Create Your First Pair\n\n1. Click **New Pair** button\n2. Configure: name, directory, task description, and AI models\n3. Watch the agents work — Mentor plans, Executor implements, Mentor reviews\n4. Monitor progress with real-time activity tracking and file changes\n\n---\n\n## Configuration\n\n### Provider Configuration\n\nOpenCode-backed models use your existing opencode configuration:\n\n- **macOS/Linux**: `~/.config/opencode/opencode.json`\n- **Windows**: `%APPDATA%/opencode/opencode.json`\n\nCodex, Claude Code, and Gemini CLI are detected from their local CLI install and account state.\n\n### Pair Runtime\n\nEach pair maintains its own runtime configuration in `.pair/runtime/\u003cpairId\u003e/` within your project directory, including session files, runtime permissions, and conversation history.\n\n\u003e [!NOTE]\n\u003e The Pair does not modify your global opencode permissions. All permissions are session-specific.\n\n---\n\n## Architecture\n\n### Tech Stack\n\n| Layer          | Technology            |\n| -------------- | --------------------- |\n| **Framework**  | Tauri 2.x             |\n| **Backend**    | Rust                  |\n| **Frontend**   | React 19 + TypeScript |\n| **Styling**    | Tailwind CSS v4       |\n| **State**      | Zustand               |\n| **Animations** | Framer Motion         |\n| **Icons**      | Lucide React          |\n\n### System Architecture\n\n```\n┌─────────────────────────────────────────────────────────┐\n│                    The Pair App                         │\n├─────────────────────────────────────────────────────────┤\n│  Frontend (React UI)                                    │\n│  ┌──────────────┬──────────────┬──────────────────┐    │\n│  │  Dashboard   │ Pair Detail  │    Settings      │    │\n│  └──────────────┴──────────────┴──────────────────┘    │\n│                          ↕ Tauri IPC                    │\n├─────────────────────────────────────────────────────────┤\n│  Backend (Rust)                                         │\n│  ┌──────────────┬──────────────┬──────────────────┐    │\n│  │ PairManager  │MessageBroker │ ProcessSpawner   │    │\n│  │ (Lifecycle)  │(State Machine)│(Multi-Provider) │    │\n│  └──────────────┴──────────────┴──────────────────┘    │\n│  ┌──────────────┬──────────────┬──────────────────┐    │\n│  │ Git Tracker  │ Worktrees    │ Session Snapshot │    │\n│  └──────────────┴──────────────┴──────────────────┘    │\n│  ┌──────────────┬──────────────┬──────────────────┐    │\n│  │Resource Mon. │ Acceptance   │ Report Generator │    │\n│  └──────────────┴──────────────┴──────────────────┘    │\n└─────────────────────────────────────────────────────────┘\n                            ↕\n              ┌─────────────┴─────────────┐\n              ↙                           ↘\n     ┌─────────────────┐          ┌─────────────────┐\n     │  AI Provider CLIs│          │   Git Repo      │\n     │ opencode/Claude/ │          │  (Workspace)    │\n     │ Codex/Gemini     │          └─────────────────┘\n     └─────────────────┘\n```\n\n### Agent Workflow\n\n```\nStart → Initialize \u0026 Baseline → Mentoring Phase → Executing Phase → Reviewing Phase\n                                                        ↓\n                                              Done? ──Yes→ Finished\n                                                 │\n                                                 No\n                                                 ↓\n                                         (loop back to Mentoring)\n```\n\n---\n\n## Development\n\n### Prerequisites\n\n- **Node.js** 22.22+\n- **npm** or **pnpm**\n- **Git**\n- **Rustup** for desktop builds\n\n\u003e [!NOTE]\n\u003e Release builds require the updater signing secret to be configured in GitHub Actions.\n\nRun a quick environment check before building:\n\n```bash\nnpm run preflight\n```\n\n### Setup\n\n```bash\ngit clone https://github.com/timwuhaotian/the-pair.git\ncd the-pair\nnpm install\nnpm run dev\n```\n\n### Project Structure\n\n```\nthe-pair/\n├── src/\n│   └── renderer/          # React frontend\n│       └── src/\n│           ├── App.tsx\n│           ├── components/\n│           └── store/\n├── src-tauri/             # Rust backend\n│   ├── src/\n│   │   ├── lib.rs\n│   │   ├── pair_manager.rs\n│   │   ├── message_broker.rs\n│   │   └── ...\n│   └── Cargo.toml\n├── build/                 # Build resources\n└── package.json\n```\n\n### Scripts\n\n| Command                     | Description                         |\n| --------------------------- | ----------------------------------- |\n| `npm run dev`               | Start hot-reload development server |\n| `npm run preflight`         | Check local build prerequisites     |\n| `npm run preflight:mac`     | Check macOS build prerequisites     |\n| `npm run preflight:win`     | Check Windows build prerequisites   |\n| `npm run preflight:linux`   | Check Linux build prerequisites     |\n| `npm test`                  | Run JavaScript and Rust unit tests  |\n| `npm run test:js`           | Run Node/TypeScript unit tests      |\n| `npm run test:rust`         | Run Rust unit tests                 |\n| `npm run typecheck`         | Check TypeScript types              |\n| `npm run lint`              | Run ESLint                          |\n| `npm run format`            | Format with Prettier                |\n| `npm run e2e:setup`         | Install the Appium macOS driver     |\n| `npm run e2e`               | Run mocked end-to-end tests         |\n| `npm run dev:mock`          | Start the app with mocked agents    |\n| `npm run dev:smoke`         | Start the app in smoke-test mode    |\n| `npm run clean`             | Remove generated build artifacts    |\n| `npm run build:mac`         | Build local macOS DMG               |\n| `npm run build:mac:release` | Build macOS release ZIP bundle      |\n| `npm run build:win`         | Build for Windows                   |\n| `npm run build:linux`       | Build for Linux                     |\n\n---\n\n## FAQ\n\n**Q: How does The Pair differ from single-agent AI coding tools?**\n\nA: Single-agent tools rely on one model to write and self-review code, which can miss its own mistakes. The Pair uses two separate agents where the Mentor reviews the Executor's work, catching errors before they land.\n\n**Q: Does The Pair require internet connectivity?**\n\nA: The Pair runs entirely locally. Only the AI model API calls require internet (or local model setup via Ollama).\n\n**Q: Which AI providers are supported?**\n\nA: The Pair supports four providers out of the box: **opencode** (any compatible model), **Claude Code CLI**, **OpenAI Codex CLI**, and **Gemini CLI**. Codex, Claude, and Gemini are detected automatically from their installed CLIs. You can mix providers — e.g., Claude as Mentor and Codex as Executor.\n\n**Q: Can I use my own AI models?**\n\nA: Yes, The Pair is model-agnostic. Opencode-backed models work with any compatible provider (OpenAI, Anthropic, Ollama, etc.). For Claude, Codex, and Gemini, simply install their CLI and sign in.\n\n**Q: Can I control how much the agents \"think\"?**\n\nA: Yes. The Pair supports **reasoning effort controls** for models that offer it (Claude, Codex o-series, Gemini 2.5). You can set low/medium/high effort per role — Mentor and Executor independently — from pair creation or settings.\n\n**Q: How do I track token usage and costs?**\n\nA: Token usage is tracked in real-time per agent turn. Live output token counts appear inline in the agent console so you can monitor spend as agents work.\n\n**Q: What happens if an agent gets stuck in a loop?**\n\nA: The Pair implements iteration limits. After a configured number of iterations, agents pause for human intervention.\n\n**Q: What if the app crashes or I close it mid-session?**\n\nA: Session snapshots are saved automatically. On relaunch, The Pair detects interrupted sessions and offers to restore them with full conversation history, so agents can continue from where they left off.\n\n**Q: Does The Pair auto-update?**\n\nA: Yes. The Pair checks for new versions on launch and notifies you with a one-click update flow. No manual download needed.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\nBuilt with ❤️ by [timwuhaotian](https://github.com/timwuhaotian)\n\n**⭐ Star this repo if you find it helpful!**\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimwuhaotian%2Fthe-pair","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimwuhaotian%2Fthe-pair","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimwuhaotian%2Fthe-pair/lists"}