Skip to content

Commit 97ad570

Browse files
os-zhuangclaude
andauthored
docs: reframe AI + SSO for the open-source site; remove cloud-only intro pages (#2649)
This is the open-source (community) documentation site. Two changes: 1. Remove genuinely cloud-only introduction pages (verified absent from the open framework's packages/): - ai/chatbot-integration.mdx — in-product chat / HITL wiring on @objectstack/service-ai (cloud, ADR-0025). - deployment/cloud-artifact-api.mdx — the Cloud control-plane artifact HTTP contract. Nav (meta.json) and the two inbound cross-links (ai/index, deployment/publish-and-preview) are updated so nothing dangles. 2. Reframe docs that positioned an open capability as cloud/Enterprise-only. The open framework ships the whole AI stack except the in-product chat runtime: - AI: agents/tools/skills are typed metadata (defineAgent/defineTool/defineSkill, @objectstack/spec/ai); data query and action invocation run through @objectstack/mcp (BYO-AI, RLS-governed); the Knowledge/RAG stack (service-knowledge + knowledge-memory / knowledge-ragflow + embedder-openai) is open. Only the in-product ask/build chat runtime (@objectstack/service-ai, /api/v1/ai/*) is cloud/Enterprise — now clearly labeled, not the default narrative. Touches ai/index, agents, actions-as-tools, knowledge-rag, natural-language-queries. Also corrects the actions "explicit opt-in" framing: the open MCP path filters by permission, not the cloud-only ai.exposed gate. - Auth: OIDC + SAML SSO ship in the open @objectstack/plugin-auth via @better-auth/sso (Setup → SSO Providers, no code); sso.mdx no longer implies they require an enterprise package. Every open/cloud claim is backed by packages/ (or its absence): @objectstack/mcp, service-knowledge, knowledge-*, embedder-openai, and plugin-auth SSO/SCIM are present; @objectstack/service-ai is not. Also fixed a fabricated MCP wiring API in the reframed examples (MCPServerPlugin.configure(...) → the real `new MCPServerPlugin({ transport, autoStart })`). Note for maintainers: packages/spec/src/ai/skill.zod.ts:80 calls the `ask` surface "the open-source/free surface", which contradicts cloud ADR-0025 (ask/build in-product runtime = cloud-only). These docs follow ADR-0025; the spec comment likely needs reconciling. Claude-Session: https://claude.ai/code/session_01LHQscZJ8NvXceSmsPNdTZd Co-authored-by: Claude <noreply@anthropic.com>
1 parent 113bd50 commit 97ad570

11 files changed

Lines changed: 298 additions & 492 deletions

content/docs/ai/actions-as-tools.mdx

Lines changed: 162 additions & 165 deletions
Large diffs are not rendered by default.

content/docs/ai/agents.mdx

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,39 @@ description: The two platform agents (ask and build), how skills extend them, an
55

66
# AI Agents
77

8-
Part of the [AI module](/docs/ai) — see the overview for how the cloud / Enterprise in-UI AI runtime differs from the open edition's MCP-only (BYO-AI) approach.
8+
Part of the [AI module](/docs/ai). In the **open edition**, agents, tools, and
9+
skills are **typed metadata**: you author them as source with `defineAgent` /
10+
`defineSkill` / `defineTool` from the open `@objectstack/spec/ai` package, and an
11+
external AI client (Claude, Cursor, a local model — any MCP client) reaches your
12+
objects, queries, and business **Actions** through `@objectstack/mcp` (BYO-AI),
13+
all governed by RLS. This page describes that metadata and the `AgentSchema` it
14+
validates against.
15+
16+
<Callout type="info">
17+
**Cloud / Enterprise — the in-product chat runtime.** The authoring format on
18+
this page is open. The *in-product chat runtime* that runs agents for end users —
19+
the two platform agents `ask` and `build`, all in-product chat, and the
20+
`/api/v1/ai/*` chat endpoints — ships only in the cloud / Enterprise distribution
21+
(`@objectstack/service-ai`, cloud ADR-0025). The open edition uses
22+
`@objectstack/mcp` (BYO-AI) instead. The next two sections describe that cloud /
23+
Enterprise runtime.
24+
</Callout>
925

1026
Per [ADR-0063](https://github.com/objectstack-ai/framework/blob/main/docs/adr/0063-two-kernel-agents-skills-are-the-extension-primitive.md)
11-
the kernel ships **exactly two** platform agents, bound by the *surface* the user
12-
is in — the user never picks from a roster:
27+
the cloud / Enterprise runtime ships **exactly two** platform agents, bound by the
28+
*surface* the user is in — the user never picks from a roster:
1329

1430
| Agent | Surface | Does | Edition |
1531
|---|---|---|---|
1632
| **`ask`** | data console | Read / query / explore records + run the business **actions** the app exposes. RLS-bounded. | cloud · Enterprise |
1733
| **`build`** | Studio | Author *metadata* (objects, fields, views, flows) via plan → draft → verify → publish. | cloud · Enterprise |
1834

19-
Both agents are part of the **cloud / Enterprise** in-UI AI runtime (cloud ADR-0025).
20-
The **open edition** ships neither — it uses `@objectstack/mcp` (BYO-AI) for data
21-
query and source-mode authoring instead (see the callout in the
22-
[AI Overview](/docs/ai)).
23-
24-
Within the cloud / EE runtime there is no per-turn intent classifier and no agent
25-
dropdown: the surface binds the agent (data console → `ask`, Studio → `build`). A
26-
`build`-shaped request that reaches `ask` is declined and redirected to the
27-
Builder, never silently re-routed.
35+
Within this cloud / Enterprise runtime there is no per-turn intent classifier and
36+
no agent dropdown: the surface binds the agent (data console → `ask`, Studio →
37+
`build`). A `build`-shaped request that reaches `ask` is declined and redirected to
38+
the Builder, never silently re-routed. (For data query and source-mode authoring,
39+
the **open edition** ships neither agent and uses `@objectstack/mcp` (BYO-AI)
40+
instead — see the callout in the [AI Overview](/docs/ai).)
2841

2942
## You extend the platform with **skills**, not agents
3043

@@ -44,8 +57,9 @@ as Actions / Flows and reach it through `@objectstack/mcp` instead.
4457

4558
## The shape of an agent
4659

47-
An agent is metadata validated by `AgentSchema` (the platform's own `ask` / `build`
48-
records use exactly these fields):
60+
An agent is typed metadata validated by `AgentSchema` — exported, together with the
61+
`defineAgent` factory, from the open `@objectstack/spec/ai` package (the platform's
62+
own `ask` / `build` records use exactly these fields):
4963

5064
| Field | Meaning |
5165
|------|---------|
@@ -59,8 +73,10 @@ records use exactly these fields):
5973

6074
There is no `type` field and no fixed agent "type" taxonomy — behaviour comes from
6175
persona, instructions, skills, and tools. There are no `triggers` / `schedule`
62-
fields on an agent; drive agents from [Flows/Workflows](/docs/automation) or invoke
63-
them via the chat endpoint.
76+
fields on an agent; drive agents from [Flows/Workflows](/docs/automation), or — on
77+
the **cloud / Enterprise** runtime — via the in-product chat endpoint
78+
(`/api/v1/ai/*`). In the open edition, invoke the underlying Actions/Flows through
79+
`@objectstack/mcp`.
6480

6581
<Callout type="info">
6682
Agent tools are **references** to existing Actions, Flows, or queries — you do
@@ -70,12 +86,15 @@ LLM-callable.
7086
</Callout>
7187

7288
<Callout type="warning">
73-
The agent definitions below illustrate agent **anatomy** — they show how an
74-
`AgentSchema` record is shaped, *not* a tenant-authoring tutorial. On today's
75-
platform you do not ship your own agents (`*.agent.ts` is platform-internal); you
76-
add capability by authoring a **skill** that attaches to the built-in `ask` agent.
77-
Read the examples for structure, then express your own capability as a skill plus
78-
the Actions/Flows its tools reference.
89+
The agent definitions below illustrate agent **anatomy** — how an `AgentSchema`
90+
record is shaped (that schema and the `defineAgent` factory are part of the open
91+
`@objectstack/spec/ai` package). Note that the `agent` metadata type is
92+
`allowRuntimeCreate:false` / `allowOrgOverride:false` (ADR-0063 §2): the **cloud /
93+
Enterprise** in-product runtime honors only the two platform agents `ask` and
94+
`build`, so you do not ship a custom agent *to that runtime* — you extend it by
95+
authoring a **skill** (open metadata) that attaches to `ask`. In the open edition,
96+
express the same capability as Actions / Flows plus the skills/tools its references
97+
point at, and reach it through `@objectstack/mcp` (BYO-AI).
7998
</Callout>
8099

81100
## Sales Assistant Agent

content/docs/ai/chatbot-integration.mdx

Lines changed: 0 additions & 136 deletions
This file was deleted.

content/docs/ai/index.mdx

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,14 @@ description: Complete guide to leveraging AI agents, RAG pipelines, and intellig
77

88
AI in ObjectStack is a **cross-protocol capability layer**: agents, tools, and knowledge retrieval sit on top of the same objects, actions, permissions, and automation that power the rest of the platform. This module covers the architecture and each of its moving parts.
99

10-
<Callout type="warning">
11-
**This guide describes the cloud / Enterprise AI tier. The open edition exposes AI only via MCP (BYO-AI).**
10+
<Callout type="info">
11+
**The open framework does AI bring-your-own-AI** — your keys, your models, zero platform AI cost. Everything on this page is part of the open edition unless a section is explicitly marked **cloud / Enterprise**:
1212

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.
13+
- **Data & actions → `@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.
14+
- **Knowledge & RAG → the Knowledge Protocol + adapter plugins** (`knowledge-memory`, `knowledge-ragflow`, `embedder-openai`) — permission-aware retrieval over your own objects.
15+
- **Agents, tools, skills → typed metadata** (`defineAgent` / `defineTool` / `defineSkill`) plus the Model Registry. Author them as source (`*.agent.ts`, `*.tool.ts`, …) with your own AI coding agent (Claude Code, Cursor), aided by the ObjectStack [skills](/docs/ai/skills-reference) and MCP introspection.
1416

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](/docs/ai/skills-reference) 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.
17+
The **cloud / Enterprise** tier adds an in-product chat *runtime* on top of these same primitives — the `ask` data-query assistant, the `build` Studio authoring assistant, and the `/api/v1/ai/*` chat endpoints (`@objectstack/service-ai`, cloud [ADR-0025](https://github.com/objectstack-ai/cloud/blob/main/docs/adr/0025-service-ai-to-cloud-open-mcp-only.md)). The open edition has no built-in in-product chat.
2118
</Callout>
2219

2320
## What's in this module
@@ -28,7 +25,6 @@ Everything below (agents, the `ask` / `build` personas, `@objectstack/service-ai
2825
- [Natural Language Queries](/docs/ai/natural-language-queries) — the built-in data tools that turn questions into ObjectQL
2926
- [AI Skills System](/docs/ai/skills) — structured knowledge modules for AI coding assistants
3027
- [AI Skills Reference](/docs/ai/skills-reference) — the per-skill catalog
31-
- [Chatbot Integration](/docs/ai/chatbot-integration) — wiring `plugin-chatbot` to the framework AI backend
3228
- Spec: [Knowledge Protocol](/docs/protocol/knowledge)
3329
- Schema reference: [AI](/docs/references/ai)
3430

@@ -138,10 +134,19 @@ ObjectStack provides a comprehensive AI platform:
138134
### Complete Sales AI Workflow
139135

140136
Agents are metadata, not classes — there are no `.enrich()` / `.predict()` /
141-
`.query()` methods to call. You invoke an agent over HTTP (the REST chat
142-
endpoint) or, server-side, via `aiService.chatWithTools(...)`. Enrichment,
143-
scoring, and email drafting are implemented as **Actions/Flows exposed as
144-
tools**, and the LLM calls them while reasoning over the conversation.
137+
`.query()` methods to call. Enrichment, scoring, and email drafting are
138+
implemented as **Actions/Flows exposed as tools**, and the LLM calls them while
139+
reasoning over the conversation. In the **open edition**, your own AI reaches
140+
those same tools over MCP (`@objectstack/mcp`), and you drive them on a trigger
141+
or schedule from a [Flow or Workflow](/docs/automation).
142+
143+
<Callout type="info">
144+
**Cloud / Enterprise runtime.** The in-product chat invocation shown below — the
145+
REST chat endpoint (`/api/v1/ai/agents/:agentName/chat`) and the server-side
146+
`aiService.chatWithTools(...)` — is the `@objectstack/service-ai` chat runtime,
147+
which ships in the **cloud / Enterprise** tier. The agent, tool, and skill
148+
*metadata* it consumes is open; only this in-product chat runtime is not.
149+
</Callout>
145150

146151
```typescript
147152
// Invoke an agent over the REST chat endpoint.

0 commit comments

Comments
 (0)