메인 콘텐츠로 건너뛰기
모든 구성은 .env를 통해 수행됩니다. example.env를 복사하고 값을 입력하세요:

설정 수준

각 통합에는 중요도를 나타내는 설정 수준이 있습니다:
참고: 관리자가 설정한 모델(관리자 → 모델 페이지)은 LLM 환경 변수를 대체할 수 있습니다. 상태 확인은 두 소스를 모두 고려합니다.

프론트엔드 (로컬 개발 전용)

프론트엔드에는 로컬 개발 전용 별도의 env 파일이 있습니다: frontend/.env.local.
이 파일은 Docker에서 사용되지 않습니다. Docker 컨테이너 내에서 Next.js는 /api/*를 Python 백엔드로 내부적으로 프록시합니다 (포트 8000은 컨테이너 내부용이므로), 프론트엔드 env 파일이 필요하지 않습니다.
로컬 개발의 경우 기본값이 그대로 작동합니다 — 백엔드가 기본이 아닌 포트에서 실행되지 않는 한 frontend/.env.local을 생성할 필요가 없습니다. 필요한 경우 frontend/.env.local을 수동으로 생성하여 재정의할 수 있습니다:
빌드 타임 참고: NEXT_PUBLIC_* 변수는 pnpm build 시점에 JS 번들에 포함됩니다. 런타임에 변경하는 것(예: 루트 .env를 통해)은 효과가 없습니다 — 이것이 로컬 개발 전용으로 frontend/.env.local에 있는 이유입니다.

LLM (Required)

Resolution order: User Preference → Admin Models (DB) → ENV Fallback. If an admin model with role “General” is configured in Admin → Models, these ENV vars serve as fallback only. The health check considers both sources.

관리자 패널의 ENV fallback을 최신 상태로 유지하기

Admin → Models에서 모델 그룹이 활성화되면 런타임은 해당 그룹에서 모델을 가져오며, 위의 LLM_* / FAST_LLM_* / REASONING_LLM_* 값은 fallback으로만 사용됩니다. 데이터베이스를 열지 않는 경로에서는 여전히 해당 값을 직접 읽습니다. 여기에는 scripts/translate.py(i18n pre-commit hook), evals/, Jina/OpenAI reranker, 이미지 생성이 포함됩니다. 이러한 경로가 오래된 provider를 사용하지 않도록 활성 그룹을 env 파일에 복사하세요.
스크립트는 ORM을 통해 provider 키를 읽고 파일에 직접 기록하며, 어떤 값도 출력하지 않습니다. 이후 앱을 다시 시작하세요.

MarkItDown OCR Resolution

The convert_to_markdown built-in tool and the RAG ingestion pipeline both use Microsoft’s MarkItDown + the official markitdown-ocr plugin to extract text from documents — including OCR on embedded images and scanned PDF pages when a vision-capable LLM is available. The tool reads two kinds of source: a file the calling user uploaded, named by its file_id, and an http:// or https:// URL. URLs are downloaded with the same restrictions as web_fetch and http_request (no private, loopback, link-local or metadata addresses, redirects included). Local paths, file://, data: and other schemes are refused. Vision LLM resolution order (first match wins): Reasoning models are never preferred for OCR. Reasoning tiers (o1, o3-mini, DeepSeek-R1) historically lack vision support and are the wrong tool for OCR anyway — OCR is a perception task, not deliberation. If a workspace has only a reasoning model with supports_vision=True it will still be picked up via the primary-LLM path, but the resolver does not actively rank it above fast/general. Zero-regression fallback: when no vision-capable model is found at any level, OCR is silently disabled and MarkItDown runs in text-only mode. Word/PowerPoint/Excel embedded-image OCR becomes unavailable (same as before this feature shipped), but all other text extraction (headings, tables, paragraph text) continues to work unchanged. There is never a case where adding this feature made extraction worse than the previous behavior. Non-OpenAI providers (Anthropic, Google Gemini, etc.) are supported transparently: the resolved LLM is wrapped in a LiteLLMOpenAIShim that routes chat.completions.create(...) calls through litellm.completion(), which handles the provider-specific message format translation (e.g. Anthropic’s source.type="base64" image block). One shim covers every provider LiteLLM supports — adding a new provider costs zero code changes in FIM One.

확장 사고 (추론)

LLM_REASONING_EFFORT가 설정되면 FIM One은 모델의 확장 사고 기능을 활성화하여 내부 사고의 연쇄가 UI의 “thinking” 단계에 표시됩니다. FIM One은 LiteLLM을 사용하여 추론 노력 매개변수를 각 제공자의 기본 형식으로 자동으로 변환합니다.

지원되는 제공자

어떤 제공자가 thinking을 수용하는지, 각각을 어떻게 활성화하는지, 어떤 effort 값을 사용하는지, 그리고 reasoning 텍스트가 어디에 끝나는지는 Provider Capability Matrix의 표 C에 코드 앵커와 함께 한 번만 기록됩니다. 그 표가 권위 있는 목록이며, 이 페이지는 변수만 문서화합니다. FIM One은 LLM_BASE_URL에서 제공자를 해석하고(구성된 경우 명시적 제공자 필드 포함) 요청을 올바른 API 형식으로 매핑합니다. 알 수 없는 URL은 OpenAI 호환으로 처리됩니다.

중요한 주의사항

타사 프록시 / 사용자 정의 엔드포인트는 보장되지 않습니다. LLM_BASE_URL이 타사 API 프록시(예: OpenRouter, one-api, 사용자 정의 게이트웨이)를 가리키는 경우, LiteLLM은 URL을 기반으로 올바르게 라우팅하려고 시도합니다. 그러나 프록시가 비표준 형식을 예상하는 경우 추론이 예상대로 작동하지 않을 수 있습니다. 프록시의 예상 매개변수 형식에 대해서는 프록시의 설명서를 참조하세요.

추론을 사용할 때의 온도 제약

일부 제공자는 추론이 활성화되었을 때 temperature를 제한합니다. 이러한 제약은 모두 자동으로 적용되므로 LLM_TEMPERATURE는 워크로드에 맞는 값으로 설정하면 됩니다.
  • Anthropic: 확장 사고가 활성화되어 있을 때 temperature=1을 요구합니다. 요청 빌더가 Anthropic 경로에서 값을 고정하므로 요청이 거부되지 않고 설정된 온도가 해당 호출에 대해 재정의됩니다.
  • Anthropic, 엄격한 모델(Opus 4.7 및 4.8, Fable 5, Mythos 5): 사고 여부와 관계없이 temperature, top_p, top_k를 완전히 거부합니다. FIM One은 이러한 모델에 대해 요청에서 temperature를 제거합니다.
  • OpenAI GPT-5.x: temperature=1만 지원합니다. LiteLLM의 drop_params 필터링이 지원되지 않는 값을 제거합니다.
Anthropic을 만족시키기 위해 LLM_TEMPERATURE=1을 수동으로 설정하는 것은 불필요하며, 사고하지 않는 모든 호출에서 더 낮은 온도를 실행할 수 있는 능력을 잃게 됩니다.

LLM_REASONING_BUDGET_TOKENS 작동 방식

이 변수는 레거시 Anthropic 사고 경로에서만 의미가 있습니다(Claude 4.5 이하, anthropic/으로 라우팅됨). 여기서 자동 계산된 예산을 재정의하고 thinking 매개변수 내에서 budget_tokens로 전송됩니다. 적응형 사고 모델(Opus 4.6 이상, Sonnet 4.6, Fable 5, Mythos 5)은 예산 대신 노력 수준을 사용하며 이 변수를 완전히 무시합니다. 설정되지 않으면 예산은 LLM_MAX_OUTPUT_TOKENS x 노력 비율에서 파생됩니다: 최소 예산은 1,024 tokens입니다(Anthropic의 하드 최소값). OpenAI 및 Gemini의 경우, 제공자가 reasoning_effort 수준에 따라 토큰 할당을 내부적으로 처리합니다 — LLM_REASONING_BUDGET_TOKENS는 효과가 없습니다.

에이전트 실행

ReAct Agent

DAG Planner

도메인 분류

ReAct 및 DAG 실행 이전에 실행되는 독립적인 LLM 기반 도메인 감지 레이어를 제어합니다. 쿼리가 전문 도메인으로 분류되면 시스템은 도메인 인식 기능을 활성화합니다: 추론 모델로의 모델 에스컬레이션, 도메인별 SOP 지침, 인용 검증(DAG만 해당).

Context Guard

Controls the automatic context window management that prevents conversations from exceeding the model’s limit.

Content Guardrails

콘텐츠를 검사하는 가드레일의 쉼표로 구분된 이름입니다. 도구 권한 게이트(core/hooks/*)와 보안 계층(core/security/*)과는 독립적입니다. 전체 그림은 Content Guardrails를 참조하세요.

에이전트 워크스페이스

System

Web Tools (Optional)

Quick start tip: Setting just JINA_API_KEY enables the default web search stack, plus web fetch, embedding, and reranking — one key, four services. Switch search to Tavily, Brave, or Exa with WEB_SEARCH_PROVIDER and the matching API key.

RAG 및 지식 기반 (권장)

임베딩

임베딩은 텍스트를 벡터로 변환하여 지식 기반 검색에 사용합니다. FIM One은 표준 OpenAI 호환 /v1/embeddings 엔드포인트를 사용하므로, Jina뿐만 아니라 이 인터페이스를 제공하는 모든 제공자와 함께 작동합니다. 제공자 예시 — 세 변수를 설정하여 전환하세요:
임베딩 모델 또는 차원을 변경하면 기존의 모든 지식 기반 벡터가 무효화됩니다. 이전 벡터는 다른 임베딩 공간에서 계산되었으므로 검색 정확도가 조용히 저하될 것입니다. 전환 후 모든 지식 기반 인덱스를 다시 구축해야 합니다.

검색

Reranker

Reranker re-scores retrieved documents to improve relevance. Three providers are supported — select via RERANKER_PROVIDER or let the system auto-detect from available API keys.
Jina uses JINA_API_KEY (from Web Tools above). OpenAI reuses LLM_API_KEY / LLM_BASE_URL — no extra key needed (OPENAI_API_KEY, when set, takes precedence over LLM_API_KEY for the reranker). Cohere requires its own COHERE_API_KEY.
Reranker is optional — knowledge base search works without it using fusion scoring. Embedding is recommended for knowledge base features.

벡터 저장소


Code Execution

Security: local runs AI-generated code inside the application container, as the application’s user: every user who can use the code tools can read and change what the application can. Its Python restrictions and shell word list are not a security boundary. Use it for single-user or development setups only. The application container is never given the Docker socket; if it can reach a container runtime anyway (a Docker, Podman or containerd socket, or a DOCKER_HOST that is a daemon), local code execution and stdio MCP servers refuse to start. See Security → Code execution and the Docker socket.

Tool Output Truncation

Limits applied to what a built-in tool returns to the model.

Tool Artifacts

Size limits for files produced by tool execution (code execution, template rendering, image generation).

문서 처리 (선택사항)

업로드된 PDF/DOCX 파일이 LLM 사용을 위해 어떻게 처리되는지를 제어합니다. 비전 기능이 있는 모델(GPT-4o, Claude 3/4, Gemini)은 더 높은 충실도를 위해 PDF 페이지를 렌더링된 이미지로 받을 수 있습니다.
참고: 모델별 비전 지원은 관리자 → 모델의 supports_vision 토글을 통해 구성됩니다. 명시적으로 설정되지 않으면 시스템이 모델 이름에서 비전 기능을 자동으로 감지합니다.

Image Generation (Optional)


Used for login codes and email notifications. The email_send built-in tool is offered when SMTP_HOST, SMTP_USER, and SMTP_PASS are set and a recipient allowlist (SMTP_ALLOWED_DOMAINS or SMTP_ALLOWED_ADDRESSES) is configured, or EMAIL_TOOL_ENABLED=true. Without either, any user could mail any address from this account, so the tool is not offered.

Verification code limits

Emailed codes (sign-in, registration, password reset) allow five tries each. These settings bound how many codes are issued and tried; 0 switches a rule off. Counting is done in the database, so the limits hold across workers and under simultaneous requests. Windows are aligned to the clock. Addresses are compared without case and without a trailing dot of the domain (name@example.com. counts as name@example.com). A request over a limit is answered with HTTP 429 (verification_rate_limited) before the address is looked up, so the answer is the same whether or not the address has an account. A signed-in request for a reset code is counted under the account, separately from anonymous requests for the same address. The client address is the one the application server sees: behind a reverse proxy, run the server so that it trusts the proxy’s forwarded address, otherwise all clients share one count. Requests for a sign-in or reset code are answered the same way whether or not the address has an account; a code is mailed only to an active account’s address.

Password sign-in limits

0 switches a rule off. A locked account answers a password attempt exactly as a wrong password does; the lock is written to the server log and to the login history (account_locked_now, then account_locked for each refused attempt). A successful password or emailed-code sign-in, and any password reset (by the user, through the forgotten-password flow or by an administrator), clears the count; signing in with an emailed code is not blocked by a lock.

Connectors


Database connectors on internal networks

A database connector dials the host and port its creator entered, from the application server. So that a connector cannot be pointed at the application’s own database, at other services on the server’s network or at a cloud metadata address, the host is resolved by the application and every address it resolves to must be public. The check runs when a connector is saved, when a connection is tested and each time a connection pool is opened, and the driver then connects to the address that was checked. Private deployments usually do need internal databases. Allow them explicitly:
  • An address or network entry allows a target when all the internal addresses it resolves to fall inside the entry.
  • A host-name entry allows that name as it is typed in the connector, whatever it resolves to. *.suffix matches any name ending in .suffix.
  • A :port suffix limits the entry to that port.
  • The rule applies to every user, administrators included: the allow-list is the one place where internal reach is granted.
  • The hosts of DATABASE_URL and of REDIS_URL (also a ?host= parameter and each host of a multi-host URL) are refused on every port, even when an entry covers them. They are compared by the addresses they resolve to; if one of them cannot be resolved, every database connector is refused and the server log names the host.
  • One entry that cannot be parsed refuses every database connector, public targets included, until it is corrected. Users are told that the setting is invalid; the entry itself is written to the server log.
  • List the networks and hosts your databases are on. An entry such as 0.0.0.0/0 or ::/0 allows every internal address, cloud metadata addresses included, and turns the check off.
After an upgrade, existing connectors that point at internal hosts answer “This database host is on an internal network” until the host is added here and the application restarted. The host field itself takes a bare host name or IP address: no user:password@, port, path or list of hosts.

Platform

Multi-worker checklist (WORKERS>1):
  • Stop (abort streaming) — always works, no extra config needed (signal travels on the same TCP connection).
  • Inject (mid-stream follow-up) — requires REDIS_URL. Without Redis, the inject request may land on a different worker that has no knowledge of the running execution, causing it to silently fail.
  • Production: use PostgreSQL (DATABASE_URL). SQLite’s single-writer lock can cause contention under concurrent writes.
  • Local dev: SQLite + multi-worker is fine for light usage; just add REDIS_URL if you use the inject feature.

Workflow Human Intervention Steps

A Human Intervention (approval) step stops the run until someone decides. The run is stored as waiting and continued when the approval is decided, also after a restart and with several server processes. The step is off unless you enable it.

Workflow Run Recovery

Every server process stamps the runs it is executing. A run still running whose stamp is stale was being executed by a process that no longer exists: it is closed as failed, its open approval requests are closed and its working directory is removed. The same sweep, which also runs at startup, continues waiting runs whose approval was decided or expired while no process was listening.

워크플로우 실행 보관

오래된 워크플로우 실행을 자동으로 정리하는 백그라운드 작업입니다. 워크플로우 설정 UI에서 구성한 워크플로우별 재정의가 이러한 전역 기본값보다 우선합니다.

Audit Record Retention

A daily background sweep removes audit records older than their retention period, in small batches. Every sweep leaves one audit.retention_sweep entry in the audit log with the number of rows removed from each table. With several replicas, one of them sweeps: on PostgreSQL they agree through a session-level advisory lock, so DATABASE_URL must reach the database directly or through a pooler in session mode. Behind a pooler in transaction mode (PgBouncer’s pool_mode = transaction, a Supabase or Neon pooled port) the lock is taken and released on different server sessions; the sweeper then logs a warning and closes the connection. The usage ledger is never swept. The first sweep runs within ten minutes of the first start on a version that has it: set a variable to 0 beforehand to keep older records.

Channel Confirmation Request Expiry

Background sweeper that marks pending approval requests (chat confirmations, workflow approvals, Approval Playground cards) as expired once their own deadline has passed, so a click days later on a forgotten card doesn’t flip agent state that has already been torn down. The TTL applies only to requests recorded before the deadline column existed.

OAuth (Optional)

When both CLIENT_ID and CLIENT_SECRET are set for a provider, the login page automatically shows the corresponding OAuth button.
Prod = optional locally (defaults work), but required for any internet-facing deployment.

각 제공자에 등록할 OAuth 콜백 URL

백엔드는 콜백 URL을 다음과 같이 구성합니다: {API_BASE_URL}/api/auth/oauth/{provider}/callback

Cloudflare Tunnel (선택사항)

Cloudflare의 네트워크를 통해 모든 트래픽을 라우팅하여 포트를 직접 노출하지 않습니다. Nginx, SSL 인증서 및 열린 방화벽 규칙의 필요성을 제거합니다. 설정 지침은 프로덕션 배포 섹션을 참조하세요.
중국 본토 사용자: Cloudflare Free/Pro/Business 플랜은 중국 본토에 PoP가 없습니다. 트래픽이 해외 엣지로 라우팅되어 502 오류가 자주 발생합니다. 중국 네트워크가 있는 Cloudflare Enterprise가 없는 한 주요 사용자가 중국 본토에 있는 경우 이를 사용하지 마세요.

분석 (선택사항)

모든 분석 제공자는 선택사항입니다. 원하는 조합으로 설정하면 모든 활성 제공자가 동시에 로드됩니다. 분석을 완전히 비활성화하려면 모두 비워두세요(로컬 개발에 권장).
모든 NEXT_PUBLIC_* 분석 변수는 빌드 시간 변수입니다 — 변경사항을 적용하려면 프론트엔드를 다시 빌드해야 합니다.

Stripe Billing (Optional)

Stripe powers paid subscriptions. Leave all three variables blank to disable billing — the rest of FIM One works unchanged. Both STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET must be set together; partial config raises an error at first use. Which access posture applies (no subscriptions, included + paid, or paid only) is chosen in the admin panel; see Billing.