Skip to content

Commit 4bbdea4

Browse files
os-zhuangclaude
andcommitted
docs: align AI docs with open=MCP-only / in-UI AI=cloud (cloud ADR-0025)
Propagate framework #2325 (service-ai removed from the open framework) across the remaining docs. Canonical decision: cloud ADR-0025 (service-ai -> cloud; open = MCP-only). Disambiguates the cross-repo "ADR-0025" reference, since framework ADR-0025 is plugin-distribution and unrelated. New model documented everywhere: - Open edition (cloud free tier / Docker / desktop / on-prem): no in-product ask/build chat. Data query via @objectstack/mcp (BYO-AI); metadata authoring via source mode + an AI coding agent. - Cloud / Enterprise: in-UI AI runtime (ask + build + in-product chat + /api/v1/ai/*), governed ask, managed/metered AI. User-facing: ai-capabilities (ask edition open->cloud, fixed the ambiguous ADR-0025 ref, added the open-edition two-path callout), plugin-chatbot-integration, environment-variables, knowledge, implementation-status, README (AI bullet -> MCP; drop the dead service-ai Services row), both objectstack-* skills. ADRs: cloud-owned banners on 0033/0038/0040/0063/0064 per cloud ADR-0025 (banners only; ADR bodies preserved as historical record). Left as historical/unaffected: docs/audits/2026-06-*, RELEASE_NOTES.md, ARCHITECTURE.md (spec/ai schemas stay open), apps/docs/app/llms* (generated route handlers), other ADRs' incidental service-ai mentions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 6ad6bf6 commit 4bbdea4

13 files changed

Lines changed: 91 additions & 14 deletions

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Prefer clicking? Author the same metadata visually in **Studio** — objects, re
8484
- **AI-native, not retrofitted** — Objects, permissions, flows, APIs, and UI are declarative typed metadata, small enough for an agent to load end-to-end. That metadata generates an automatic tool surface — REST APIs, client SDKs, UI views, and an [MCP](packages/mcp) server — so agents inspect and act through the same contracts you defined.
8585
- **Protocol-first runtime** — Every definition starts as a Zod schema (`z.infer<>` types), compiles into versioned, self-describing JSON artifacts, and runs on a microkernel plugin system (DI container, EventBus, `init → start → destroy` lifecycle).
8686
- **Data & framework reach** — In-memory, PostgreSQL, MySQL, SQLite, and MongoDB drivers; 7 framework adapters (Express, Fastify, Hono, NestJS, Next.js, Nuxt, SvelteKit); a client SDK with React hooks (`useQuery` / `useMutation` / `usePagination`).
87-
- **Governance & built-ins** — better-auth, RBAC / RLS / FLS, a DAG-based automation engine, an AI service (Agent / Tool / Skill on the Vercel AI SDK), the ObjectUI Console, and a full CLI (`os init` / `dev` / `compile` / `validate` / …).
87+
- **Governance & built-ins** — better-auth, RBAC / RLS / FLS, a DAG-based automation engine, an [MCP](packages/mcp) server that exposes the app to your own AI (BYO-AI), the ObjectUI Console, and a full CLI (`os init` / `dev` / `compile` / `validate` / …).
8888

8989
## Why AI-native?
9090

