Zum Hauptinhalt springen
Alle Konfigurationen werden über .env durchgeführt. Kopieren Sie example.env und füllen Sie Ihre Werte aus:

Konfigurationsebenen

Jede Integration hat eine Konfigurationsebene, die ihre Bedeutung angibt:
Hinweis: Von Administratoren konfigurierte Modelle (Admin → Seite „Modelle”) können LLM-Umgebungsvariablen ersetzen. Die Integritätsprüfung berücksichtigt beide Quellen.

Frontend (Nur lokale Entwicklung)

Das Frontend hat eine separate Env-Datei nur für die lokale Entwicklung: frontend/.env.local.
Diese Datei wird NICHT in Docker verwendet. Innerhalb des Docker-Containers leitet Next.js /api/* intern an das Python-Backend weiter (Port 8000 ist intern im Container), daher ist keine Frontend-Env-Datei erforderlich.
Für die lokale Entwicklung funktionieren die Standardwerte sofort — Sie müssen frontend/.env.local nicht erstellen, es sei denn, Ihr Backend läuft auf einem nicht-standardmäßigen Port. Falls Sie überschreiben müssen, erstellen Sie frontend/.env.local manuell:
Hinweis zur Build-Zeit: NEXT_PUBLIC_*-Variablen werden zur pnpm build-Zeit in das JS-Bundle eingebettet. Das Ändern zur Laufzeit (z. B. über die root .env) hat keine Auswirkung — deshalb befinden sie sich nur für die lokale Entwicklung in 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.

Den ENV-Fallback mit dem Admin-Panel synchron halten

Sobald eine Modellgruppe unter Admin → Modelle aktiv ist, bezieht die Laufzeit ihre Modelle aus dieser Gruppe, und die oben genannten Werte LLM_* / FAST_LLM_* / REASONING_LLM_* dienen nur als Fallback. Nebenpfade, die die Datenbank nie öffnen, lesen diese Werte weiterhin direkt aus: scripts/translate.py (der i18n-Pre-Commit-Hook), evals/, der Jina/OpenAI-Reranker und die Bildgenerierung. Damit diese nicht auf einen veralteten Provider ausweichen, kopieren Sie die aktive Gruppe in die Umgebungsdatei:
Das Skript liest die Provider-Schlüssel über das ORM aus und schreibt sie direkt in die Datei; es wird nichts ausgegeben. Starten Sie die App anschließend neu.

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.

Extended Thinking (Reasoning)

Wenn LLM_REASONING_EFFORT gesetzt ist, aktiviert FIM One die Extended-Thinking-Funktion des Modells, sodass die interne Gedankenkette im UI-Schritt “thinking” angezeigt wird. FIM One verwendet LiteLLM, um den Reasoning-Effort-Parameter automatisch in das native Format jedes Anbieters zu übersetzen.

Unterstützte Anbieter

Welche Anbieter Thinking akzeptieren, wie jeder einzelne aktiviert wird, welche effort-Werte er annimmt und wo der Reasoning-Text endet, wird einmalig mit Code-Ankern in Tabelle C der Provider Capability Matrix dokumentiert. Diese Tabelle ist die autoritative Liste; diese Seite dokumentiert nur die Variablen. FIM One löst den Anbieter aus LLM_BASE_URL auf (plus ein explizites Anbieterfeld, wenn eines konfiguriert ist) und ordnet die Anfrage dem korrekten API-Format zu. Unbekannte URLs werden als OpenAI-kompatibel behandelt.

Wichtige Einschränkungen

Third-Party-Proxies / benutzerdefinierte Endpunkte sind nicht garantiert. Wenn Ihr LLM_BASE_URL auf einen Third-Party-API-Proxy verweist (z. B. OpenRouter, one-api, benutzerdefiniertes Gateway), wird LiteLLM versuchen, basierend auf der URL korrekt weiterzuleiten. Wenn Ihr Proxy jedoch ein nicht standardisiertes Format erwartet, funktioniert das Reasoning möglicherweise nicht wie erwartet. Konsultieren Sie die Dokumentation des Proxys für das erwartete Parameterformat.

Temperatureinschränkungen mit Reasoning

Einige Anbieter schränken temperature ein, wenn Reasoning aktiv ist. Alle diese Einschränkungen werden automatisch durchgesetzt; lassen Sie LLM_TEMPERATURE bei dem Wert, der zu Ihrer Workload passt.
  • Anthropic: erfordert temperature=1 während Extended Thinking aktiviert ist. Der Request Builder setzt den Wert auf Anthropic-Routen fest, sodass Ihre konfigurierte Temperatur für diese Aufrufe überschrieben wird, anstatt abgelehnt zu werden.
  • Anthropic, strikte Modelle (Opus 4.7 und 4.8, Fable 5, Mythos 5): lehnen temperature, top_p und top_k grundsätzlich ab, unabhängig von Thinking. FIM One entfernt temperature aus dem Request für diese Modelle.
  • OpenAI GPT-5.x: unterstützt nur temperature=1. Das drop_params-Filtering von LiteLLM entfernt nicht unterstützte Werte.
Das manuelle Setzen von LLM_TEMPERATURE=1 zur Erfüllung von Anthropic-Anforderungen ist unnötig und kostet Sie die Möglichkeit, eine niedrigere Temperatur bei jedem Nicht-Thinking-Aufruf zu verwenden.

Wie LLM_REASONING_BUDGET_TOKENS funktioniert

Diese Variable ist nur auf dem Legacy-Anthropic-Thinking-Pfad sinnvoll (Claude 4.5 und älter, geroutet als anthropic/). Dort überschreibt sie das automatisch berechnete Budget und wird als budget_tokens innerhalb des thinking-Parameters gesendet. Adaptive-Thinking-Modelle (Opus 4.6 und neuer, Sonnet 4.6, Fable 5, Mythos 5) verwenden stattdessen eine Anstrengungsstufe und ignorieren diese Variable vollständig. Wenn sie nicht gesetzt ist, wird das Budget aus LLM_MAX_OUTPUT_TOKENS × Anstrengungsverhältnis abgeleitet: Das Mindestbudget beträgt 1.024 Token (Anthropics hartes Minimum). Für OpenAI und Gemini verwaltet der Provider die Token-Zuweisung intern basierend auf der reasoning_effort-Stufe — LLM_REASONING_BUDGET_TOKENS hat keine Auswirkung.

Agent-Ausführung

ReAct Agent

DAG Planner

Domain-Klassifizierung

Steuert die unabhängige LLM-basierte Domain-Erkennungsschicht, die vor der ReAct- und DAG-Ausführung ausgeführt wird. Wenn eine Abfrage als spezialisierte Domain klassifiziert wird, aktiviert das System Domain-bewusste Funktionen: Modellsteigerung auf Reasoning-Modell, Domain-spezifische SOP-Anweisungen und Zitierverifikation (nur DAG).

Context Guard

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

Content Guardrails

Kommagetrennte Namen von Guardrails, die den Inhalt von Ein- oder Ausgabe überprüfen. Unabhängig vom Tool-Berechtigungsgate (core/hooks/*) und der Sicherheitsschicht (core/security/*). Siehe Content Guardrails für das vollständige Bild.

Agent-Arbeitsbereich

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 & Wissensdatenbank (Empfohlen)

Embedding

Embedding konvertiert Text in Vektoren für die Wissensdatenbank-Suche. FIM One verwendet den Standard-OpenAI-kompatiblen /v1/embeddings-Endpunkt, daher funktioniert er mit jedem Anbieter, der diese Schnittstelle bereitstellt — nicht nur Jina. Anbieterbeispiele — setzen Sie einfach die drei Variablen, um zu wechseln:
Das Ändern des Embedding-Modells oder der Dimension macht alle vorhandenen Wissensdatenbank-Vektoren ungültig. Alte Vektoren wurden in einem anderen Embedding-Raum berechnet — die Abrufgenauigkeit wird sich unmerklich verschlechtern. Sie müssen alle Wissensdatenbank-Indizes neu erstellen, nachdem Sie gewechselt haben.

Abruf

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.

Vektorspeicher


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).

Dokumentverarbeitung (Optional)

Steuert, wie hochgeladene PDF-/DOCX-Dateien für die LLM-Verarbeitung verarbeitet werden. Vision-fähige Modelle (GPT-4o, Claude 3/4, Gemini) können PDF-Seiten als gerenderte Bilder für höhere Genauigkeit empfangen.
Hinweis: Die Vision-Unterstützung pro Modell wird über den supports_vision-Schalter in Admin → Models konfiguriert. Wenn nicht explizit festgelegt, erkennt das System die Vision-Fähigkeit automatisch anhand des Modellnamens.

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.

Workflow Run Retention

Background cleanup task that automatically purges old workflow runs. Per-workflow overrides (configured in the workflow settings UI) take priority over these global defaults.

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-Callback-URLs zum Registrieren bei jedem Anbieter

Das Backend konstruiert Callback-URLs als: {API_BASE_URL}/api/auth/oauth/{provider}/callback

Cloudflare Tunnel (Optional)

Leiten Sie den gesamten Datenverkehr über Cloudflares Netzwerk um, anstatt Ports direkt freizulegen. Eliminiert die Notwendigkeit für Nginx, SSL-Zertifikate und offene Firewall-Regeln. Siehe den Abschnitt Production Deployment für Setupanweisungen.
Benutzer in Festlandchina: Cloudflare Free/Pro/Business-Pläne haben keine PoPs in Festlandchina. Der Datenverkehr wird zu Overseas-Edges weitergeleitet, was häufig zu 502-Fehlern führt. Verwenden Sie dies nicht, wenn Ihre primären Benutzer in Festlandchina sind, es sei denn, Sie haben Cloudflare Enterprise mit China Network.

Analytics (Optional)

Alle Analytics-Anbieter sind optional. Legen Sie eine beliebige Kombination fest — alle aktiven Anbieter werden gleichzeitig geladen. Lassen Sie alle leer, um Analytics vollständig zu deaktivieren (empfohlen für lokale Entwicklung).
Alle NEXT_PUBLIC_* Analytics-Variablen sind Build-Zeit — Änderungen erfordern einen Frontend-Rebuild, um wirksam zu werden.

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.