Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .doc-bridge/capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"name": "AgentsKit",
"root": "."
},
"contentHash": "d52ecd9dd5e5571c517fa610b57907ef984d513558e2b59b23d1705b9da1e247",
"contentHash": "a70e2b13699e21d871de648658aebb949e37a95e59732c38647287794e0aec03",
"artifacts": {
"index": ".doc-bridge/index.json",
"llmsTxt": ".doc-bridge/llms.txt"
Expand Down
484 changes: 445 additions & 39 deletions .doc-bridge/index.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@ jobs:

- name: Build the production docs app for docs E2E
run: pnpm --filter @agentskit/docs-next build
env:
NEXT_PUBLIC_ASK_ENDPOINT: https://ask.e2e.invalid/v1/ask

- name: Build the production Registry app for Registry E2E
run: pnpm --filter @agentskit/registry-app build
env:
NEXT_PUBLIC_ASK_ENDPOINT: https://ask.e2e.invalid/v1/ask

- run: pnpm exec playwright test

Expand Down
6 changes: 4 additions & 2 deletions apps/ask-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,16 @@ In the Railway dashboard:
is also accepted by the rate limiter; use `?family=0` for Railway private
networking when needed), optional `UPSTASH_REDIS_REST_URL` +
`UPSTASH_REDIS_REST_TOKEN` fallback, `ASK_CORS_ORIGINS`.
4. **Networking → Custom Domain** = `ask.agentskit.io`.
4. **Networking → Domain**: use the Railway-generated domain (or your own custom
domain). The retired `ask.agentskit.io` host no longer resolves.

The Dockerfile installs the workspace + builds the backend's lib closure; start =
`pnpm --filter @agentskit/ask-backend start` (tsx). The persistent process means the
model loads once at boot and stays warm — the writable Railway filesystem caches it
(no `/tmp` hack needed; the Vercel-specific cache override doesn't fire here).

Then point each site's chat widget at `https://ask.agentskit.io/v1/ask?corpus=<id>`.
Then set `NEXT_PUBLIC_ASK_ENDPOINT=https://<your-backend-host>/v1/ask` for each
site. The Ask widgets stay disabled until it is set.

## Runtime configuration

Expand Down
4 changes: 3 additions & 1 deletion apps/docs-next/app/(home)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import type { ReactNode } from 'react'
import { baseOptions } from '../layout.config'
import { AskDocsWidget } from '@/components/docs/ask-widget'

const askEndpoint = process.env.NEXT_PUBLIC_ASK_ENDPOINT

export default function Layout({ children }: { children: ReactNode }) {
return (
<HomeLayout {...baseOptions}>
{children}
{/* Surface the Ask-the-docs example without covering the home content. */}
<AskDocsWidget />
{askEndpoint ? <AskDocsWidget endpoint={askEndpoint} /> : null}
</HomeLayout>
)
}
4 changes: 3 additions & 1 deletion apps/docs-next/app/docs/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import { source } from '@/lib/source'
import { baseOptions } from '../layout.config'
import { AskDocsWidget } from '@/components/docs/ask-widget'

const askEndpoint = process.env.NEXT_PUBLIC_ASK_ENDPOINT

export default function Layout({ children }: { children: ReactNode }) {
return (
<DocsLayout tree={source.pageTree} {...baseOptions}>
{children}
<AskDocsWidget />
{askEndpoint ? <AskDocsWidget endpoint={askEndpoint} /> : null}
</DocsLayout>
)
}
5 changes: 3 additions & 2 deletions apps/registry/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
# Optional local/preview override for the generated Registry JSON payloads.
REGISTRY_DATA_BASE=https://raw.githubusercontent.com/AgentsKit-io/agentskit-registry/main/public/r

# Optional. Defaults to the hosted Ask service; corpus=registry is added by the host adapter.
NEXT_PUBLIC_ASK_ENDPOINT=https://ask.agentskit.io/v1/ask
# Optional. URL of your Ask backend (apps/ask-backend), e.g. https://<your-backend-host>/v1/ask.
# corpus=registry is added by the host adapter. The Ask widget is disabled when unset.
NEXT_PUBLIC_ASK_ENDPOINT=
3 changes: 2 additions & 1 deletion apps/registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ pnpm --filter @agentskit/registry-app build
The floating **Ask Registry** surface consumes the stable npm package
`@agentskit/chat` at exact version `0.4.1`, using its `/protocol` and `/react`
subpaths. This app owns only the `registry` corpus,
`NEXT_PUBLIC_ASK_ENDPOINT`, Registry branding, CTA, and React slots. AgentsKit
`NEXT_PUBLIC_ASK_ENDPOINT` (the widget is disabled when unset), Registry
branding, CTA, and React slots. AgentsKit
Chat owns the Ask wire contract, streaming adapter, ordered content, standard
`source-list`, memory migration, and application shell. AgentsKit owns
controller lifecycle, messages, cancellation, retry, edit, and regenerate.
Expand Down
6 changes: 5 additions & 1 deletion apps/registry/components/ask-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ function RegistryComponent(props: StandardComponentProps) {
}

export function RegistryAskWidget() {
const endpoint = process.env.NEXT_PUBLIC_ASK_ENDPOINT
return endpoint ? <ConfiguredRegistryAskWidget endpoint={endpoint}/> : null
}

function ConfiguredRegistryAskWidget({ endpoint }: { readonly endpoint: string }) {
const [open, setOpen] = useState(false)
const [discovery, setDiscovery] = useState<RegistryDiscoveryInputs | null | undefined>(undefined)
// True while local knowledge is being (re)loaded. The chat stays unmounted meanwhile: a question
Expand All @@ -135,7 +140,6 @@ export function RegistryAskWidget() {
const fabRef = useRef<HTMLButtonElement>(null)
const panelRef = useRef<HTMLElement>(null)
const openedOnceRef = useRef(false)
const endpoint = process.env.NEXT_PUBLIC_ASK_ENDPOINT ?? 'https://ask.agentskit.io/v1/ask'
const ensureDiscovery = useCallback(() => {
if (discovery || discoveryPromiseRef.current) return discoveryPromiseRef.current
if (discovery === null && Date.now() - discoveryFailureAtRef.current < DISCOVERY_RETRY_DELAY_MS) return null
Expand Down
4 changes: 2 additions & 2 deletions readme-standard-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2538,7 +2538,7 @@
"ecosystem-claims.json",
"scripts/readme-fixtures.test.mjs"
],
"sourceHash": "sha256:b5351c285010603f2c8193998bfed340ad8747e0dc0b7cca713dead7b2429868"
"sourceHash": "sha256:ae3a6ce70634a4b54ad19ef9e23a993401fe46fbc6a6e434a22dc175304f6d06"
},
"exceptions": []
},
Expand Down Expand Up @@ -2613,7 +2613,7 @@
"ecosystem-claims.json",
"scripts/readme-fixtures.test.mjs"
],
"sourceHash": "sha256:12ee47f3cdfa7eae10f236952da9102d747fe3a9514467ba7a7274d8b7b3bb0c"
"sourceHash": "sha256:f9efa39c13d975a8a8a30623b8d63537ce18bd1122c92480201fee7e5fde084d"
},
"exceptions": []
}
Expand Down
4 changes: 4 additions & 0 deletions rfcs/0007-central-ask-backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
- **Related RFCs**: [0002](./0002-agent-registry-and-ecosystem-cohesion.md) (ecosystem cohesion), [0006](./0006-ui-component-registry.md) (the chat as a component; `createAskHandler` D5)
- **Related**: the live Ask-the-docs chat (`apps/docs-next/lib/ask/*`), the registry MCP (`apps/registry/app/api/mcp`)

