文档/Intelligence(开发者)
通用开发

Intelligence(开发者)

本章节面向开发者,系统性讲解 Tuff Core-App 的 Intelligence 智能系统,以及 Nexus / 插件如何使用它。

Intelligence(开发者)

本章节面向开发者,系统性讲解 Tuff Core-App 的 Intelligence 智能系统,以及 Nexus / 插件如何使用它。

你将获得什么

  • 多 Provider 路由(OpenAI / Anthropic / DeepSeek / SiliconFlow / Local / Custom)
  • 以 Capability 为中心的 APItext.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.ts
    • apps/core-app/src/main/modules/ai/intelligence-config.ts
    • apps/core-app/src/main/modules/ai/intelligence-strategy-manager.ts
    • apps/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