Template: Legal Assistant
Overview
섹션 제목: “Overview”The Legal Assistant template creates a Korean legal Q&A agent that searches statutes, precedents, and administrative rules via Schift’s public bucket.
No document upload needed. No law data to manage. Just deploy and ask.
Quick Start
섹션 제목: “Quick Start”npx create-schift my-legal-bot --template legal-assistantcd my-legal-botnpx schift auth login # browser opens, one clicknpm startLegal Assistant ready. Type your question (Ctrl+C to exit).
You: 근로기준법에서 출산휴가 기간이 어떻게 되나요?
Agent: 근로기준법 제74조에 따르면, 사용자는 임신 중의 여성에게 출산 전과 출산 후를 통하여 90일의 출산전후휴가를 주어야 합니다... [출처: 근로기준법 제74조 제1항]What’s Included
섹션 제목: “What’s Included”my-legal-bot/ src/agent.ts # Agent + RAG configuration schift.config.json # Model, bucket, instructions .env.local.example # API key guide package.json tsconfig.jsonConfiguration
섹션 제목: “Configuration”schift.config.json
섹션 제목: “schift.config.json”{ "name": "my-legal-bot", "template": "legal-assistant", "agent": { "name": "my-legal-bot", "model": "qwen/qwen3.6-plus-preview:free", "instructions": "You are a Korean legal assistant..." }, "rag": { "bucket": "public--korean-law", "topK": 5 }, "llm": { "provider": "openrouter", "baseUrl": "https://openrouter.ai/api/v1" }}LLM Options
섹션 제목: “LLM Options”The template defaults to OpenRouter’s free tier (no API key needed for the LLM). You can switch to any provider:
| Provider | Config |
|---|---|
| OpenRouter (free, default) | No changes needed |
| OpenRouter (paid) | Set LLM_API_KEY in .env.local |
| Schift Cloud | Remove llm section from config |
| Ollama (local) | Set baseUrl to http://localhost:11434/v1 |
Changing the Model
섹션 제목: “Changing the Model”Edit agent.model in schift.config.json:
"model": "gpt-4o-mini"Any OpenAI-compatible model ID works.
How It Works
섹션 제목: “How It Works”- User asks a question
- Agent calls
rag_searchtool (auto-registered from the public bucket) - Schift searches
public--korean-lawfor relevant statutes - Agent generates an answer citing specific articles
The public bucket handles all law data. See Public Buckets for details on lazy indexing and caching.
Customization Ideas
섹션 제목: “Customization Ideas”- Add company documents: Upload internal policies to a private bucket, combine with public law data
- Change instructions: Specialize for employment law, tax law, real estate law, etc.
- Add web search: Enable web search for recent legal news
- Build a web UI: Replace the CLI chat loop with a web interface
Requirements
섹션 제목: “Requirements”- Node.js 18+
- Schift API key (
npx schift auth login)