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 onemain.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
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)
Frompackages/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
Frompackages/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
main.ts:
Where to dig deeper
/build-an-oracle/reference/createoracleapp— every option in detail./build-an-oracle/reference/plugin-api— hook-by-hook reference./build-an-oracle/develop/plugin-recipes/add-a-tool— one recipe per capability./build-an-oracle/reference/environment-variables— every env var grouped./build-an-oracle/reference/bundled-plugins/overview— every bundled plugin.- Canonical reference oracle:
apps/qiforge-example/src/main.tsand the Weather plugin underapps/qiforge-example/src/plugins/weather/.