Xrk Aistream
Agent Buildingxrk-aistreamXrk Aistream is an Agent Skill for agent building published in the sunflowermm/XRK-AGT repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
当你需要开发/调试 AIStream 工作流、RAG 上下文增强、MCP 工具注册与作用域控制时使用。
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/sunflowermm/XRK-AGT/blob/HEAD/.claude/skills/xrk-aistream/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/xrk-aistream, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
文档与代码
docs/aistream.md、src/infrastructure/aistream/aistream.js、loader.js
工作流
- 路径:
core/*/stream/*.js(StreamLoader扫描,不用aistream.streamDir) - 配置:
data/server_bots/{port}/aistream.yaml;schema 见commonconfig/system.js - 工具:LLM tool calling + MCP;
registerMCPTool注册到this.mcpTools - LLM 调用:统一
LLMFactory.createClient().chat/chatStream(不经 Python 子服务端) - 上下文/RAG:
MemoryManager+ 知识库工作流(如database关键词检索) - Shell/系统命令:
#utils/exec-async.js;禁止promisify(exec)(skillxrk-node-runtime)
与子服务端关系
子服务端为可选 Python 扩展;AIStream 核心链路不依赖子服务。业务 Core 可通过 Bot.callSubserver 调用子服务 apis/ 接口。