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" }) -> hosted API -> 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 { 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 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: client.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 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.

Use the canonical Python CLI to verify the public bucket before wiring an app:

Terminal window
python3 -m pip install schift-cli
export SCHIFT_API_KEY=sch_...
export SCHIFT_API_URL=https://api.example.com/v1
schift search "근로기준법 출산휴가" --bucket public--korean-law --top-k 5

Then use the SDK example above when you are ready to embed the same bucket in an agent.

Terminal window
curl "$API_BASE_URL/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" }, 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.",
...
});