Skip to main content
This page is for AI tools (Cursor, Claude Code, Codex, …) scaffolding a QiForge oracle. Humans should read Quickstart and Build a plugin instead. If you are an AI agent: read top-to-bottom once. Every signature you need is inlined. Source paths cite the canonical files on the QiForge runtime (packages/oracle-runtime) and the reference oracle (apps/qiforge-example).
If you are working inside a scaffolded oracle project (one created with qiforge-cli new), there is already a Claude Code skill at .claude/skills/qiforge-oracle/SKILL.md with project-local guidance: adding plugins, adding tools, wiring env, writing tests with createTestRuntime. Load it first — it carries denser, scenario-specific references than this page.

TL;DR — what you produce

A QiForge oracle is one main.ts that calls createOracleApp({ config, plugins, … }) plus one folder per plugin under src/plugins/<name>/. The runtime handles HTTP, auth, the agent graph, the checkpointer, Matrix, and bundles 15 plugins by default. You ship glue code, not infrastructure.

main.ts shape

Source: apps/qiforge-example/src/main.ts.

createOracleApp — full options

packages/oracle-runtime/src/bootstrap/create-oracle-app.ts
createOracleApp returns an OracleApp:

OraclePlugin — all 9 hooks

packages/oracle-runtime/src/plugin-api/oracle-plugin.ts

PluginManifest

PluginTool, PluginSubAgent

Visibility rules

silent means not advertised — the tools are still bound and the agent can call them; they’re just kept out of the Tier-1 prompt and list_capabilities. It is not a security boundary.

Bundled plugins (15)

From packages/oracle-runtime/src/plugins/index.ts: Toggle via features in createOracleApp: true forces on, false forces off, 'auto' runs autoDetect. Per-plugin reference pages: /build-an-oracle/reference/bundled-plugins/overview.

Core (Tier-0) env vars

From packages/oracle-runtime/src/config/base-env-schema.ts: These are the exact names the runtime validates — set them character-for-character or the boot-time Zod check fails. There is no ANTHROPIC_API_KEY — the agent’s model id is fixed per role in the provider model map; switch the provider with LLM_PROVIDER + its key, or override the main model via the resolveModel hook. Plugin-specific env vars (MEMORY_MCP_URL, FIRECRAWL_MCP_URL, SANDBOX_MCP_URL, COMPOSIO_API_KEY, SLACK_BOT_OAUTH_TOKEN, REDIS_URL, …) merge in via each plugin’s configSchema.

Copy-pasteable plugin template

Then in main.ts:

Where to dig deeper