Public Buckets
What are Public Buckets?
Section titled “What are 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 dataAvailable Public Buckets
Section titled “Available Public Buckets”| Bucket ID | Source | Coverage |
|---|---|---|
public--korean-law | korean-law-mcp | Korean 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 directlyconst results = await rag.search("근로기준법 출산휴가");
// Or use with an agentconst 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("출산휴가 기간이 어떻게 되나요?");How It Works
Section titled “How It Works”Public buckets use lazy indexing. When you search for a law:
- Schift checks if the law is already indexed
- If yes: instant vector search (sub-300us)
- If no: fetches from the source, embeds, indexes, then returns results
- Next search for the same law: instant cache hit
Major laws (30+) are pre-warmed. Less common laws are indexed on first access.
Billing
Section titled “Billing”| What | Who Pays |
|---|---|
| Search | You (Search axis) |
| Indexing & storage | Schift (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.
Quick Start: Legal Assistant Template
Section titled “Quick Start: Legal Assistant Template”The fastest way to build on public buckets:
npx create-schift my-legal-bot --template legal-assistantcd my-legal-botnpx schift auth loginnpm startSee the Legal Assistant template guide for details.
Listing Public Buckets
Section titled “Listing Public Buckets”curl https://api.schift.io/v1/public-buckets \ -H "Authorization: Bearer sch_..."[ { "id": "public--korean-law", "source": "korean-law-mcp", "status": "ready" }]Combining with Private Data
Section titled “Combining with Private Data”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.", ...});