> **Update 2026-10-21**: the `ask.agentskit.io` host referenced below is retired and its
> DNS removed. Sites now take the backend URL from `NEXT_PUBLIC_ASK_ENDPOINT`; the Ask
> widgets are disabled until it is set.

## Summary

Move the AgentsKit AI/RAG workload off Vercel serverless into **one persistent
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/docs-deterministic-chat.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test.afterAll(async () => {

test('docs chat answers locally, then escalates an unknown query with context intact', async ({ page }) => {
const backendBodies: unknown[] = []
await page.route('https://ask.agentskit.io/v1/ask', async route => {
await page.route('https://ask.e2e.invalid/v1/ask', async route => {
backendBodies.push(route.request().postDataJSON())
await route.fulfill({ status: 200, contentType: 'text/plain', body: 'Backend grounded answer.' })
})
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/registry-deterministic-chat.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test.beforeEach(async ({ page }) => {

test('Registry answers exact facts locally and escalates semantic recommendations with context', async ({ page }) => {
const backendBodies: unknown[] = []
await page.route('https://ask.agentskit.io/v1/ask?corpus=registry', async (route) => {
await page.route('https://ask.e2e.invalid/v1/ask?corpus=registry', async (route) => {
backendBodies.push(route.request().postDataJSON())
await route.fulfill({
status: 200,
Expand Down Expand Up @@ -76,7 +76,7 @@ test('Registry retries local knowledge and never labels a failed backend respons
await route.continue()
}
})
await page.route('https://ask.agentskit.io/v1/ask?corpus=registry', async (route) => {
await page.route('https://ask.e2e.invalid/v1/ask?corpus=registry', async (route) => {
await route.fulfill({
status: 200,
contentType: 'application/x-ndjson',
Expand Down
Loading