An independent, multi-model AI coding agent. The speed and rigor of a Rust harness — the open, orchestrate-everything philosophy of an agent OS.
What it is · Why · What works today · Quickstart · Multi-model · The cast · Architecture · Credits
omg is a terminal AI coding agent that refuses to marry a single model provider.
It is built on the foundation of grok-build — xAI's excellent Rust agent runtime and full-screen TUI — and extends it with the ideas of oh-my-openagent: a curated multi-provider connector, category-based model routing, and a cast of specialized agents (an oracle, an orchestrator, a tireless worker) that cooperate on a task.
Use Claude, GPT, Kimi, DeepSeek, GLM, Grok, or a local model — whichever is connected, whichever is best for the job — and let the agent pick per task.
omg started as a fork of grok-build. It is now its own project: grok-build is a foundation and an upstream we cherry-pick from, not a leash.
The best coding agents are prisons with good food. omg takes a different bet:
- grok-build gives us a fast, robust Rust harness — a real turn loop, a complete
subagent system (spawn child sessions, one model per subagent, git-worktree isolation),
a
/goalorchestration loop, MCP, tools, and a polished TUI. - oh-my-openagent gives us the open-market philosophy: no single provider wins; orchestrate them all; route work to whichever model is connected and best.
- omg = grok's mechanism + omo's openness. One fast binary, every model, a real agent team.
| Capability | Status |
|---|---|
| Runs as a full agent + TUI (built on grok's runtime) | ✅ cargo run -p xai-grok-pager-bin |
| Multi-provider registry — Anthropic, OpenAI, OpenRouter, Moonshot/Kimi, DeepSeek, Z.ai/GLM, Groq, xAI, Ollama | ✅ crates/omg/omg-providers |
Category → fallback-chain routing (ask for code, get whatever provider you have) |
✅ omg-models CLI |
Anthropic-direct (x-api-key) from pure config |
✅ auth_scheme added to the model config |
| Typed provider → grok-config bridge (no TOML round-trip) | ✅ crates/omg/omg-bridge |
| The omo cast — oracle, atlas, sisyphus-junior, prometheus, metis, momus, explore, librarian | ✅ .grok/agents/*.md |
A branded omg binary that auto-injects the provider catalog + runs BYOK with no login |
✅ cargo run -p omg |
| Full team orchestration presets (Atlas/Sisyphus loop, oracle verification gate) | 🔜 in progress |
See OMG.md for the full architecture and roadmap.
Run the omg agent. Set an API key for any provider (ANTHROPIC_API_KEY,
OPENROUTER_API_KEY, MOONSHOT_API_KEY, …) and omg wires that provider's models into
the catalog automatically — no config file required:
export MOONSHOT_API_KEY=sk-...
cargo run -p omg -- models # see the auto-injected catalog
cargo run -p omg -- -m moonshot-kimi-k2 -p "explain this repo" # one-shot (BYOK, no login)
cargo run -p omg # full-screen TUIomg registers one entry per routing category too, so -m code, -m deep,
-m ultrabrain, -m quick resolve to the best model you have connected. omg -p … runs
entirely on your provider key — no grok login required.
Requirements: a Rust toolchain (pinned by rust-toolchain.toml,
auto-installed by rustup) and DotSlash on PATH so the
hermetic bin/protoc resolves (cargo install dotslash). macOS and Linux are supported
build hosts.
Inspect / hand-tune with the standalone provider CLI:
cargo run -p omg-providers --bin omg-models -- providers # who's connected?
cargo run -p omg-providers --bin omg-models -- resolve code # best 'code' model you have
cargo run -p omg-providers --bin omg-models -- emit-connected >> ~/.grok/config.tomlSee examples/config.toml for a complete, commented setup —
BYOK provider models (including Anthropic-direct via the new auth_scheme) and the
cast wired to models via [subagents.models].
grok-build already speaks three wire protocols (OpenAI chat/completions, OpenAI
responses, Anthropic messages), so most providers work — but only if you hand-write a
verbose [model.<id>] TOML block per model. omg adds the layer that was missing:
- A provider registry that knows each provider's base URL, wire protocol, auth scheme, required headers, env keys, and models — so you don't repeat them.
- Category routing — roles ask for a category (
ultrabrain,deep,code,quick,default), which resolves through an ordered(provider, model)chain to the first provider you actually have connected. Ported from omo'smodel-core. - Config generation — any
provider/model(or resolved category) renders to a valid grok[model.<id>]block, or is registered in-process viaomg-bridge.
$ omg-models resolve code # only OPENROUTER_API_KEY set
# code → openrouter/anthropic/claude-opus-4-8
[model.code]
model = "anthropic/claude-opus-4-8"
base_url = "https://openrouter.ai/api/v1"
api_backend = "chat_completions"
env_key = "OPENROUTER_API_KEY"
context_window = 200000
[model.code.extra_headers]
HTTP-Referer = "https://github.com/YUX/omg"
X-Title = "omg"
omo's insight is that a good agent is really a team. grok-build already has the
machinery (typed subagents, per-subagent models, worktree isolation, a goal loop); omg
supplies the team as agent definitions in .grok/agents/:
| Agent | Role |
|---|---|
| oracle | Read-only, high-IQ advisor & verifier. Consulted for architecture calls, self-review, hard bugs, and go/no-go verdicts. |
| atlas | Orchestrator. Decomposes a goal, delegates to the right workers, accumulates learnings, drives to a verified done — never codes itself. |
| sisyphus-junior | The implementation workhorse. Writes the code, runs the tests, reports. Cannot delegate. |
| prometheus | Read-only planner / requirements interviewer. |
| metis | Pre-plan gap analyzer — surfaces ambiguity before work starts. |
| momus | Plan reviewer — approves unless it finds a real blocker. |
| explore / librarian | Fast read-only specialists for code search and docs lookup. |
Each role routes to a model category, so oracle uses your strongest connected model
and explore uses a cheap fast one — via [subagents.models].
All of omg's value-add is layered on top of grok-build's runtime:
crates/omg/omg-providers— the provider registry + category routing (a pure leaf crate: no grok deps, builds fast).crates/omg/omg-bridge— the one crate that speaks both vocabularies, converting a resolved provider/model into grok'sConfigModelOverride..grok/agents/*.md— the cast, as data.scripts/sync-upstream.sh— optionally pull grok-build improvements.
We prefer additive crates, but as an independent project we also modify the xai-grok-*
crates directly where that's the cleanest fix. Read OMG.md for the design
rationale, the pillars, and what's next.
omg stands on the shoulders of two projects, with gratitude:
- grok-build by xAI — the Rust harness, TUI, and agent runtime this is built on. Licensed under Apache-2.0.
- oh-my-openagent by @code-yeongyu — the multi-model orchestration ideas (the cast, category routing, the boulder philosophy) that omg ports. The cast prompts here are original re-implementations of those concepts, not copies.
First-party code in this repository is licensed under the Apache License, Version 2.0
— see LICENSE. Third-party and vendored code retains its original licenses;
see THIRD-PARTY-NOTICES. The grok monorepo revision this tree was
based on is recorded in SOURCE_REV.
omg is not affiliated with or endorsed by xAI or the oh-my-openagent project.