欧克鲁·IMP (Intelligence Management平台)是一个开源的TypeScript框架,用于构建生产准备的AI代理应用程序. 它为管理代理、语义搜索背景、背景工作处理和工具集成提供了后端基础设施.
探索文档 • 妇女 社区帮助 • 妇女 * 路线图
[大 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 前端页面 提供一种美丽的、可制作的 管理界面 下一个.js 15, (中文(简体) ), 反应 19,以及 尾风 CSS。 。 。 .
|
* 特性
|
QQ 快速启动
自动连接到您的 Exulu IMP 后端! |
页: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平台由多个寄存器组成,共同工作:
|
• 后端
|
QQ 前端
|
示例
|
后端结构
@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 前端页面 →用 Next.js 15 构建的现代管理界面 管理代理、背景和工作流程 |
Exulu 示例 →完整执行实例 配置所有服务的嵌入器设置 |
{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}在GitHub上盯着我们
如果你觉得Exulu IMP有用 就给我们一颗星 它帮助其他人发现这个项目.


