Skip to content

Public Buckets

Public buckets are globally shared, read-only indexes maintained by Schift. They contain pre-indexed public data that any Schift user can search instantly — no document upload required.

Your Agent -> RAG({ bucket: "public--korean-law" }) -> Schift Cloud -> pre-indexed law data
Bucket IDSourceCoverage
public--korean-lawkorean-law-mcpKorean statutes, precedents, administrative rules

Public buckets work exactly like regular buckets. Just use the public bucket ID:

import { Schift, RAG, Agent } from "@schift-io/sdk";
const schift = new Schift({ apiKey: "sch_..." });
const rag = new RAG(
{ bucket: "public--korean-law", topK: 5 },
schift.transport,
);
// Search directly
const results = await rag.search("근로기준법 출산휴가");
// Or use with an agent
const agent = new Agent({
name: "Legal Assistant",
instructions: "Answer Korean legal questions. Cite specific article numbers.",
model: "gpt-4o-mini",
transport: schift.transport,
rag,
});
const answer = await agent.run("출산휴가 기간이 어떻게 되나요?");

Public buckets use lazy indexing. When you search for a law:

  1. Schift checks if the law is already indexed
  2. If yes: instant vector search (sub-300us)
  3. If no: fetches from the source, embeds, indexes, then returns results
  4. Next search for the same law: instant cache hit

Major laws (30+) are pre-warmed. Less common laws are indexed on first access.

WhatWho Pays
SearchYou (Search axis)
Indexing & storageSchift (free)
LLM (if using Schift routing)You (LLM axis)
LLM (BYOK)You (directly to provider)

You only pay for search and execution. Schift absorbs all indexing and storage costs for public buckets.

The fastest way to build on public buckets:

Terminal window
npx create-schift my-legal-bot --template legal-assistant
cd my-legal-bot
npx schift auth login
npm start

See the Legal Assistant template guide for details.

Terminal window
curl https://api.schift.io/v1/public-buckets \
-H "Authorization: Bearer sch_..."
[
{
"id": "public--korean-law",
"source": "korean-law-mcp",
"status": "ready"
}
]

Use public and private buckets together for cross-reference:

const lawDocs = new RAG({ bucket: "public--korean-law" }, schift.transport);
const companyDocs = new RAG({ bucket: "my-company-policies" }, schift.transport);
const agent = new Agent({
tools: [
lawDocs.asTool("search_korean_law"),
companyDocs.asTool("search_company_policies"),
],
instructions: "Compare company policies against Korean law. Flag any conflicts.",
...
});