@exulu/backend

中文文档
5.11.1发布于 2026/11/13TypeScriptES Module近 30 天下载 3926

欧克鲁·IMP (Intelligence Management平台)是一个开源的TypeScript框架,用于构建生产准备的AI代理应用程序. 它为管理代理、语义搜索背景、背景工作处理提供后端基础设施,a

中文使用文档
文档目录39 节
  1. 为什么是克苏鲁·IMP?
  2. QQ 快速启动
  3. 安装
  4. 基本设置
  5. 管理前端
  6. Exulu 前端
  7. 页:1
  8. 核心概念
  9. 埃克苏鲁阿普
  10. Exulu 代理服务器
  11. Exulu 语句
  12. Exulu 工具
  13. Exulu数据库
  14. 背景工作者
  15. 所需经费
  16. Exulu IMP 生态系统
  17. 后端结构
  18. 认证
  19. API 密钥认证
  20. 下一个会话符号
  21. 内部服务密钥
  22. 评价框架
  23. QQ 开元集成
  24. 环境变量
  25. 完整实例
  26. 审计记录
  27. 发展
  28. 实例
  29. RAG 应用程序
  30. 多代理工作流程
  31. API 集成的自定义工具
  32. 需要帮忙吗?
  33. * 路线图
  34. 许可证
  35. 有关项目
  36. Exulu 前端页面 →
  37. Exulu 示例 →
  38. {\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF…
  39. 感谢所有贡献者

欧克鲁·IMP (Intelligence Management平台)是一个开源的TypeScript框架,用于构建生产准备的AI代理应用程序. 它为管理代理、语义搜索背景、背景工作处理和工具集成提供了后端基础设施.

Exulu IMP - Create, deploy and manage AI agents



GitHub Workflow Status   Discord   npm downloads   npm version   Node.js version


探索文档  • 妇女  社区帮助  • 妇女  * 路线图


[大 QQ 启动此重播以跟踪开发和更新

为什么是克苏鲁·IMP?

  • 🤖 多供应商代理人 - 对OpenAI、Anthropic、Google、Cerebras和任何AI SDK供应商的内置支持
  • 🔍 语义搜索 - 有活性能的RAG,具有活性能和自动嵌入生成
  • ⚙️ 背景工作者 - 基于 BullMQ 的任务长跑队列
  • 🔐 认证 - API 密钥、 NextAuth 集成和基于角色的访问控制
  • 🛠️ 工具系统 - 扩展具有自定义功能和外部API的代理能力
  • 📦 自办 - 任何你想部署的地方,没有供应商锁定
  • 🔌 快捷 API - 框外的图QL和REST端点
  • 📊 打开几何 - 与西格诺兹一体化一起建立伐木和追踪系统
  • ⚡ 类型脚本第一 - 用自动类型推论打出完整字型

QQ 快速启动

安装

npm install @exulu/backend

基本设置

import { ExuluApp, ExuluAgent, ExuluDefaultAgents } from "@exulu/backend";

const app = new ExuluApp();

await app.create({
  config: {
    express: { enabled: true, port: 3000 },
    workers: { enabled: true },
    telemetry: { enabled: false }
  },
  agents: [
    ExuluDefaultAgents.anthropic.sonnet45,
    ExuluDefaultAgents.openai.gpt5
  ],
  contexts: {},
  tools: []
});

const server = await app.express.init();
server.listen(3000, () => {
  console.log("🚀 Exulu IMP running on http://localhost:3000");
});

一个完整的实例检查 Exulu 示例仓库 包括:

  • PostgreSQL 、 Redis 和 MinIO 的多克编程设置
  • 预配置代理和上下文
  • 工人的执行
  • 环境配置模板
  • 数据库初始化脚本

管理前端

Exulu 前端

Exulu Frontend

现代 管理您的 AI 代理、 上下文和工作流程的响应管理界面

这个 Exulu 前端页面 提供一种美丽的、可制作的 管理界面 下一个.js 15, (中文(简体) ), 反应 19,以及 尾风 CSS。 。 。 .

* 特性

  • 代理管理和配置
  • 实时会议监测
  • * 背景和知识库管理
  • & 工作流程构建器
  • QQ 用户角色管理( L)
  • 使用统计和分析

QQ 快速启动

# Using npx (recommended)
npx @exulu/frontend

# Or install globally
npm install -g @exulu/frontend
exulu-frontend

自动连接到您的 Exulu IMP 后端!

Exulu IMP - Create, deploy and manage AI agents

代理管理 Agent Management

会议监测 Session Monitoring

GitHub 仓库 二. 支助 页:1 二. 支助 现场直播


页:1

访问 文件: exulu.com 用于综合文件,包括:

核心概念

埃克苏鲁阿普

组合所有组件的主要应用类:

import { ExuluApp } from "@exulu/backend";

const agent = new ExuluAgent({
  id: "assistant",
  name: "Assistant",
  provider: "anthropic",
  type: "agent",
  maxContextLength: 200000,
  config: {
    model: {
      create: ({ apiKey }) => {
        const anthropic = createAnthropic({ apiKey });
        return anthropic.languageModel("claude-sonnet-4-5");
      }
    },
    instructions: "You are a helpful assistant."
  }
});

const app = new ExuluApp();
await app.create({
  config: {},
  agents: [agent],
  contexts: {...},
  tools: [...]
});

Exulu 代理服务器

创建不同 LLM 提供者的 AI 代理 :

import { ExuluAgent } from "@exulu/backend";
import { createAnthropic } from "@ai-sdk/anthropic";

const agent = new ExuluAgent({
  id: "assistant",
  name: "Assistant",
  provider: "anthropic",
  type: "agent",
  capabilities: {
    text: true,
    images: [".png", ".jpg"],
    files: [".pdf", ".docx"]
  },
  maxContextLength: 200000,
  config: {
    model: {
      create: ({ apiKey }) => {
        const anthropic = createAnthropic({ apiKey });
        return anthropic.languageModel("claude-sonnet-4-5");
      }
    },
    instructions: "You are a helpful assistant."
  }
});

或使用 预配置代理数字 :

import { ExuluDefaultAgents } from "@exulu/backend";

// OpenAI
ExuluDefaultAgents.openai.gpt5;
ExuluDefaultAgents.openai.gpt4o;

// Anthropic
ExuluDefaultAgents.anthropic.opus4;
ExuluDefaultAgents.anthropic.sonnet45;

// Google
ExuluDefaultAgents.google.vertexGemini25Pro;

// Cerebras
ExuluDefaultAgents.cerebras.llama3370b;

Exulu 语句

含有 RAG 的向量嵌入的语义搜索 :

import { ExuluContext, ExuluEmbedder } from "@exulu/backend";

const embedder = new ExuluEmbedder({
  id: "embedder",
  name: "OpenAI Embedder",
  provider: "openai",
  model: "text-embedding-3-small",
  vectorDimensions: 1536,
  authenticationInformation: process.env.OPENAI_API_KEY
});

const context = new ExuluContext({
  id: "docs",
  name: "Documentation",
  description: "Product documentation",
  embedder,
  tableName: "docs_items",
  fields: [
    { name: "title", type: "string" },
    { name: "url", type: "string" }
  ]
});

// Add documents
await context.addItem({
  content: "Product documentation content...",
  metadata: { title: "Getting Started", url: "https://docs.example.com/start" }
});

// Search (automatically available to agents)
const results = await context.search("How do I get started?", 5);

Exulu 工具

以自定义功能扩展代理能力 :

import { ExuluTool } from "@exulu/backend";
import { z } from "zod";

const weatherTool = new ExuluTool({
  id: "get_weather",
  name: "Get Weather",
  description: "Get current weather for a location",
  parameters: z.object({
    location: z.string().describe("City name")
  }),
  execute: async ({ location }) => {
    const response = await fetch(`https://api.weather.com/${location}`);
    return await response.json();
  }
});

Exulu数据库

初始化数据库并生成 API 密钥 :

import { ExuluDatabase } from "@exulu/backend";

// Initialize database with contexts
await ExuluDatabase.init({ contexts: [documentationContext] });

// Generate API key
const { key } = await ExuluDatabase.api.key.generate(
  "Production API",
  "[email protected]"
);
console.log(`API Key: ${key}`);

背景工作者

使用 BullMQ 处理长期任务 :

import { ExuluApp } from "@exulu/backend";

const app = new ExuluApp();
await app.create({
  config: {
    workers: { enabled: true }
  },
  // ... agents, contexts, tools
});

// Create worker to process jobs
const worker = await app.bullmq.workers.create();

// Worker automatically processes:
// - Embedding generation
// - Document chunking
// - Scheduled tasks
// - Custom queued jobs

所需经费

  • 节点.js: 22.18.0 (通过 engines 以包装
  • 邮递SQL: 13+ 有 pgvector 扩展
  • 重写: 可选,仅在使用背景工作者时才需要

Exulu IMP 生态系统

Exulu IMP平台由多个寄存器组成,共同工作:

• 后端
@ exulu/ 后端
具有代理人、背景、工具和API的核心框架

QQ 前端
@ exulu/ 前端
管理机构和工作流程的管理界面

示例
exulu 实例
用 Docker 设置完成执行

后端结构

@exulu/backend/
├── src/
│   ├── exulu/
│   │   ├── app/           # ExuluApp implementation
│   │   ├── agent.ts       # ExuluAgent class
│   │   ├── context.ts     # ExuluContext class
│   │   ├── tool.ts        # ExuluTool class
│   │   ├── evals.ts       # ExuluEval class
│   │   └── otel.ts        # OpenTelemetry setup
│   ├── auth/              # Authentication utilities
│   ├── bullmq/            # Queue management
│   ├── chunking/          # Text chunking
│   ├── postgres/          # Database client
│   ├── redis/             # Redis client
│   └── templates/         # Default agents
├── types/                 # TypeScript type definitions
└── mintlify-docs/        # Documentation source

认证

Exulu IMP支持多种认证方法:

API 密钥认证

import { ExuluAuthentication, postgresClient } from "@exulu/backend";

const { db } = await postgresClient();
const result = await ExuluAuthentication.authenticate({
  apikey: "sk_abc123.../production-api-key",
  db
});

if (!result.error) {
  console.log(`Authenticated as: ${result.user?.email}`);
}

下一个会话符号

import { getToken } from "next-auth/jwt";

const token = await getToken({ req });
const result = await ExuluAuthentication.authenticate({
  authtoken: token,
  db
});

内部服务密钥

const result = await ExuluAuthentication.authenticate({
  internalkey: process.env.INTERNAL_SECRET,
  db
});

评价框架

测试和测量剂性能:

import { ExuluEval } from "@exulu/backend";

const evaluation = new ExuluEval({
  id: "accuracy",
  name: "Response Accuracy",
  description: "Measures response accuracy",
  llm: false,
  execute: async ({ messages, testCase }) => {
    const response = messages[messages.length - 1]?.content || "";
    return response === testCase.expected_output ? 100 : 0;
  }
});

const score = await evaluation.run(agent, backend, testCase, messages);
console.log(`Score: ${score}/100`);

QQ 开元集成

以分布式追踪和记录监视您的应用程序 :

import { ExuluOtel } from "@exulu/backend";

const otel = ExuluOtel.create({
  SIGNOZ_TRACES_URL: process.env.SIGNOZ_TRACES_URL!,
  SIGNOZ_LOGS_URL: process.env.SIGNOZ_LOGS_URL!,
  SIGNOZ_ACCESS_TOKEN: process.env.SIGNOZ_ACCESS_TOKEN!
});

otel.start();

// Enable in ExuluApp
await app.create({
  config: {
    telemetry: { enabled: true },
    workers: {
      telemetry: { enabled: true },
      enabled: true
    }
  }
});

环境变量

创建一个 .env 文件为 :

# Database
DATABASE_URL=postgresql://user:password@localhost:5432/exulu

# NextAuth
NEXTAUTH_SECRET=your-secret-key

# Redis (optional, for workers)
REDIS_HOST=localhost
REDIS_PORT=6379

# S3 Storage (optional, for file uploads)
COMPANION_S3_REGION=us-east-1
COMPANION_S3_KEY=your-key
COMPANION_S3_SECRET=your-secret
COMPANION_S3_BUCKET=exulu-uploads
COMPANION_S3_ENDPOINT=https://s3.amazonaws.com

# OpenTelemetry (optional)
SIGNOZ_TRACES_URL=http://localhost:4318/v1/traces
SIGNOZ_LOGS_URL=http://localhost:4318/v1/logs
SIGNOZ_ACCESS_TOKEN=your-token

完整实例

对a 生产准备实施,参见 Exulu 示例仓库数字 :

git clone https://github.com/Qventu/exulu-example.git
cd exulu-example
npm install
docker compose up -d
npm run utils:initdb
npm run dev:server

例子包括:

  • 所有服务的多克编曲
  • 数据库初始化
  • 预配置代理
  • ✅ 上下文示例
  • 自定义工具
  • * 工人执行
  • 环境模板

添加管理员前端 :

# In a new terminal window
npx @exulu/frontend

访问 http://localhost:3001 访问管理员界面。 见 Exulu 前端页面 更多细节.

审计记录

启用可审计的 S3 支持的工具调用线索( 代理调用哪个) 工具,代表谁,使用何种证书身份,携带何种有效载荷. 默认关闭。 通过 ExuluApp.create({ config })数字 :

await app.create({
  tools,
  config: {
    // ...existing config...
    audit: {
      enabled: true,
      retentionDays: 90,            // S3 lifecycle expiry
      // Optional: a dedicated, isolated bucket. Omit to reuse `fileUploads`.
      s3: {
        s3region: process.env.AUDIT_S3_REGION!,
        s3key: process.env.AUDIT_S3_KEY!,
        s3secret: process.env.AUDIT_S3_SECRET!,
        s3Bucket: process.env.AUDIT_S3_BUCKET!,
        s3prefix: "audit/",
      },
      // failureMode: "open" (default) | "closed"
      // sources: { toolCalls: { exclude: ["noisy_tool"] } },
    },
  },
});

记录作为新线限制 JSON 下 audit/dt=2026-07-28/14/1753970400000-3f8c2a1b.ndjson。 。 。 . 秘密材料从不记录 仅限 证书身份(提供人、账户、认证Type、非秘密范围/期限). 重用共享时 fileUploads 桶子,S3的生命周期规则不是 自动应用( 避免触碰同样持有用户文件的桶); 启动时输入要应用的确切规则。 设定 manageLifecycle: true 改为 无论如何,应用它.

发展

# Install dependencies
npm install

# Build package
npm run build

# Run tests
npm test

# Lint code
npm run lint

# Format code
npm run format

# Type check
npm run type-check

实例

RAG 应用程序

const context = new ExuluContext({
  id: "knowledge",
  name: "Knowledge Base",
  description: "Company knowledge base",
  embedder,
  tableName: "knowledge_items"
});

const agent = new ExuluAgent({
  id: "rag-agent",
  name: "RAG Assistant",
  provider: "anthropic",
  config: {
    instructions: "Answer questions using the knowledge base.",
    model: { create: ({ apiKey }) => anthropic("claude-sonnet-4-5", apiKey) }
  }
});

await app.create({
  agents: [agent],
  contexts: { knowledge: context }
});

// Agent automatically searches context when answering

多代理工作流程

const researchAgent = new ExuluAgent({
  id: "researcher",
  name: "Research Agent",
  provider: "openai",
  config: { /* ... */ }
});

const writerAgent = new ExuluAgent({
  id: "writer",
  name: "Writer Agent",
  provider: "anthropic",
  config: { /* ... */ }
});

await app.create({
  agents: [researchAgent, writerAgent],
  contexts: {},
  tools: [webSearchTool, documentTool]
});

API 集成的自定义工具

const slackTool = new ExuluTool({
  id: "send_slack_message",
  name: "Send Slack Message",
  description: "Send a message to a Slack channel",
  parameters: z.object({
    channel: z.string(),
    message: z.string()
  }),
  execute: async ({ channel, message }) => {
    const response = await fetch("https://slack.com/api/chat.postMessage", {
      method: "POST",
      headers: {
        "Authorization": `Bearer ${process.env.SLACK_TOKEN}`,
        "Content-Type": "application/json"
      },
      body: JSON.stringify({ channel, text: message })
    });
    return await response.json();
  }
});

需要帮忙吗?

* 路线图

看看我们 路线图讨论 看看我们在研究什么 并提出特征.

许可证

这个项目的许可证根据 商业执照。见 exulu.com (英语) 许可信息.

这个 Exulu 示例项目 根据麻省理工学院的许可是开源的.

Exulu 前端页面 →

GitHub stars

用 Next.js 15 构建的现代管理界面
管理代理、背景和工作流程

Exulu 示例 →

GitHub stars

完整执行实例
配置所有服务的嵌入器设置

{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}在GitHub上盯着我们

如果你觉得Exulu IMP有用 就给我们一颗星 它帮助其他人发现这个项目.

Star History Chart

感谢所有贡献者



欧克鲁·IMP - 情报管理平台

由 Q 制作 克文图

网站 • 妇女 文档 • 妇女 前端 • 妇女 解析器

版本与发布记录

@exulu/backend 共发布 192 个版本,首次发布于 2025/05/22;过去 12 个月发布了 108 个版本。

版本发布日期距今
5.11.1latest2026/11/13今天
5.11.02026/11/131 天前
5.10.12026/11/121 天前
5.10.02026/11/112 天前
5.9.02026/11/094 天前
5.8.22026/11/0410 天前

关于 @exulu/backend 的常见问题

@exulu/backend 是什么?

欧克鲁·IMP (Intelligence Management平台)是一个开源的TypeScript框架,用于构建生产准备的AI代理应用程序. 它为管理代理、语义搜索背景、背景工作处理提供后端基础设施,a

如何安装 @exulu/backend?

在项目目录运行 npm install @exulu/backend,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:typescript(^5.8.3)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。它还提供命令行工具 backend、setup-python、exulu-start-whisper,可以用 npx backend 直接运行。

@exulu/backend 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@exulu/backend 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@exulu/backend 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js 22.18.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@exulu/backend 可以商用吗?

@exulu/backend 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@exulu/backend 的下载量有多少?

根据 npm 官方下载统计,@exulu/backend 在 2026/10/14 – 2026/11/12 这 30 天内被下载 3,926 次,日均约 131 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@exulu/backend 还在维护吗?

最新版本 5.11.1 发布于 2026/11/13(今天);至今共发布 192 个版本,其中过去 12 个月发布了 108 个;首次发布于 2025/05/22。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。