Self-hosting
Schift 에이전트는 모든 OpenAI 호환 LLM 엔드포인트에 연결할 수 있습니다. 개발 시 로컬 모델을 사용하거나 프로덕션에서 자체 호스팅 모델을 사용할 수 있습니다.
Ollama
섹션 제목: “Ollama”# Ollama 설치curl -fsSL https://ollama.ai/install.sh | sh
# 모델 다운로드ollama pull llama3const agent = new Agent({ name: "Local Agent", instructions: "You are a helpful assistant.", model: "llama3", baseUrl: "http://localhost:11434/v1",});
const result = await agent.run("Hello!");API 키가 필요 없습니다. Ollama는 로컬에서 실행됩니다.
vLLM
섹션 제목: “vLLM”# vLLM 서버 시작python -m vllm.entrypoints.openai.api_server \ --model mistralai/Mistral-7B-Instruct-v0.3 \ --port 8000const agent = new Agent({ name: "vLLM Agent", instructions: "You are a helpful assistant.", model: "mistralai/Mistral-7B-Instruct-v0.3", baseUrl: "http://127.0.0.1:8002/v1",});LiteLLM
섹션 제목: “LiteLLM”LiteLLM은 100개 이상의 LLM 제공자를 위한 OpenAI 호환 프록시를 제공합니다.
litellm --model ollama/llama3 --port 4000const agent = new Agent({ name: "LiteLLM Agent", instructions: "You are a helpful assistant.", model: "ollama/llama3", baseUrl: "http://localhost:4000/v1",});Direct Provider 엔드포인트
섹션 제목: “Direct Provider 엔드포인트”Schift Cloud 라우팅 없이 클라우드 제공자에 직접 연결합니다:
OpenAI
섹션 제목: “OpenAI”const agent = new Agent({ name: "OpenAI Direct", instructions: "...", model: "gpt-4o-mini", baseUrl: "https://api.openai.com/v1", apiKey: process.env.OPENAI_API_KEY,});Anthropic (프록시 경유)
섹션 제목: “Anthropic (프록시 경유)”Anthropic API는 OpenAI 호환이 아닙니다. LiteLLM을 프록시로 사용하세요:
litellm --model anthropic/claude-sonnet-4-6 --port 4000const agent = new Agent({ model: "anthropic/claude-sonnet-4-6", baseUrl: "http://localhost:4000/v1",});모드 혼합
섹션 제목: “모드 혼합”자체 호스팅 LLM을 에이전트에 사용하면서 RAG는 Schift Cloud를 사용할 수 있습니다:
const schift = new Schift({ apiKey: "sch_..." });const rag = new RAG({ bucket: "docs" }, schift.transport);
const agent = new Agent({ name: "Hybrid Agent", instructions: "...", rag, // RAG는 Schift Cloud 경유 model: "llama3", // LLM은 Ollama 경유 baseUrl: "http://localhost:11434/v1",});