项目介绍
Agent 开发框架 · 2026-11-09 更新 · 本站尚未实测
agent-kit 是 socialrobot-io 维护的 TypeScript 工具包,目标是让开发者把 AI Agent 部署到生产环境,并支持多租户隔离。README 将其定位为“Production-grade agents. Secure. Sandboxed. Self-improving.”,并强调它不是面向单机本地使用的 Agent 运行框架,而是围绕租户隔离、记忆管理和沙箱执行提供基础设施层。
项目以 npm 包形式发布,核心包为 @socialrobot-io/agent-kit-core,并提供 Node、Next.js 适配包。README 说明其构建在 Vercel AI SDK 之上,复用 AI SDK 的消息、运行/流式、工具与 UI 审批等接口。
核心能力
点击能力名称查看输入、输出和原文依据。
- 默认安全:README 称对每次记忆和技能写入执行提示注入、promptware 与外泄扫描,项目方称威胁不会进入系统提示,本站未对防护效果进行实测。
- 沙箱执行:为每个租户提供 AgentFS 卷,并借助 bash-tool 护栏,在运行前拦截破坏性命令、密钥外泄和非白名单网络访问。
- 生产级多租户:每个租户拥有独立的文件系统、记忆、技能库、对话记录存储与审计轨迹,租户之间互相隔离。存储可落在本地 AgentFS 文件或 Postgres。
- 审批下的自我改进:后台 curator 把会话提炼为持久记忆与可复用技能,默认先暂存等待人工审核;宿主可设置
curator.autoApprove。 - 框架适配:提供 Next.js 配置包装与 Hono/Express 接入方式,均围绕同一套
agents/目录和kit实例。
实际应用场景
适用场景
适合需要把 AI Agent 以多租户方式交付给终端用户的团队,例如带租户隔离的对话应用、需要 Agent 执行代码或读写文件的后端服务,以及希望让 Agent 在人工审核下积累记忆和技能的产品。对于只在本机运行单个 Agent 的个人开发者,README 的定位并非主要目标;是否适合轻量本地场景需另行评估。
安装与接入
README 给出的安装命令为:
npm i @socialrobot-io/agent-kit-node @socialrobot-io/agent-kit-next ai
npm i @ai-sdk/anthropic # or openai / deepseek / …
使用 Hono / Express 时可省略 @socialrobot-io/agent-kit-next。Next.js 项目通过 withAgentKit 包装配置,默认读取 app/ 旁的 agents/ 目录,每个 Agent 一个文件夹,包含 SOUL.md、AGENTS.md 和可选的 skills/。后端在模块作用域创建一次 createAgentKit,按请求调用 kit.session(tenantId, sessionId)。README 提供 examples/example-app 和 examples/postgres-worker 两个示例目录,具体步骤可参考 docs/guides/getting-started.md。
使用条件与限制
- 是否需要部署
- 需自行准备运行环境,具体要求见正文
- 是否需要注册
- 账号和认证要求见正文;未明确说明的项目仍待核验
- 是否需要 API Key
- 待核验
- 费用与额度
- 费用边界见正文,项目许可不代表模型或托管服务免费
- 所需权限
- 待核验
- 许可证与服务条款
- 待核验
权限费用与限制
- 宿主需要自行完成用户认证,并把用户映射到稳定的
tenantId;README 明确提醒不要只从客户端请求体取tenantId。 - 模型通过 AI SDK provider 接入,README 示例使用
@ai-sdk/anthropic的claude-sonnet-4-5,并提到可换用 openai、deepseek 等 provider;实际可用模型及国内访问情况需以各 provider 为准,待核验。 - 模型调用产生的费用由所选 provider 决定,项目本身是否收费、是否存在商业模块或托管服务,资料未说明,待核验。
- 沙箱与租户隔离的实际安全强度依赖 AgentFS、bash-tool 配置和部署环境,README 未给出独立安全审计结论。
- Postgres 存储为可选能力,需要自行提供数据库驱动(pg、Prisma、postgres.js 等)。
国内使用情况
网友核验 用户经验分享
与站长实测独立,不代表官方认证或本站已实测。
最近核验:暂无有效核验。参与人数按当前项目有效身份去重;不同核验项分别统计,不合并成用户总结果。仅统计审核通过且未过期的记录。
分项统计、有效期与样本量
| 核验项目 | 有效人数 | 成功 / 部分 / 失败 / 无法判断 | 成功率 | 最近核验 / 有效期 |
|---|---|---|---|---|
| 官方网站访问 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 7 天 |
| GitHub 仓库访问 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 7 天 |
| 安装与运行 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 官方服务国内连接 / MCP 连接 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 国内网络情况 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 7 天 |
| 国内模型兼容性 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 自定义 API | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 海外服务依赖 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 海外账号要求 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 中文界面 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 客户端兼容性 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 账号及费用信息 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
成功率 = 成功 ÷(成功 + 部分成功 + 失败);无法判断不计入分母。至少 5 份可判断结果才显示成功率。账号、费用、海外依赖与语言等事实项,成功表示核查结论与资料吻合,具体观察另行统计;不表示免费或没有海外依赖。不同网络、客户端和版本的结果不能直接等同。
最近有效核验
暂无审核通过且未过期的网友核验。欢迎提交真实使用记录。
查看全部有效核验 →国内实测状态:国内可用性待核验。协议兼容和官方资料说明不等于国内网络可用。
- 官方网站访问
- 尚未实测 待核验
- GitHub 仓库访问
- 尚未实测 待核验
- 官方服务国内连接
- 尚未实测 待核验
- 国内网络情况
- 尚未实测 待核验
- 国内模型兼容性
- 尚未实测 待核验
- 自定义 API
- 尚未实测 待核验
- 海外服务依赖
- 尚未实测 待核验
- 海外账号要求
- 尚未实测 待核验
- 中文界面
- 尚未实测 待核验
- 国内最后核验时间
- 尚未实测
许可与国内使用
仓库 LICENSE 为 MIT License,允许复制、修改、合并、发布、再许可和销售,需保留版权与许可声明。该许可仅覆盖仓库代码,不覆盖第三方模型、AgentFS 托管服务或 AI SDK provider 的服务条款。README 提到第三方归因见 NOTICE,未在本次资料中展开。仓库未声明服务部署地域或对国内网络环境的支持情况,国内使用涉及的模型 API 可达性、数据跨境与合规问题需自行核验。仓库当前未显示归档或停止维护标识,但后续维护状态应以官方仓库为准。
项目资料与来源
字段依据与待核验事项
access:来源确认 · npm i @socialrobot-io/agent-kit-node @socialrobot-io/agent-kit-next ai
project_type:来源确认 · A TypeScript toolkit for shipping AI agents that are multi-tenant-safe, without complex infrastructure.
原始 README(折叠技术参考)
<div align="center">
<img src="docs/assets/hero.jpg" alt="agent-kit: self-improving AI agents" width="100%"/>
<br/>
### Production-grade agents.<br/>Secure. Sandboxed. Self-improving.
A TypeScript toolkit for shipping AI agents that are multi-tenant-safe, without complex infrastructure.
Curated memory, human-gated learning, and a real execution sandbox.
[](https://www.npmjs.com/package/@socialrobot-io/agent-kit-core)
[](LICENSE)
[](https://www.typescriptlang.org/)
[](https://nx.dev)
[](https://bun.sh)
[Why](#why) · [Set up](#set-up) · [Built on](#built-on) · [More](docs/more.md)
</div>
---
## Example
<img src="docs/assets/agent-kit.gif" alt="agent-kit"/>
## Why
Most agent harnesses are built for local use: one developer, one machine, one
trust boundary. Shipping agents into production is different. One mistake can
delete files, leak secrets, or cross tenant boundaries.
You stay in control of auth, tenancy, and the tools the agent can reach. Your users
get a real agent that can run code and improve over time, inside an isolated home.
No huge cloud bill. No fancy infrastructure.
| Pillar | What you get |
| ------ | ------------ |
| **Secure by default** | Prompt-injection, promptware, and exfiltration scanning on every memory and skill write. Threats never reach the system prompt. |
| **Sandboxed execution** | Per-tenant [AgentFS](https://www.agentfs.ai/) volumes and [bash-tool](https://github.com/vercel-labs/bash-tool) guardrails. Destructive commands, secret exfil, and non-allowlisted network egress are blocked before they run. |
| **Production multi-tenancy** | One isolated filesystem, memory, skill library, transcript store, and audit trail per tenant. A bug in tenant A cannot touch tenant B. Run on local AgentFS files, or on Postgres when many processes serve a tenant. |
| **Self-improving under approval** | A background curator distills sessions into durable memory and reusable skills. Writes stage for human review by default. Hosts can set `curator.autoApprove` when end users are not the right reviewers. |
---
## Set up
Your app authenticates the user and maps them to a stable `tenantId`. Never
take `tenantId` from the client body alone.
### 1. Install
```bash
npm i @socialrobot-io/agent-kit-node @socialrobot-io/agent-kit-next ai
npm i @ai-sdk/anthropic # or openai / deepseek / …
```
Hono / Express: omit `@socialrobot-io/agent-kit-next`.
### 2. Next.js
**Config** — `agents/` next to `app/` by default. Custom folder:
`withAgentKit(config, { agentsDir: "src/agents" })`.
```ts
// next.config.ts
import type { NextConfig } from "next";
import { withAgentKit } from "@socialrobot-io/agent-kit-next";
export default withAgentKit({} satisfies NextConfig);
```
**Agents** — one folder per agent. What goes in `SOUL.md` / `AGENTS.md`:
[Getting started](docs/guides/getting-started.md#2-author-the-agent-as-files).
```text
agents/
chat/
SOUL.md
AGENTS.md
skills/ optional
```
**Backend** — `createAgentKit` once at module scope. It owns the per-tenant
home cache and opens a fresh session per request (state lives on disk), so the
route just calls `kit.session(tenantId, sessionId)`.
```ts
// lib/kit.ts
import { anthropic } from "@ai-sdk/anthropic";
import { createAgentKit, loadAgent } from "@socialrobot-io/agent-kit-node";
export const kit = createAgentKit({
agent: await loadAgent("chat"),
model: anthropic("claude-sonnet-4-5"),
});
```
```ts
// app/api/chat/route.ts
import {
convertToModelMessages,
createUIMessageStreamResponse,
toUIMessageStream,
type UIMessage,
} from "ai";
import { requireUser } from "@/lib/auth";
import { kit } from "@/lib/kit";
export const runtime = "nodejs";
export async function POST(req: Request) {
const { tenantId } = await requireUser(req);
const { messages, id: sessionId } = (await req.json()) as {
messages: UIMessage[];
id: string; // useChat
};
const session = await kit.session(tenantId, sessionId);
const result = session.stream(await convertToModelMessages(messages));
return createUIMessageStreamResponse({
stream: toUIMessageStream({ stream: result.stream }),
});
}
```
Working demo: [`examples/example-app`](examples/example-app).
Postgres with a curator worker: [`examples/postgres-worker`](examples/postgres-worker).
### 3. Hono / Express
Same `agents/` layout and `kit` as above.
```ts
// src/server.ts
import { Hono } from "hono";
import { requireUser } from "./auth";
import { kit } from "./kit";
const app = new Hono();
app.post("/chat", async (c) => {
const { tenantId } = await requireUser(c);
const { sessionId, text } = await c.req.json<{
sessionId: string;
text: string;
}>();
const session = await kit.session(tenantId, sessionId);
const turn = await session.run([{ role: "user", content: text }]);
return c.json({ text: turn.text });
});
export default app;
```
---
## Built on
agent-kit composes existing libraries. The [Vercel AI SDK](https://sdk.vercel.ai/)
shapes most of the live API (`ModelMessage`, `session.run` / `session.stream`,
`toolApproval`, and AI SDK UI `useChat`).
| Layer | Library | What you feel in the API |
| ----- | ------- | ------------------------ |
| Model loop | [`ai`](https://www.npmjs.com/package/ai) (Vercel AI SDK) | Messages, `run` / `stream`, tools, UI approval |
| Model providers | [AI SDK providers](https://sdk.vercel.ai/providers) or [`@ai-sdk/gateway`](https://www.npmjs.com/package/@ai-sdk/gateway) | Pass a `LanguageModel`, or a string id via the Gateway |
| Tenant volume | [AgentFS](https://www.agentfs.ai/) | One SQLite filesystem per tenant (default) |
| Shared storage (optional) | Postgres, through your driver (`pg`, Prisma, postgres.js) | `storage: postgresStorage({ db })` for many processes and curator workers |
| Sandbox shell | [bash-tool](https://github.com/vercel-labs/bash-tool) + [just-bash](https://github.com/vercel-labs/just-bash) | `bash` / `readFile` / `writeFile` behind guardrails |
If you already use the AI SDK, agent-kit slots in as the tenant home, memory,
skills, and sandbox around that loop.
---
[More](docs/more.md): install notes, how the loop works, demo commands, security,
and all guides.
MIT. See [`NOTICE`](NOTICE) for third-party attribution.
历史前置条件说明(补充参考)
Node.js/npm 环境;需使用 Vercel AI SDK 及对应模型 provider(如 Anthropic,README 也提到 openai、deepseek);需自行实现用户认证并映射稳定 tenantId;可选 Postgres 数据库;模型 API Key 与调用费用由 provider 决定,项目自身费用与商业模块情况待核验;AgentFS 与 bash-tool 的部署依赖待核验。
项目来源与清单版权许可
https://github.com/socialrobot-io/agent-kit
整理来源:https://github.com/slavakurilyak/awesome-ai-agents
清单版权与许可:
MIT License
Copyright (c) 2024 Slava Kurilyak
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.