# Repository Briefing: minhdevtry/agy-byom
> Source: https://repoforai.com/repo/minhdevtry/agy-byom (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/minhdevtry/agy-byom
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Go
- **License**: See repository
- **Engineering Health**: A (77/100 · Maintenance 35/35 · Adoption 16/25 · Releases 20/20 · License 6/20)
- **Latest Release**: v1.4.0 (2026-12-03) — https://github.com/minhdevtry/agy-byom/releases
- **Review Snapshot**: 2026-12-03 (Note: v1.4.0 on 2026-12-03 shipped after this review; verify latest release notes)
- **Deployment / Stack Signals**: Local AI, Self-Hosted, CLI
- **Momentum**: 122 ★ total (+10 24h / +122 7d) · 29 forks
- **Topics**: `ai-coding`, `anthropic`, `antigravity`, `bring-your-own-key`, `bring-your-own-model`, `byok`, `byom`, `deepseek`, `executor`, `go`, `golang`, `google-antigravity`
- **When to Use**: Best for: Antigravity users who want local or hosted models in the same picker, with tested tool calling and control over Orchestrator and Executor selection. Skip if: Your client already connects directly to the model you need, you cannot run a per-user background service, or policy does not permit the chosen upstream or credential path.

## Overview
```text
### Architecture & Core Mechanics
agy-byom pairs a Go loopback gateway at 127.0.0.1:24180 with the BYOM Studio sidecar plugin. Antigravity App 2.0, IDE, and CLI send Gemini wire requests to the gateway for custom models. A separate catalog and role-settings integration exposes those models in the host UI. Native requests retain their normal session path: the integration does not patch Antigravity binaries, and the gateway does not read Google OAuth tokens.

For BYOM traffic, routing and guardrails precede translation to Anthropic Messages, OpenAI Chat Completions, or OpenAI Responses. Upstream routing includes an SSRF guard. A bounded gateway-side ReplayCache keeps provider replay data out of Gemini’s thoughtSignature field, avoiding a specific cross-model signature error. The root separates cmd/, internal/, and plugin/; go.mod declares Go 1.26 with no explicit module requirements, and agy-byom mcp is a read-only stdio telemetry endpoint.

### Key Capabilities & Differentiators
The gateway connects to hosted APIs such as OpenRouter and DeepSeek and detects running Ollama, LM Studio, vLLM, and llama.cpp servers on localhost. It supports Anthropic prompt-cache breakpoints and adaptive thinking, but a compatible endpoint does not guarantee working tool calls: the test-tools command probes that behavior directly. BYOM models can run alongside native models in Orchestrator and Executor roles and in /swarm. The optional Orchestrator fallback is off by default; enabling it can change the role defaults to BYOM models.

ChatGPT subscription accounts can be added through Codex PKCE OAuth or imported from ~/.codex/auth.json. The account pool offers Fill-First and Round-Robin allocation, a sticky window intended to preserve prompt-cache locality, and cooldown on HTTP 429. BYOM Studio’s Models, Usage, Connect, and More tabs cover configuration and operations; Usage shows requests, latency, tokens, cache hit rate, and live account quotas with reset countdowns.

### Trade-offs & Limitations
Compared with pointing a coding client directly at Ollama or a hosted API, agy-byom’s main benefit is integration with Antigravity’s picker and role system. A client with native custom-endpoint support avoids the extra service and protocol translation. Antigravity updates remain a compatibility risk for the catalog and settings integration even though the client binaries are untouched. Test tool calls against the exact provider and model before assigning it to an agent role.

Loopback limits exposure of the inbound gateway, but hosted providers still receive inference payloads. Credentials are stored in a local file with documented 0600 permissions, and prompt contents are not logged to disk. Treat imported subscription credentials as sensitive and review both platform and provider terms independently. The project identifies its license as MIT; that does not establish provider approval or grant rights to upstream services. There are no measured figures here for translation overhead or local inference performance.

### Hardware & Deployment Guide
Prebuilt Linux, macOS, and Windows binaries are published with SHA256SUMS.txt. Prefer a pinned release and inspect the installer before running it: installation registers a user-level background launcher (systemd --user, LaunchAgent, or Windows Startup), installs BYOM Studio, and syncs Antigravity settings. Source installation uses Go 1.26+ with install.sh or install.ps1. Uninstall uses .agy-byom.bak backups to restore settings.

Bring a supported Antigravity client and either upstream credentials or a running local inference server. Only the latter can keep BYOM inference on the machine; loopback describes the client-to-gateway hop, not the entire request path, and does not establish offline support for Antigravity itself. Use doctor --json to check gateway health, sync state, and provider probes. v1.2.0 calls out subscription access, the Responses API, and CLI improvements; the supplied v1.3.0 release entry is a changelog link and does not identify specific changes.
```

## Key Capabilities
```text
- Protocol bridge: Translates Gemini wire requests into Anthropic Messages, OpenAI Chat Completions, or OpenAI Responses.
- Role integration: Exposes BYOM models in Antigravity’s picker, Orchestrator and Executor slots, and /swarm; the optional Orchestrator fallback is off by default.
- Replay isolation: A bounded gateway-side ReplayCache keeps provider replay data out of Gemini’s thoughtSignature field.
- Provider validation: Detects local Ollama, LM Studio, vLLM, and llama.cpp endpoints; test-tools --json exercises a real tool call.
- Account routing: ChatGPT subscription pools support Fill-First and Round-Robin rotation, sticky routing, and cooldown on HTTP 429.
- Observability: BYOM Studio surfaces usage and quota data; read-only stdio MCP exposes byom_status, byom_stats, and byom_routes.
```

## Quick Start / Clone
```bash
curl -fsSL https://raw.githubusercontent.com/minhdevtry/agy-byom/main/get.sh | bash
```
