ai-bridge
by qidiai
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| AI_BRIDGE_DB | No | 全局 SQLite 路径。沙箱实例须同时隔离它(只隔离 DATA_DIR 不够,流量/派发行会写穿生产库) | ~/.ai-bridge/bridge.db |
| AI_BRIDGE_HOST | No | 监听地址(仅本机;改 0.0.0.0 前务必设 TOKEN) | 127.0.0.1 |
| AI_BRIDGE_PORT | No | 服务端口 | 9800 |
| AI_BRIDGE_TOKEN | No | 鉴权 token(不设则无鉴权)。自 #42 起门覆盖 /api/* 与 /v1/*:设了 token 后,用 OpenAI 兼容层的任何客户端都必须把 API key 配成同一个值(Authorization: Bearer <AI_BRIDGE_TOKEN>),否则一律 401;Web UI 会在首次 401 时提示输入一次并存入 localStorage(不设 token 时不会弹框)。两处已知仍免凭据:GET /(UI 首页本身,无数据)与 GET /api/health——后者在门之前处理,会带出 version/clients/activeDispatches/db 路径/token 剩余天数等;另有 /proxy/* 免凭据透传 | |
| AI_BRIDGE_CLIENT | No | 作为 MCP 客户端时的身份名(注意:默认值是常量 unknown,同一宿主开多个会话会全部塌进同一个在册条目且复用是静默无日志的) | unknown |
| AI_BRIDGE_TOOLSET | No | 桥暴露的工具套餐:full=全部 15 个;lite=面向被派发 CLI 对端智能体的 5 工具精简面(dispatch/handoff/list_tools/memory_search/memory_recent);非法值按 full | full |
| AI_BRIDGE_CAP_EXEC | No | 严格 opt-in(1/true/yes/on)声明 exec 能力;不带 exec 的客户端可被派发但不能承接 workspace 任务 | 否 |
| AI_BRIDGE_DATA_DIR | No | store 层 JSON 数据目录。跑任何探针/沙箱实例必须显式隔离它,否则写穿生产台账 | ai-bridge/ 内默认位置 |
| AI_BRIDGE_CACHE_MAX | No | 反代幂等缓存条目上限(LRU) | 100 |
| AI_BRIDGE_CACHE_TTL | No | 反代幂等缓存 TTL(ms) | 600000 |
| AI_BRIDGE_OLLAMA_BASE | No | local-vl 模型的 Ollama 地址 | http://127.0.0.1:11434 |
| AI_BRIDGE_HTTP_TIMEOUT | No | 桥侧同步工具调用总预算(毫秒),同时驱动 httpPost 默认值与 callTool 总超时;未设时 GET/轮询仍为 30000ms 快速失败 | 960000 |
| AI_BRIDGE_WORKSPACE_ROOT | No | 受管工作区根目录(托管目录创建/回收均限制在此) | ~/.ai-bridge/workspaces |
| AI_BRIDGE_EXECUTE_TIMEOUT | No | 中枢单次执行窗口(ms):CLI 执行链与客户端反向执行都吃它。桥侧 AI_BRIDGE_HTTP_TIMEOUT 必须 ≥ 本值 + 30000,否则长任务会被桥早判死而中枢仍在执行 | 900000 |
| AI_BRIDGE_SAMPLING_TIMEOUT | No | 桥侧反向 sampling/createMessage 的防泄漏兜底;实际节奏由中枢 AI_BRIDGE_EXECUTE_TIMEOUT 管控,慢宿主可放宽 | 900000 |
| AI_BRIDGE_DAILY_TOKEN_BUDGET | No | 每日 token 预算,超出时 /api/health 告警 | 无 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Server capabilities have not been inspected yet.
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
No tools | |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues