Intelligence(开发者)
本章节面向开发者,系统性讲解 Tuff Core-App 的 Intelligence 智能系统,以及 Nexus / 插件如何使用它。
Intelligence(开发者)
本章节面向开发者,系统性讲解 Tuff Core-App 的 Intelligence 智能系统,以及 Nexus / 插件如何使用它。
你将获得什么
- 多 Provider 路由(OpenAI / Anthropic / DeepSeek / SiliconFlow / Local / Custom)
- 以 Capability 为中心的 API(
text.chat,vision.ocr,embedding.generate,agent.run等) - 策略选择(provider 选择 + fallback 链)
- LangChain 统一模型调用层(Provider 侧不再直连 HTTP,统一通过 LangChain 访问模型)
- LangGraph Agent 状态机(
session.start -> plan -> execute -> reflect -> finalize) - Prompt Registry 管理面(
/api/admin/intelligence-agent/prompts*+/prompt-bindings*) - 治理能力
- Provider / model 兼容性校验
- API Key 快速失败与路由
- Embedding 输入 chunking / truncation
- OCR 输入与存储治理
代码位置
- 核心运行时
apps/core-app/src/main/modules/ai/intelligence-sdk.tsapps/core-app/src/main/modules/ai/intelligence-config.tsapps/core-app/src/main/modules/ai/intelligence-strategy-manager.tsapps/core-app/src/main/modules/ai/runtime/provider-manager.ts
- Providers
apps/core-app/src/main/modules/ai/providers/*.ts
延伸阅读
- API 参考:
/docs/dev/api/intelligence - 架构说明:
/docs/dev/architecture/intelligence-system - 配置指南:
/docs/dev/intelligence/configuration - LangChain Agent 编排:
/docs/dev/intelligence/langchain-agent - 统一 Schema 迁移:
/docs/dev/intelligence/schema-migration - 能力与示例:
/docs/dev/intelligence/capabilities - 排障指南:
/docs/dev/intelligence/troubleshooting