Agent and MCP server
The agent is the built-in agent of FINOS Workspace. It runs as two processes: the agent itself, and an MCP server that offers it tools. Both read their settings from the environment. On a local stack, the file agent/.env supplies the settings, and a deployment supplies the same variables through its own configuration. The file agent/.env.example is a template of that file.
Variables
The table lists every variable that the code under agent/src and agent/mcp-server/src reads, in the groups of the registry in agent/src/lib/env-reference.ts. Each row shows which of the two processes reads the variable, its type, its default, the condition under which it is required, and what it does. A variable that takes one of a few values lists them, and a variable that names a model lists the providers that it accepts.
A test reads the source of both processes and fails when the code reads a variable that the registry lacks, when the registry lists a variable that the code does not read, or when an entry has no description. The registry is the only source of this page, so the page cannot describe a variable that does not exist or leave out one that does.
Models and providers
DEFAULT_MODEL<provider>:<model>, with provider "openai" | "openrouter" | "groq" | "nvidia" | "ollama"alwaysThe model that every call of the agent uses unless the user picks another of the offered models in the Workspace: chat, titles, prompt enhancement and table extraction. It is written <provider>:<model>, where <model> is the name that the provider gives it. No model is built into the agent, so a request that names none fails while this is unset. Changing it needs a restart.
AGENT_MODELScomma-separated <provider>:<model>, with provider "openai" | "openrouter" | "groq" | "nvidia" | "ollama"More models that users may choose, comma-separated and written like DEFAULT_MODEL. The agent offers DEFAULT_MODEL and these models and refuses any other, so a user cannot spend the provider keys on a model that the operator did not choose. The roles in the Workspace (Admin, Roles) choose among them.
OPENAI_API_KEYsecretAPI key of OpenAI. With it, models written openai:<model> work, and so do OpenAI transcription models (agent) and embedding models (MCP server). Without a key, the models of that provider are not available.
OPENROUTER_API_KEYsecretAPI key of OpenRouter, which offers Claude, Gemini, DeepSeek and many other models. With it, models written openrouter:<model> work, and so do OpenRouter embedding models (MCP server).
GROQ_API_KEYsecretAPI key of Groq. With it, models written groq:<model> work, and so do Groq transcription models.
NVIDIA_API_KEYsecretAPI key of NVIDIA NIM at integrate.api.nvidia.com. With it, models written nvidia:<model> work, and so do NVIDIA speech models (agent) and embedding models (MCP server).
OLLAMA_BASE_URLurldefault http://localhost:11434/apiAddress of the Ollama API, for models written ollama:<model> (agent) and Ollama embedding models (MCP server). In Docker, use host.docker.internal instead of localhost: inside a container, localhost is the container itself and cannot reach an Ollama on the host.
AGENT_TRANSCRIBE_MODEL<provider>:<model>, with provider "groq" | "openai" | "nvidia"The model that turns a dictated recording into the text of a question, written <provider>:<model>, for example groq:whisper-large-v3-turbo, openai:gpt-4o-mini-transcribe or nvidia:openai/whisper-large-v3. The provider needs its API key. Unset, the chat has no microphone.
AGENT_EMBED_MODEL<provider>:<model>, with provider "openai" | "openrouter" | "nvidia" | "ollama"The embedding model of document search, written <provider>:<model>. The provider needs its API key or, for Ollama, its address. There is no default: unset, the tools query_documents and list_documents are turned off.
AGENT_INLINE_TOOL_CALLS"on" | "off"default onA model without native tool calling writes its calls into its text, as <tool_call>{...}</tool_call>, <function=...> or [TOOL_CALLS]. With on, the agent reads them as tool calls. Only the value off turns this off; any other value leaves it on.
Who can use the agent
AGENT_AUTH"workspace" | "none"default workspaceHow callers are admitted. With workspace, every caller signs in with the Workspace API, which owns the users, their roles and their usage limits. With none, the agent runs without users and counts nothing, which is for a development machine only.
WORKSPACE_API_URLurlwith AGENT_AUTH=workspaceAddress of the Workspace API as the agent and the MCP server reach it, which is not necessarily the address that a browser uses; inside a deployment, it is the address of the API service. Signed file links of the Workspace are fetched through it.
WORKSPACE_ORIGINoriginwith AGENT_AUTH=workspace or WORKSPACE_PUBLIC_URLThe origin of the web app, without a path, for example https://workspace.example.com. Every call to the Workspace API carries it as its Origin, and the API refuses the calls of an origin that it does not allow, so it must be one of the API's BACKEND_CORS_ORIGINS.
WORKSPACE_PUBLIC_URLurlThe address at which browsers reach the Workspace API, without a path, as it appears in the links to uploaded files (/app/files/...). The agent and the MCP server rewrite such a link to WORKSPACE_API_URL and fetch it with WORKSPACE_ORIGIN as its Origin, so that an API on a private network can serve files to them. Unset, those links are fetched like any other address and are refused when it is internal.
AGENT_CORS_ORIGINSlistwith AGENT_AUTH=workspaceThe origins of the web app that may call the agent from a browser, comma-separated, each like https://workspace.example.com. An * allows every origin.
AGENT_METERING_TOKENsecretwith AGENT_AUTH=workspaceThe token with which the agent reports usage to the Workspace API;
python -m scripts.create_metering_tokenin backend-api/backend mints it. It runs out after a year, and the API refuses one that never runs out. Until a new one is set, usage is not counted and the API answers 403.AGENT_SCOPE_SECRETsecretwith AGENT_AUTH=workspaceAt least 16 characters. The secret with which the agent signs the chat scope that the MCP tools receive, and the addresses that the model may fetch. The agent and the MCP server must have the same value; it keeps one user's chat from another's.
AGENT_AUTH_CACHE_SECONDSintegerdefault 30How long, in seconds, a signed-in user is remembered before the Workspace API is asked about them again. The least is 0.
AGENT_FETCH_ANY_URLbooleandefault falseThe tool fetch_webpage fetches only an address that was in the conversation, given by the user or listed by a search, a page or a widget, so that text in a page cannot make the agent fetch an address with the user's data in it. With true, it fetches any address.
Limits
AGENT_MAX_BODY_MBintegerdefault 64The largest request that the agent accepts, in megabytes. The least is 1.
AGENT_MAX_CONCURRENT_QUERIESintegerdefault 4How many questions one user may have running at once. The least is 1.
AGENT_MAX_TOTAL_QUERIESintegerdefault 200How many questions the whole agent runs at once. Past it, the agent answers 503. The least is 1.
AGENT_MAX_TURN_REQUESTSintegerdefault 60How many requests one question may be made of: a turn is several requests, one for each tool that the browser runs. The least is 1.
AGENT_HELPER_CALLS_PER_MINUTEintegerdefault 60How many helper calls, such as titles and rewritten prompts, one user may make in a minute. The least is 1.
AGENT_INVALID_REQUESTS_PER_MINUTEintegerdefault 20How many requests that are not questions (not JSON, or of the wrong shape) one user may send in a minute. Past it, their questions are turned away unread. The least is 1.
LLM_STREAM_TIMEOUT_MSintegerdefault 240000How long, in milliseconds, a model call may take before the agent stops it. A value that is not a number, or is 0, leaves the default.
AGENT_SQL_TIMEOUT_MSintegerdefault 10000How long, in milliseconds, one SQL query on the data of a chat may run before the agent stops it. A value below 100 leaves the default.
AGENT_ISOLATED_CONCURRENCYintegerdefault 4How many child processes may run at once for work on a stranger's bytes: SQL, spreadsheets, PDF and Word text, and web pages. A value that is not a number, or is 0, leaves the default; a smaller number than 1 counts as 1.
AGENT_INGEST_CHUNKS_PER_HOURintegerdefault 20000How many chunks of documents one chat may add to document search in an hour. A value that is not a positive number leaves the default.
AGENT_SHUTDOWN_GRACE_SECONDSintegerdefault 25How long, in seconds, the agent waits for the questions in progress to finish after it is told to stop, before it exits.
Processes and storage
PORTintegerdefault 7777The port on which the agent listens.
MCP_PORTintegerdefault 8787The port on which the MCP server listens.
MCP_PUBLIC_BASE_URLurldefault http://127.0.0.1:<MCP_PORT>The address at which browsers reach the MCP server, which it gives to the Workspace tabs that connect to its bridge.
MCP_BRIDGE_COMMAND_TIMEOUT_MSintegerdefault 15000How long, in milliseconds, the MCP server waits for a Workspace tab to answer a bridge command.
COMPANION_TOOLS_ENABLEDbooleandefault falseWith true, the MCP server offers the tools, prompts and app-builder resources that drive a Workspace browser tab through its bridge at /bridge/ws. Any other value leaves them off.
REDIS_URLurlA Redis or Valkey address, for example redis://valkey:6379. What the agent keeps between the requests of one turn (who is signed in, how much of a user's share is left, which turn is under way, a chat's rows), and what the MCP server keeps for the documents of a chat, lives there when this is set and in the process when it is not. Shared, every replica gives the same answer; without it, run one replica, and a chat's tables are not kept.
Logs, metrics and traces
NODE_ENVstringWith production, logs default to level info in JSON, and LIVE_DEBUG_TRACES is ignored unless AGENT_ALLOW_DEBUG_TRACES is true. Any other value, or none, selects the defaults of development: level debug and the pretty format.
LOG_LEVEL"trace" | "debug" | "info" | "warning" | "error" | "fatal"default info in production, otherwise debugThe least severe level that is logged, whatever the case; the value warn is accepted as warning. Logs go to stdout, cleaned of secrets, session tokens, file bytes, signed file URLs and email addresses.
LOG_FORMAT"json" | "pretty"default json in production, otherwise prettyThe format of the logs, whatever the case: one JSON object per line, or text for a person to read.
AGENT_METRICS_PORTintegerdefault 9464The port on which the agent serves its Prometheus metrics at /metrics. The port is not published by the deployment. The value 0 turns the metrics off.
MCP_METRICS_PORTintegerdefault 9465The port on which the MCP server serves its Prometheus metrics at /metrics. The value 0 turns the metrics off.
OTEL_EXPORTER_OTLP_ENDPOINTurlThe base address of an OpenTelemetry collector. With it, the agent exports its traces to <address>/v1/traces. Without it, and without the other trace settings, tracing is off.
OTEL_EXPORTER_OTLP_TRACES_ENDPOINTurlThe full address that traces are exported to. It takes the place of OTEL_EXPORTER_OTLP_ENDPOINT for traces.
OTEL_TRACES_CONSOLEbooleandefault falseWith true, the agent prints its spans to the console. Any other value leaves this off.
OTEL_RECORD_PROMPTSbooleandefault falseWith true, the traces of the agent contain the prompts and answers of the model. Any other value leaves them out.
OTEL_SERVICE_NAMEstringdefault agentThe name under which the agent's traces are exported.
OTEL_SERVICE_VERSIONstringdefault devThe version that the agent's traces and the metric agent_build_info report.
Debugging
LIVE_DEBUG_TRACES"0" | "1" | "2"default 0Writes the course of each question to the log while it runs. The value 1 writes a clean trace, and 2 also writes the whole input and output of the model as JSON. A value of 1 or more writes whole conversations to the log, so the agent ignores it in production unless AGENT_ALLOW_DEBUG_TRACES is true.
AGENT_ALLOW_DEBUG_TRACESbooleandefault falseWith true, LIVE_DEBUG_TRACES takes effect when NODE_ENV is production. Any other value leaves it ignored there.