
router
TanStack Router is a type-safe, data-driven React router with built-in caching, prefetching, and nested layouts, while TanStack Start extends it into a full-stack SSR framework.
它通过标准化适配器接口和版本化能力声明,将聊天平台与核心逻辑彻底分离,并内置幂等、串行处理、原子提交等可靠性保障,同时严格管控模型对平台功能的访问。
Pi Bot 是一个与聊天平台无关的持久化 Agent 核心。它只处理对话语义、模型调用、记忆、多模态引用和可靠出站队列,不包含任何具体 IM SDK、登录协议或消息网关实现。
IM SDK / Gateway
↕
ChannelAdapter + ChannelPlugin v1
↕
ChannelRuntime
↕
GroupAgentCore → Pi Agent → durable outbox
具体平台通过仓库外的适配包接入。适配器负责原生事件转换和消息发送;核心只接收标准事件、输出标准动作,并按适配器声明的能力做运行时校验。
AssetRef,二进制内容位于独立的 AssetStore。toolProviders 能进入 Pi。>= 22.13npm ci
npm run check
import { getModel } from "@earendil-works/pi-ai";
import {
CHANNEL_PLUGIN_API_VERSION,
ChannelRuntime,
GroupAgentCore,
PiAgentRunner,
defineChannelPlugin,
} from "pi-bot";
const core = new GroupAgentCore({
bot: {
id: "bot-1",
displayName: "小派",
wakeWords: ["派派", "小派"],
},
runner: new PiAgentRunner({
model: getModel("anthropic", "claude-sonnet-4-6"),
apiKey: () => process.env.ANTHROPIC_API_KEY,
thinkingLevel: "low",
}),
databasePath: "./data/agent.sqlite",
defaultGroupActivation: "mention",
operatorIds: ["operator-1"],
});
const plugin = defineChannelPlugin({
apiVersion: CHANNEL_PLUGIN_API_VERSION,
id: "example-adapter-instance",
async start(context) {
sdk.onMessage(async (raw) => {
await context.ingest({
type: "message",
id: raw.eventId,
transportMessageId: raw.messageId,
conversation: {
id: raw.conversationId,
kind: raw.isGroup ? "group" : "direct",
title: raw.conversationTitle,
},
sender: {
id: raw.senderId,
displayName: raw.senderName,
},
text: raw.text,
timestamp: raw.timestamp,
mentions: raw.mentionedBot ? [{ id: "bot-1" }] : [],
});
});
},
async send(action) {
await sdk.send({
conversationId: action.conversationId,
text: action.text,
parts: action.parts,
replyTo: action.replyToMessageId,
idempotencyKey: action.id,
});
},
async stop() {
await sdk.close();
},
});
const runtime = new ChannelRunti
根据分类、Topic 和编程语言匹配的相似项目。

TanStack Router is a type-safe, data-driven React router with built-in caching, prefetching, and nested layouts, while TanStack Start extends it into a full-stack SSR framework.
scriptc compiles ordinary TypeScript into small, fast native executables without needing Node.js, V8, or any JavaScript runtime in the binary.
A React component library that renders six hand-tuned animated thought orb loading indicators on a plain 2D canvas, with two purpose-tuned sizes and automatic theme detection for AI and agent UIs.