Security advisory — Malicious litellm versions 1.82.7 and 1.82.8 were removed from PyPI (potential API key exfiltration). Uninstall them, rotate exposed credentials, and upgrade to a safe release (e.g. 1.82.9+). Run pip show litellm to verify. PyPI · README

Vercel environment variable checklist (copy into `.local-secrets` before filling)

Framework: Next.js · Node: 20.

Vercel environment variable checklist (copy into .local-secrets before filling)

Do not commit a copy that contains real values. Create this file locally:

enterprise/.local-secrets/vercel-env-values.local.md, copy the block below into it, then replace <…>.

Vercel project settings summary

ProjectRoot Directory
web-portalenterprise/apps/web-portal
admin-consoleenterprise/apps/admin-console
FieldInstall Command
Same on both apps (install)cd ../.. && npx --yes pnpm@9.12.0 install --no-frozen-lockfile
admin-console (build)cd ../.. && npx --yes pnpm@9.12.0 exec turbo run build --filter=@agenticx/app-admin-console
web-portal (build)cd ../.. && npx --yes pnpm@9.12.0 exec turbo run build --filter=@agenticx/app-web-portal

The pnpm on Vercel machines is often 6.35.1, which triggers ERR_PNPM_UNSUPPORTED_ENGINE. You must use npx pnpm@9.12.0. pnpm-lock.yaml is not in git (see enterprise/.gitignore), so do not use --frozen-lockfile.

FieldBuild Command
web-portalcd ../.. && pnpm exec turbo run build --filter=@agenticx/app-web-portal
admin-consolecd ../.. && pnpm exec turbo run build --filter=@agenticx/app-admin-console

Framework: Next.js · Node: 20.


Shared by both projects (recommended for Production and Preview)

Add the same variable names in both the web-portal and admin-console Vercel projects:

VariableDescription
DATABASE_URLSupabase Postgres direct connection string, usually with ?sslmode=require
AUTH_JWT_PRIVATE_KEYFull PEM (including BEGIN/END, multiline)
AUTH_JWT_PUBLIC_KEYFull PEM
DEFAULT_TENANT_IDDefault tenant
DEFAULT_DEPT_IDDefault department
NEXT_PUBLIC_SSO_PROVIDERSExample: id:Display Name, comma-separated if multiple
SSO_STATE_SIGNING_SECRETOIDC state signing
SSO_PROVIDER_SECRET_KEYSecret related to SSO session/encryption (follow the repo convention)
AGX_PROVIDER_SECRET_KEYSymmetric key (AES-GCM) used when Admin writes provider keys; must match the docs/implementation

Also configure each IdP's SSO_OIDC_* as required by the console (set them on both apps if both need SSO).


web-portal only

VariableExample
GATEWAY_COMPLETIONS_URLhttps://gateway.<your-domain>/v1/chat/completions

Optional (not recommended for long-term production use):

VariableDescription
AUTH_DEV_OWNER_PASSWORDFor development / bootstrap
ENABLE_DEV_BOOTSTRAPRecommend disabling in production

admin-console only

VariableDescription
ADMIN_CONSOLE_SESSION_SECRETAdmin-console session; required in production
ADMIN_CONSOLE_LOGIN_PASSWORDAdmin-console password login (production should migrate toward real account RBAC)
GATEWAY_INTERNAL_TOKENShared with gateway GATEWAY_INTERNAL_TOKEN to pull internal snapshots / quotas / providers
GATEWAY_BASE_URLExample: https://gateway.<your-domain> (no trailing /v1)

If internal routes are absolute URLs, add an admin-side base URL env as needed (follow the implementation).


Gateway (Fly / Railway / VM) alignment (not Vercel)

When the gateway is deployed elsewhere, at minimum it must match what admin agreed on:

VariableDescription
DATABASE_URLSame Supabase database (audit / usage, etc.)
AUTH_JWT_PUBLIC_KEYMust match the access JWT issued by the portal
GATEWAY_INTERNAL_TOKENMust match admin GATEWAY_INTERNAL_TOKEN
GATEWAY_REMOTE_POLICY_SNAPSHOT_URLGET, Bearer as above
GATEWAY_REMOTE_PROVIDERS_URLGET, Bearer as above
GATEWAY_REMOTE_QUOTA_CONFIG_URLGET, Bearer as above

Exact paths follow the admin internal/* APIs in the implementation repo.


.local-secrets copy-paste skeleton (local only after filling)

The skeleton below can be copied to enterprise/.local-secrets/vercel-env-values.local.md:

markdown
1# Vercel value draft (do not commit)
2
3## web-portal
4DATABASE_URL=<…>
5AUTH_JWT_PRIVATE_KEY=
6(multiline PEM)
7AUTH_JWT_PUBLIC_KEY=
8DEFAULT_TENANT_ID=<…>
9DEFAULT_DEPT_ID=<…>
10NEXT_PUBLIC_SSO_PROVIDERS=<…>
11SSO_STATE_SIGNING_SECRET=<…>
12SSO_PROVIDER_SECRET_KEY=<…>
13AGX_PROVIDER_SECRET_KEY=<…>
14GATEWAY_COMPLETIONS_URL=https://gateway.<…>/v1/chat/completions
15
16## admin-console
17(fill the shared items again)
18
19ADMIN_CONSOLE_SESSION_SECRET=<…>
20ADMIN_CONSOLE_LOGIN_PASSWORD=<…>
21GATEWAY_INTERNAL_TOKEN=<…>
22GATEWAY_BASE_URL=https://gateway.<…>

Made-with: Damon Li