安全公告 — 恶意 litellm 版本 1.82.7 与 1.82.8 已从 PyPI 移除(存在 API 密钥外泄风险)。请卸载、轮换已暴露凭据,并升级至安全版本(如 1.82.9+)。运行 pip show litellm 以确认。 PyPI · README

本地开发指南

Enterprise 日常开发三条命令:

本地开发指南

Enterprise 日常开发三条命令:

bash
1cd enterprise
2bash scripts/bootstrap.sh # 首次 / 环境变更
3bash scripts/start-dev.sh # 每天开工(需已有 PG)
4# 或
5bash scripts/start-dev-with-infra.sh # 连同 Docker PG/Redis

服务地址

服务URL
前台http://localhost:3000
后台http://localhost:3001
Gatewayhttp://localhost:8088/healthz

默认登录

账号密码 env
后台owner@agenticx.localADMIN_CONSOLE_LOGIN_PASSWORD
前台owner@agenticx.localAUTH_DEV_OWNER_PASSWORD

`staff@agenticx.local` 不在默认种子中,需后台创建。


bootstrap.sh 选项

bash
1bash scripts/bootstrap.sh # local(推荐)
2bash scripts/bootstrap.sh --mode=server # 非交互,env 必须齐全
3bash scripts/bootstrap.sh --reset-db # 销毁 PG 卷重建
4bash scripts/bootstrap.sh --skip-docker # 使用外部 PG

执行内容:预检 → .env.local → docker PG/Redis → migrate + seed → legacy runtime 导入 → JWT PEM。


start-dev.sh 选项

bash
1bash scripts/start-dev.sh
2bash scripts/start-dev.sh --all # 含 customers/*
3bash scripts/start-dev.sh --ui=stream # 纯日志,Ctrl+C 一次退出
  • 自动展开 AUTH_JWT_*_KEY_FILE PEM
  • AGX_AUTO_DB_MIGRATE=1:仅 localhost DB 自动 migrate
  • Ctrl+C 清理 gateway + Next 子进程

接通真实模型

推荐:后台 → 平台配置 → 模型服务 → 添加 Provider → 检测 → 保存 → 用户可见模型分配。

备选.env.local 追加 DEEPSEEK_API_KEY=sk-...


OIDC SSO

  1. 配置 NEXT_PUBLIC_SSO_PROVIDERS 与各 SSO_* env
  2. 参考 runbooks/sso-oidc-setup.md
  3. 自检:pnpm sso:oidc-smoke

不用脚本直接 pnpm

bash
1cd enterprise
2set -a; source .env.local; set +a
3export AUTH_JWT_PRIVATE_KEY="$(cat "$AUTH_JWT_PRIVATE_KEY_FILE")"
4export AUTH_JWT_PUBLIC_KEY="$(cat "$AUTH_JWT_PUBLIC_KEY_FILE")"
5pnpm install
6pnpm exec turbo run dev \
7 --filter=@agenticx/app-web-portal \
8 --filter=@agenticx/app-admin-console
9# gateway 需另开终端 go run ./apps/gateway/cmd/gateway

常用维护

bash
1pnpm migrate:legacy-runtime # JSON → PG
2bash scripts/reset-dev-data.sh # 清聊天/用量(见 scripts/README)
3pnpm typecheck # 全 monorepo 类型检查
4pnpm --filter @agenticx/app-admin-console test # 单 app 测试

详细脚本说明

../scripts/README.md


相关文档