@@ -252,7 +252,6 @@ For the browser, the typed client SDK and React hooks (`useQuery` / `useMutation
252252

253253
| Package | Description |
254254
| :--- | :--- |
255-
| [`@objectstack/service-ai`](packages/services/service-ai) | AI service — Agent, Tool, Skill, Vercel AI SDK integration |
256255
| [`@objectstack/service-analytics`](packages/services/service-analytics) | Analytics — aggregations, time series, funnels, dashboards |
257256
| [`@objectstack/service-automation`](packages/services/service-automation) | Automation engine — flows, triggers, and workflow state machines |
258257
| [`@objectstack/service-cache`](packages/services/service-cache) | Cache — in-memory, Redis, multi-tier |

content/docs/concepts/implementation-status.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,15 @@ The `auth` service in `CoreServiceName` covers both **authentication** (identity
294294

295295
## AI Layer
296296

297+
<Callout type="warning">
298+
The in-UI AI **runtime** below (`@objectstack/service-ai`) moved to the **cloud /
299+
Enterprise** distribution — see cloud ADR-0025 (`service-ai → cloud; open =
300+
MCP-only`). The agent / skill / tool **schemas** stay open in `@objectstack/spec/ai`;
301+
the **open edition** exposes AI via [`@objectstack/mcp`](../guides/ai-capabilities)
302+
(BYO-AI). The Implementation / Status columns describe the runtime as it ships in
303+
cloud / EE.
304+
</Callout>
305+
297306
| Protocol | @objectstack/spec | Implementation | Status |
298307
|:---------|:-----------------:|:-------------:|:------:|
299308
| **Agent** || @objectstack/service-ai | ✅ Agent runtime (`agent-runtime.ts`, `agents/`) |

content/docs/guides/ai-capabilities.mdx

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,18 @@ description: "Complete guide to leveraging AI agents, RAG pipelines, and intelli
77

88
Complete guide to leveraging AI agents, knowledge retrieval, and intelligent automation in ObjectStack.
99

10-
> **Note — the open edition exposes AI via MCP (BYO-AI).** Per ADR-0025, the in-UI AI runtime (`@objectstack/service-ai`: agents, the `ask`/`build` assistants, in-product chat) ships in the **cloud / Enterprise** distribution, not the open framework. A self-hosted **open** runtime instead exposes its objects, queries, and business actions to *your own* AI — Claude, Cursor, any MCP client, or a local model — through **`@objectstack/mcp`** (bring-your-own-AI, zero platform AI cost). The `@objectstack/service-ai` examples below therefore describe the cloud/EE distribution.
10+
<Callout type="warning">
11+
**This guide describes the cloud / Enterprise AI tier. The open edition exposes AI only via MCP (BYO-AI).**
12+
13+
Per **cloud ADR-0025** (`service-ai → cloud; open = MCP-only`[`cloud/docs/adr/0025`](https://github.com/objectstack-ai/cloud/blob/main/docs/adr/0025-service-ai-to-cloud-open-mcp-only.md)), the in-UI AI runtime — `@objectstack/service-ai`: both the **`ask`** data-query assistant and the **`build`** Studio authoring assistant, plus all in-product chat — ships in the **cloud / Enterprise** distribution. It is **not** in the open framework, and no open distribution (cloud free tier, Docker, desktop, on-prem) has a built-in `ask` / `build` chat.
14+
15+
The **open edition** does AI two ways instead — both bring-your-own-AI, zero platform AI cost:
16+
17+
- **Data query → `@objectstack/mcp`** (BYO-AI). Point your own AI — Claude, Cursor, any MCP client, or a local model — at the app's objects, queries, and business **actions**, governed by the same RLS. With a local model, data *and* inference stay inside your boundary.
18+
- **Metadata authoring → source mode.** Author typed metadata as source (`*.object.ts`, `*.flow.ts`, …) with your own AI coding agent (Claude Code, Cursor), aided by the ObjectStack [skills](./skills) and MCP introspection. There is no in-product Builder chat in the open edition.
19+
20+
Everything below (agents, the `ask` / `build` personas, `@objectstack/service-ai` wiring, the `/api/v1/ai/*` routes) therefore describes the **cloud / Enterprise** distribution.
21+
</Callout>
1122

1223
## Table of Contents
1324

@@ -50,12 +61,17 @@ is in — the user never picks from a roster:
5061

5162
| Agent | Surface | Does | Edition |
5263
|---|---|---|---|
53-
| **`ask`** | data console | Read / query / explore records + run the business **actions** the app exposes. RLS-bounded. | open-source · free |
54-
| **`build`** | Studio | Author *metadata* (objects, fields, views, flows) via plan → draft → verify → publish. | cloud · paid |
64+
| **`ask`** | data console | Read / query / explore records + run the business **actions** the app exposes. RLS-bounded. | cloud · Enterprise |
65+
| **`build`** | Studio | Author *metadata* (objects, fields, views, flows) via plan → draft → verify → publish. | cloud · Enterprise |
66+
67+
Both agents are part of the **cloud / Enterprise** in-UI AI runtime (cloud ADR-0025).
68+
The **open edition** ships neither — it uses `@objectstack/mcp` (BYO-AI) for data
69+
query and source-mode authoring instead (see the note above).
5570

56-
There is no per-turn intent classifier and no agent dropdown: the surface binds
57-
the agent (data console → `ask`, Studio → `build`). A `build`-shaped request that
58-
reaches `ask` is declined and redirected to the Builder, never silently re-routed.
71+
Within the cloud / EE runtime there is no per-turn intent classifier and no agent
72+
dropdown: the surface binds the agent (data console → `ask`, Studio → `build`). A
73+
`build`-shaped request that reaches `ask` is declined and redirected to the
74+
Builder, never silently re-routed.
5975

6076
### You extend the platform with **skills**, not agents
6177

@@ -68,8 +84,10 @@ Actions / Flows / queries; it then attaches to `ask`. Every skill declares
6884
surface-compatible skills' tools** — there is no global fall-through, so a skill
6985
reaches an agent only when their surfaces match
7086
([ADR-0064](https://github.com/objectstack-ai/framework/blob/main/docs/adr/0064-tool-scoping-to-agent.md)).
71-
`surface:'build'` skills are inert on the open-source framework (the `build` agent
72-
is cloud-only) — intentional tiering, not a bug.
87+
Both `surface:'ask'` and `surface:'build'` skills run only where the in-UI AI
88+
runtime exists — the **cloud / Enterprise** distribution. On the open framework
89+
there is no in-product agent to attach them to (cloud ADR-0025); author capability
90+
as Actions / Flows and reach it through `@objectstack/mcp` instead.
7391

7492
### The shape of an agent
7593

content/docs/guides/environment-variables.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,15 @@ Auth settings precedence:
125125

126126
## AI
127127

128+
<Callout type="warning">
129+
These variables configure the **cloud / Enterprise** in-UI AI runtime
130+
(`@objectstack/service-ai`), which moved out of the open framework — see cloud
131+
ADR-0025 (`service-ai → cloud; open = MCP-only`). The **open edition** has no
132+
in-UI AI runtime to configure: it exposes AI through `@objectstack/mcp` (BYO-AI),
133+
where the model and provider are configured in your own MCP client (Claude,
134+
Cursor, a local model, …). See the [AI Capabilities guide](./ai-capabilities).
135+
</Callout>
136+
128137
| Variable | Type | Default | Description |
129138
|:---|:---|:---|:---|
130139
| `AI_GATEWAY_MODEL` | string || Vercel AI Gateway model id (for example `openai/gpt-4.1-mini` or `anthropic/claude-sonnet-4-5`). When set, the AI service boots with the gateway adapter before trying direct providers. |

content/docs/guides/plugin-chatbot-integration.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ description: Wire @object-ui/plugin-chatbot in Console (or any frontend) to the
55

66
# Connecting plugin-chatbot to a framework AI backend
77

8+
<Callout type="warning">
9+
**Cloud / Enterprise tier.** The in-UI AI backend this guide wires up — the
10+
`/api/v1/ai/*` routes, the `ask` / `build` assistants, the models picker, and the
11+
HITL inbox (`@objectstack/service-ai`) — ships in the **cloud / Enterprise**
12+
distribution, not the open framework (cloud ADR-0025: `service-ai → cloud; open =
13+
MCP-only`). On the **open edition** there is no in-product chat backend; expose
14+
the app to your own AI through `@objectstack/mcp` (BYO-AI) instead — see the
15+
[AI Capabilities guide](./ai-capabilities). Follow this guide when you run against
16+
a cloud / EE host (or a dev server with the AI tier mounted).
17+
</Callout>
18+
819
`@object-ui/plugin-chatbot` (a React component shipped from the `objectui`
920
monorepo) is the canonical chat UI for ObjectStack Console. It speaks the
1021
Vercel AI Data Stream protocol, so it pairs natively with the AI routes

content/docs/protocol/knowledge.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ service that orchestrates them — and ships individual adapters as
1717
`IDataEngine` / driver plugins (`driver-sql`, `driver-turso`,
1818
`driver-memory`) and `IStorageService` / S3 + local FS adapters.
1919

20+
<Callout type="info">
21+
The Knowledge Protocol contract and the `service-knowledge` orchestrator are open
22+
framework mechanisms. The AI **consumer** that wires the `search_knowledge` tool
23+
into an in-product chat loop (`@objectstack/service-ai`, shown below) ships in the
24+
**cloud / Enterprise** distribution — see cloud ADR-0025 (`service-ai → cloud;
25+
open = MCP-only`). On the open edition, reach your data through `@objectstack/mcp`
26+
(BYO-AI) instead.
27+
</Callout>
28+
2029
This document describes the **why**, the **contract**, the **plugin
2130
model**, and the **MVP scope** that ships in Phase 1.
2231

docs/adr/0033-ai-assisted-metadata-authoring.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ADR-0033: AI-assisted metadata authoring — one agent brain, draft-gated review, type-agnostic apply, open-core boundary
22

3+
> **🔶 Cloud-owned — superseded in part by cloud ADR-0025 (2026-06-25).** The in-UI AI runtime and the `ask` / `build` agents described here moved to the **cloud / Enterprise** distribution (`@objectstack/service-ai``cloud/packages/service-ai`, closed); the open framework exposes AI only via `@objectstack/mcp` (BYO-AI) and ships no in-product `ask` / `build` chat. Retained as historical design context, now **cloud-owned** — see [`cloud/docs/adr/0025-service-ai-to-cloud-open-mcp-only`](https://github.com/objectstack-ai/cloud/blob/main/docs/adr/0025-service-ai-to-cloud-open-mcp-only.md).
4+
35
**Status**: Accepted (2026-06-02)
46
**Deciders**: ObjectStack Protocol Architects
57
**Builds on**: [ADR-0005](./0005-metadata-customization-overlay.md) (one Zod source per type + org overlay), [ADR-0010 (protection)](./0010-metadata-protection-model.md) (L1/L2/L3 protection), [ADR-0010 (NL→flow)](./0010-nl-to-flow-authoring.md) + [ADR-0011](./0011-actions-as-ai-tools.md) (AI authoring of metadata / actions-as-tools — **the design center**), [ADR-0019](./0019-approval-as-flow-node.md) (approvals as a flow node), [ADR-0027](./0027-metadata-authoring-lifecycle.md) (**staged authoring · draft · publish · promote***this ADR routes every AI write through its draft workspace*), [ADR-0032](./0032-unified-expression-layer.md) (validate-by-default, AI-authored expressions)

docs/adr/0038-build-verification-loop.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ADR-0038: Build Verification Loop — the agent builds, verifies, and corrects itself
22

3+
> **🔶 Cloud-owned — superseded in part by cloud ADR-0025 (2026-06-25).** The in-UI AI runtime and the `ask` / `build` agents described here moved to the **cloud / Enterprise** distribution (`@objectstack/service-ai``cloud/packages/service-ai`, closed); the open framework exposes AI only via `@objectstack/mcp` (BYO-AI) and ships no in-product `ask` / `build` chat. Retained as historical design context, now **cloud-owned** — see [`cloud/docs/adr/0025-service-ai-to-cloud-open-mcp-only`](https://github.com/objectstack-ai/cloud/blob/main/docs/adr/0025-service-ai-to-cloud-open-mcp-only.md).
4+
35
**Status**: Proposed (2026-06-11)
46
**Deciders**: ObjectStack Protocol Architects
57
**Builds on**: [ADR-0033](./0033-ai-assisted-metadata-authoring.md) (drafts as the staging layer — this ADR **replaces its human-approval assumption for AI builds** with a machine gate; HITL stays for destructive actions), [ADR-0021](./0021-analytics-dataset-semantic-layer.md) (datasets — what most verification probes exercise), ADR-0037 / [framework#1694](https://github.com/objectstack-ai/framework/pull/1694) (Live Canvas — the *human-visibility* complement to this ADR's *machine-verification*)

docs/adr/0040-unified-assistant-and-agent-binding.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ADR-0040: Unified Assistant — the end user never picks an agent
22

3+
> **🔶 Cloud-owned — superseded in part by cloud ADR-0025 (2026-06-25).** The in-UI AI runtime and the `ask` / `build` agents described here moved to the **cloud / Enterprise** distribution (`@objectstack/service-ai``cloud/packages/service-ai`, closed); the open framework exposes AI only via `@objectstack/mcp` (BYO-AI) and ships no in-product `ask` / `build` chat. Retained as historical design context, now **cloud-owned** — see [`cloud/docs/adr/0025-service-ai-to-cloud-open-mcp-only`](https://github.com/objectstack-ai/cloud/blob/main/docs/adr/0025-service-ai-to-cloud-open-mcp-only.md).
4+
35
> **⚠️ Superseded by [ADR-0063](./0063-two-kernel-agents-skills-are-the-extension-primitive.md)** (2026-06-22). Its core decision — a *single* unified assistant carrying all skills, switched by a per-turn intent classifier — was **reversed**: the kernel now ships two agents (`ask` / `build`) bound by *surface*, and `*.agent.ts` is closed to third parties (skills are the extension primitive). The UX win it established (the user never picks from a roster) is kept, re-grounded as surface binding. Kept below as a historical record of the decision and the incident that motivated it.
46
57
**Status**: **Superseded by [ADR-0063](./0063-two-kernel-agents-skills-are-the-extension-primitive.md)** — original: Proposed (2026-06-11)

docs/adr/0063-two-kernel-agents-skills-are-the-extension-primitive.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ADR-0063: Two agents (`ask` / `build`), bound by surface; skills are the only third-party extension primitive
22

3+
> **🔶 Cloud-owned — superseded in part by cloud ADR-0025 (2026-06-25).** The in-UI AI runtime and the `ask` / `build` agents described here moved to the **cloud / Enterprise** distribution (`@objectstack/service-ai``cloud/packages/service-ai`, closed); the open framework exposes AI only via `@objectstack/mcp` (BYO-AI) and ships no in-product `ask` / `build` chat. Retained as historical design context, now **cloud-owned** — see [`cloud/docs/adr/0025-service-ai-to-cloud-open-mcp-only`](https://github.com/objectstack-ai/cloud/blob/main/docs/adr/0025-service-ai-to-cloud-open-mcp-only.md).
4+
35
**Status**: Proposed (2026-06-22)
46
**Deciders**: ObjectStack Protocol Architects
57
**Supersedes**: [ADR-0040](./0040-unified-assistant-and-agent-binding.md) — its core decision (a *single* unified assistant selected by *per-turn intent classification*) is **reversed**. ADR-0040's UX win ("the end user never picks from a roster") is **kept** but re-grounded: the *surface* binds the agent, not a classifier and not a dropdown. §3 (custom tenant agents) is withdrawn; §4 (tool-scoping) is handed to [ADR-0064](./0064-tool-scoping-to-agent.md).

0 commit comments

Comments
 (0)