Skip to content

YUX/omg

 
 

Repository files navigation

omg · oh-my-grok

An independent, multi-model AI coding agent. The speed and rigor of a Rust harness — the open, orchestrate-everything philosophy of an agent OS.

License Rust Built on grok-build

What it is · Why · What works today · Quickstart · Multi-model · The cast · Architecture · Credits


What it is

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.

Why

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 /goal orchestration 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.

What works today

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.

Quickstart

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 TUI

omg 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.toml

See 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].

Multi-model connector

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's model-core.
  • Config generation — any provider/model (or resolved category) renders to a valid grok [model.<id>] block, or is registered in-process via omg-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"

The cast

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].

Architecture

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's ConfigModelOverride.
  • .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.

Credits & license

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.

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 99.6%
  • Other 0.4%