with one click
xrk-subserver
当你需要理解或修改 Python 子服务端(FastAPI 扩展框架),以及它与主服务端的 HTTP 衔接时使用。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
当你需要理解或修改 Python 子服务端(FastAPI 扩展框架),以及它与主服务端的 HTTP 衔接时使用。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
当你需要从“应用视角”看 XRK-AGT(启动流程、Web 控制台、前后端协作、典型技术栈组合)时使用。
当你需要开发或排查 HTTP API(core/*/http/*.js)、理解 HttpApi 基类、HttpApiLoader、业务层约定时使用。
编写或审查 core/*/www 静态页、校园 WebView 兼容、HttpResponse 前端解包时使用。浏览器环境 ≠ Node 26。
编写或审查 core/src 代码时的写法与性能规范(全局裸名、状态、I/O、异步、HTTP)。改 Core 前必读。
当你需要快速理解 system-Core 提供哪些 HTTP API/工作流/插件/Tasker/Web 控制台能力,或定位某个模块在哪实现时使用。
当需要从整体理解 XRK-AGT 的架构、目录、运行流程和技术栈时使用。
| name | xrk-subserver |
| description | 当你需要理解或修改 Python 子服务端(FastAPI 扩展框架),以及它与主服务端的 HTTP 衔接时使用。 |
docs/subserver-api.md、subserver/pyserver/#utils/subserver-client.js(callSubserver、getSubserverConfig、fetchSubserverToPath)AgentRuntime.callSubserver(日志包装)| 侧 | 职责 |
|---|---|
| 主服务端 (Node) | LLM(LLMFactory)、AiWorkflow 工作流、MCP、MemoryManager/RAG、HTTP/WS |
| 子服务端 (Python) | 健康检查、系统 API、apis/<group>/*.py 业务扩展(按需装载) |
子服务端不提供内置 /api/vector/*、/api/langchain/*。
import { callSubserver, fetchSubserverToPath } from '#utils/subserver-client.js';
// 或运行时:AgentRuntime.callSubserver(配置来自 ai-workflow.yaml → subserver)
await AgentRuntime.callSubserver('/health', { method: 'GET' });
await fetchSubserverToPath('/api/mygroup/file', { query: { id: '1' }, dest: '/path/local.bin' });
Node 26:fetch + AbortSignal.timeout(见 subserver-client.js、skill xrk-node-runtime)。
在 subserver/pyserver/apis/<group>/ 新增模块,导出 default 路由元数据(见 docs/subserver-api.md)。