Guides

Oracles

An oracle is a read-only knowledge base. Before the agent writes a line, it can ask a domain expert that answers strictly from its sources — so Moa follows real patterns instead of guessing. You can also consult one yourself, any time.

What an oracle is#

Each oracle is a curated knowledge base for one domain — TypeScript, Python, security, code review, and more. A <domain>-oracle is a separate, read-only agent scoped to that KB. It answers only from its sources and cites them; if the KB doesn't cover your question, it says so rather than inventing an answer.

Tip.Oracles are auto-wired into coding workflows — the agent can consult the relevant domain before it edits — so you get grounded results without doing anything. The commands below are for when you want to ask one directly.

List the available domains#

See which domains your workspace exposes:

bash
moa oracle list

Dozens of domains ship out of the box — language experts (TypeScript, Python, Go, Rust), plus security, code review, testing, CI/CD, SQL, API design, and more.

Consult an oracle#

Ask a question of a specific domain. Add --watch to stream the answer as it's written (it exits non-zero if the consultation fails).

bash
moa oracle consult ts-engineer "how should I type a generic event emitter?" --watch

The answer is bounded to that KB — grounded and cited, not a guess. Phrase the question for the domain you picked (ask the security-engineer oracle about authz, the sql-engineer one about query plans).

Review past consultations#

Every consultation is saved. Review them, narrow the count, or get machine-readable output:

bash
moa oracle history
moa oracle history --limit 10
moa oracle history --json

When to use an oracle#

  • You want an answer grounded in a specific stack's real patterns, not the model's best guess.
  • You're about to make a domain decision (typing, schema, auth) and want a cited second opinion.
  • You're debugging and need the canonical approach for a domain before you change code.
Note.Oracles are read-only — they never touch your repo. For the full command surface see the CLI reference; for how they fit the engine, see How Moa works.