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" }) -> hosted API -> 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 { WorkspaceClient, RAG, Agent } from "@schift-io/sdk";
const client = new WorkspaceClient({ apiKey: "sch_..." });const rag = new RAG( { bucket: "public--korean-law", topK: 5 }, client.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: client.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 hosted 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: Search From The CLI
Section titled “Quick Start: Search From The CLI”Use the canonical Python CLI to verify the public bucket before wiring an app:
python3 -m pip install schift-cliexport SCHIFT_API_KEY=sch_...export SCHIFT_API_URL=https://api.example.com/v1schift search "근로기준법 출산휴가" --bucket public--korean-law --top-k 5Then use the SDK example above when you are ready to embed the same bucket in an agent.
Listing Public Buckets
Section titled “Listing Public Buckets”curl "$API_BASE_URL/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" }, client.transport);const companyDocs = new RAG({ bucket: "my-company-policies" }, client.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.", ...});