-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
170 lines (140 loc) · 9.42 KB
/
Copy path.env.example
File metadata and controls
170 lines (140 loc) · 9.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# =============================================================================
# Web-Agents environment configuration (EXAMPLE)
#
# Copy this file to `.env` and fill in the values:
# cp .env.example .env
#
# This single root `.env` is shared by BOTH the Python backend (loaded via
# python-dotenv) and the Vite frontend (loaded with envDir: '..'). Never commit
# the real `.env` — it is gitignored. Replace every placeholder below; values
# shown are examples, not real credentials.
#
# Legend: [REQUIRED] must be set [OPTIONAL] has a safe default
# =============================================================================
# -----------------------------------------------------------------------------
# Primary LLM — Azure OpenAI [REQUIRED]
# -----------------------------------------------------------------------------
# The SDK auto-detects the provider from these variables. For Azure OpenAI set
# the four AZURE_OPENAI_* values below. AZURE_OPENAI_MODEL is the *deployment*
# name. Leave AZURE_OPENAI_API_KEY empty to authenticate with Entra ID — the
# app's managed identity in Azure, or your `az login` identity locally (needs
# the "Cognitive Services OpenAI User" role on the account).
AZURE_OPENAI_ENDPOINT="https://your-resource.openai.azure.us/"
AZURE_OPENAI_MODEL="gpt-4o"
AZURE_OPENAI_API_KEY=""
AZURE_OPENAI_API_VERSION="2025-01-01-preview"
# --- Alternative: OpenAI-compatible provider (e.g. Ollama, OpenAI) -----------
# Use these INSTEAD of the AZURE_OPENAI_* block above for a non-Azure endpoint.
# OPENAI_API_KEY="ollama"
# OPENAI_BASE_URL="http://localhost:11434/v1"
# OPENAI_MODEL="llama3"
# --- LLM tuning --------------------------------------------------------------
# LLM_TEMPERATURE — default sampling temperature, clamped to [0.0, 2.0].
# LLM_TEMPERATURE=0.2 [OPTIONAL]
# -----------------------------------------------------------------------------
# Secondary / summarizer LLM (failover + history compaction) [OPTIONAL]
# -----------------------------------------------------------------------------
# A dedicated Azure OpenAI deployment used for summarization and as a fallback
# when the primary returns 429/throttling. If unset, the primary client is used.
# AZURE_OPENAI_SECONDARY_ENDPOINT="https://your-secondary.openai.azure.com/"
# AZURE_OPENAI_SECONDARY_MODEL="gpt-4o-mini"
# AZURE_OPENAI_SECONDARY_API_KEY="" # empty = Entra ID / managed identity
# AZURE_OPENAI_SECONDARY_API_VERSION="2024-02-15-preview"
# -----------------------------------------------------------------------------
# Azure Cosmos DB — durable per-user chat memory [REQUIRED]
# -----------------------------------------------------------------------------
# The app FAILS TO START without AZURE_COSMOS_ENDPOINT (there is no in-memory
# fallback). Locally, run the emulator (see the next section). In Azure, point
# this at the deployed account and leave AZURE_COSMOS_KEY empty to use managed
# identity (RBAC: Cosmos DB Built-in Data Contributor).
AZURE_COSMOS_ENDPOINT="https://localhost:8081/"
# AZURE_COSMOS_KEY — account key. Only for local/emulator or non-MI scenarios.
# For the local emulator you can leave this UNSET: the app automatically uses
# the emulator's public well-known key. For a real account, prefer managed
# identity (leave empty).
# AZURE_COSMOS_KEY="your-cosmos-account-key"
# Container/database names (defaults shown). [OPTIONAL]
# AZURE_COSMOS_DATABASE_NAME="agent-memory"
# AZURE_COSMOS_CONTAINER_NAME="chat-history"
# AZURE_COSMOS_CONVERSATIONS_CONTAINER="conversations"
# AZURE_AUTHORITY_HOST — Entra login authority. NOT needed for App Service managed
# identity (the platform token endpoint already knows the cloud) or for a local
# `az login` to Gov. Only set it when authenticating with a service principal
# (AZURE_CLIENT_ID/AZURE_CLIENT_SECRET/AZURE_TENANT_ID) or workload identity.
# AZURE_AUTHORITY_HOST="https://login.microsoftonline.us" [OPTIONAL]
# -----------------------------------------------------------------------------
# Cosmos DB Emulator (local development only) [OPTIONAL]
# -----------------------------------------------------------------------------
# When USE_COSMOS_EMULATOR is truthy (true/1/yes/on), the "Start Cosmos
# Emulator" task / script launches the emulator container before the backend.
USE_COSMOS_EMULATOR=true
# COSMOS_EMULATOR_IMAGE="mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-latest"
# AZURE_COSMOS_ENDPOINT="http://localhost:8081/"
# AZURE_COSMOS_EMULATOR_PARTITION_COUNT=3
# The classic emulator advertises its container IP (e.g. 172.17.0.2). If the
# host cannot reach it, set a host-reachable IP here or use the vnext-latest
# image. (The app also disables endpoint discovery for localhost.)
# AZURE_COSMOS_EMULATOR_IP_ADDRESS_OVERRIDE=""
# AZURE_COSMOS_EMULATOR_ENDPOINT="http://localhost:8081/" # used by emulator tests
# -----------------------------------------------------------------------------
# Authentication — Microsoft Entra ID (Azure AD) [REQUIRED in prod]
# -----------------------------------------------------------------------------
# Shared by backend (token validation) and frontend (MSAL sign-in). The
# OAUTH_AZURE_GOV_AD_* names take precedence; AZURE_AD_* are accepted fallbacks.
OAUTH_AZURE_GOV_AD_TENANT_ID="00000000-0000-0000-0000-000000000000"
OAUTH_AZURE_GOV_AD_CLIENT_ID="00000000-0000-0000-0000-000000000000"
# AZURE_AD_TENANT_ID="" # fallback if OAUTH_AZURE_GOV_AD_TENANT_ID is unset
# AZURE_AD_CLIENT_ID="" # fallback if OAUTH_AZURE_GOV_AD_CLIENT_ID is unset
# Authority base URL. Gov default shown; commercial = https://login.microsoftonline.com
# AZURE_AD_AUTHORITY="https://login.microsoftonline.us" [OPTIONAL]
# AZURE_AD_CLIENT_SECRET — only required for MCP servers using on-behalf-of
# (OBO) token exchange. Backend-only; never exposed to the frontend.
# AZURE_AD_CLIENT_SECRET="your-client-secret" [OPTIONAL]
# Disable authentication entirely — LOCAL DEVELOPMENT ONLY. Never in production.
# AUTH_DISABLED=true [OPTIONAL]
# -----------------------------------------------------------------------------
# Azure AI Search — retrieval / "search context" provider [OPTIONAL]
# -----------------------------------------------------------------------------
# Enables the search context provider and SQL/search tools. If unset, search
# context is reported as unavailable. Leave SEARCH_API_KEY empty for managed identity.
# SEARCH_SERVICE_ENDPOINT="https://your-search-service.search.azure.us"
# SEARCH_INDEX_NAME="your-index-name"
# SEARCH_API_KEY="your-search-api-key"
# SEARCH_TOP_K=5
# SEARCH_SEMANTIC_CONFIGURATION_NAME="your-semantic-config"
# -----------------------------------------------------------------------------
# Azure SQL tool (optional database query tool) [OPTIONAL]
# -----------------------------------------------------------------------------
# Use Authentication=ActiveDirectoryMsi (App Service) or ActiveDirectoryDefault
# / ActiveDirectoryInteractive (local). Requires ODBC Driver 18 for SQL Server.
# AZURE_SQL_CONNECTIONSTRING="Driver={ODBC Driver 18 for SQL Server};Server=tcp:your-server.database.usgovcloudapi.net,1433;Database=your-db;Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;Authentication=ActiveDirectoryDefault"
# -----------------------------------------------------------------------------
# Branding / UI (defaults shown) [OPTIONAL]
# -----------------------------------------------------------------------------
# APP_NAME="Web-Agents"
# APP_TAGLINE="AI Agent Framework"
# APP_LOGO="/Microsoft.png"
# CLASSIFICATION_BANNER="UNCLASSIFIED"
# -----------------------------------------------------------------------------
# Limits & tuning (defaults shown) [OPTIONAL]
# -----------------------------------------------------------------------------
# MAX_USER_INPUT_CHARS=8000 # max characters accepted per user message
# MAX_SESSIONS=5 # frontend: conversations kept in the left pane
# MAX_QUERY_RESULT_ROWS=100 # SQL tool: max rows returned
# MAX_QUERY_RESULT_CHARS=12000 # SQL tool: max chars in a result payload
# MAX_SQL_CELL_CHARS=1200 # SQL tool: max chars per cell
# MAX_LOG_QUERY_CHARS=500 # logging: truncate logged SQL
# MAX_LOG_TOOL_RESULT_CHARS=100 # logging: truncate logged tool results
# MAX_SEARCH_SNIPPET_CHARS=500 # search: max chars per snippet
# -----------------------------------------------------------------------------
# Evaluation tracing [OPTIONAL]
# -----------------------------------------------------------------------------
# Directory where per-day eval trace JSONL files are written.
# EVAL_TRACE_DIR="eval_traces"
# -----------------------------------------------------------------------------
# Frontend-only overrides (Vite) [OPTIONAL]
# -----------------------------------------------------------------------------
# At runtime the frontend fetches config from the backend (/api/auth/config),
# so the auth/branding values above are normally sufficient. This VITE_ var is
# the only one read directly from import.meta.env as a build-time fallback.
# VITE_AZURE_AD_AUTHORITY="https://login.microsoftonline.us"