@exulu/backend 1.46.0 → 1.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/.agents/skills/mintlify/SKILL.md +347 -0
  2. package/.editorconfig +15 -0
  3. package/.eslintrc.json +52 -0
  4. package/.jscpd.json +18 -0
  5. package/.prettierignore +5 -0
  6. package/.prettierrc.json +12 -0
  7. package/CHANGELOG.md +11 -4
  8. package/README.md +747 -0
  9. package/SECURITY.md +5 -0
  10. package/dist/index.cjs +12015 -10506
  11. package/dist/index.d.cts +725 -667
  12. package/dist/index.d.ts +725 -667
  13. package/dist/index.js +12034 -10518
  14. package/ee/LICENSE.md +62 -0
  15. package/ee/agentic-retrieval/index.ts +1109 -0
  16. package/ee/documents/THIRD_PARTY_LICENSES/docling.txt +31 -0
  17. package/ee/documents/processing/build_pdf_processor.sh +35 -0
  18. package/ee/documents/processing/chunk_markdown.py +263 -0
  19. package/ee/documents/processing/doc_processor.ts +635 -0
  20. package/ee/documents/processing/pdf_processor.spec +115 -0
  21. package/ee/documents/processing/pdf_to_markdown.py +420 -0
  22. package/ee/documents/processing/requirements.txt +4 -0
  23. package/ee/entitlements.ts +49 -0
  24. package/ee/markdown.ts +686 -0
  25. package/ee/queues/decorator.ts +140 -0
  26. package/ee/queues/queues.ts +156 -0
  27. package/ee/queues/server.ts +6 -0
  28. package/ee/rbac-resolver.ts +51 -0
  29. package/ee/rbac-update.ts +111 -0
  30. package/ee/schemas.ts +347 -0
  31. package/ee/tokenizer.ts +80 -0
  32. package/ee/workers.ts +1423 -0
  33. package/eslint.config.js +88 -0
  34. package/jest.config.ts +25 -0
  35. package/license.md +73 -49
  36. package/mintlify-docs/.mintignore +7 -0
  37. package/mintlify-docs/AGENTS.md +33 -0
  38. package/mintlify-docs/CLAUDE.MD +50 -0
  39. package/mintlify-docs/CONTRIBUTING.md +32 -0
  40. package/mintlify-docs/LICENSE +21 -0
  41. package/mintlify-docs/README.md +55 -0
  42. package/mintlify-docs/ai-tools/claude-code.mdx +43 -0
  43. package/mintlify-docs/ai-tools/cursor.mdx +39 -0
  44. package/mintlify-docs/ai-tools/windsurf.mdx +39 -0
  45. package/mintlify-docs/api-reference/core-types/agent-types.mdx +110 -0
  46. package/mintlify-docs/api-reference/core-types/analytics-types.mdx +95 -0
  47. package/mintlify-docs/api-reference/core-types/configuration-types.mdx +83 -0
  48. package/mintlify-docs/api-reference/core-types/evaluation-types.mdx +106 -0
  49. package/mintlify-docs/api-reference/core-types/job-types.mdx +135 -0
  50. package/mintlify-docs/api-reference/core-types/overview.mdx +73 -0
  51. package/mintlify-docs/api-reference/core-types/prompt-types.mdx +102 -0
  52. package/mintlify-docs/api-reference/core-types/rbac-types.mdx +163 -0
  53. package/mintlify-docs/api-reference/core-types/session-types.mdx +77 -0
  54. package/mintlify-docs/api-reference/core-types/user-management.mdx +112 -0
  55. package/mintlify-docs/api-reference/core-types/workflow-types.mdx +88 -0
  56. package/mintlify-docs/api-reference/core-types.mdx +585 -0
  57. package/mintlify-docs/api-reference/dynamic-types.mdx +851 -0
  58. package/mintlify-docs/api-reference/endpoint/create.mdx +4 -0
  59. package/mintlify-docs/api-reference/endpoint/delete.mdx +4 -0
  60. package/mintlify-docs/api-reference/endpoint/get.mdx +4 -0
  61. package/mintlify-docs/api-reference/endpoint/webhook.mdx +4 -0
  62. package/mintlify-docs/api-reference/introduction.mdx +661 -0
  63. package/mintlify-docs/api-reference/mutations.mdx +1012 -0
  64. package/mintlify-docs/api-reference/openapi.json +217 -0
  65. package/mintlify-docs/api-reference/queries.mdx +1154 -0
  66. package/mintlify-docs/backend/introduction.mdx +218 -0
  67. package/mintlify-docs/changelog.mdx +293 -0
  68. package/mintlify-docs/community-edition.mdx +304 -0
  69. package/mintlify-docs/core/exulu-agent/api-reference.mdx +894 -0
  70. package/mintlify-docs/core/exulu-agent/configuration.mdx +690 -0
  71. package/mintlify-docs/core/exulu-agent/introduction.mdx +552 -0
  72. package/mintlify-docs/core/exulu-app/api-reference.mdx +481 -0
  73. package/mintlify-docs/core/exulu-app/configuration.mdx +319 -0
  74. package/mintlify-docs/core/exulu-app/introduction.mdx +117 -0
  75. package/mintlify-docs/core/exulu-authentication.mdx +810 -0
  76. package/mintlify-docs/core/exulu-chunkers/api-reference.mdx +1011 -0
  77. package/mintlify-docs/core/exulu-chunkers/configuration.mdx +596 -0
  78. package/mintlify-docs/core/exulu-chunkers/introduction.mdx +403 -0
  79. package/mintlify-docs/core/exulu-context/api-reference.mdx +911 -0
  80. package/mintlify-docs/core/exulu-context/configuration.mdx +648 -0
  81. package/mintlify-docs/core/exulu-context/introduction.mdx +394 -0
  82. package/mintlify-docs/core/exulu-database.mdx +811 -0
  83. package/mintlify-docs/core/exulu-default-agents.mdx +545 -0
  84. package/mintlify-docs/core/exulu-eval/api-reference.mdx +772 -0
  85. package/mintlify-docs/core/exulu-eval/configuration.mdx +680 -0
  86. package/mintlify-docs/core/exulu-eval/introduction.mdx +459 -0
  87. package/mintlify-docs/core/exulu-logging.mdx +464 -0
  88. package/mintlify-docs/core/exulu-otel.mdx +670 -0
  89. package/mintlify-docs/core/exulu-queues/api-reference.mdx +648 -0
  90. package/mintlify-docs/core/exulu-queues/configuration.mdx +650 -0
  91. package/mintlify-docs/core/exulu-queues/introduction.mdx +474 -0
  92. package/mintlify-docs/core/exulu-reranker/api-reference.mdx +630 -0
  93. package/mintlify-docs/core/exulu-reranker/configuration.mdx +663 -0
  94. package/mintlify-docs/core/exulu-reranker/introduction.mdx +516 -0
  95. package/mintlify-docs/core/exulu-tool/api-reference.mdx +723 -0
  96. package/mintlify-docs/core/exulu-tool/configuration.mdx +805 -0
  97. package/mintlify-docs/core/exulu-tool/introduction.mdx +539 -0
  98. package/mintlify-docs/core/exulu-variables/api-reference.mdx +699 -0
  99. package/mintlify-docs/core/exulu-variables/configuration.mdx +736 -0
  100. package/mintlify-docs/core/exulu-variables/introduction.mdx +511 -0
  101. package/mintlify-docs/development.mdx +94 -0
  102. package/mintlify-docs/docs.json +248 -0
  103. package/mintlify-docs/enterprise-edition.mdx +538 -0
  104. package/mintlify-docs/essentials/code.mdx +35 -0
  105. package/mintlify-docs/essentials/images.mdx +59 -0
  106. package/mintlify-docs/essentials/markdown.mdx +88 -0
  107. package/mintlify-docs/essentials/navigation.mdx +87 -0
  108. package/mintlify-docs/essentials/reusable-snippets.mdx +110 -0
  109. package/mintlify-docs/essentials/settings.mdx +318 -0
  110. package/mintlify-docs/favicon.svg +3 -0
  111. package/mintlify-docs/frontend/introduction.mdx +39 -0
  112. package/mintlify-docs/getting-started.mdx +267 -0
  113. package/mintlify-docs/guides/custom-agent.mdx +608 -0
  114. package/mintlify-docs/guides/first-agent.mdx +315 -0
  115. package/mintlify-docs/images/admin_ui.png +0 -0
  116. package/mintlify-docs/images/contexts.png +0 -0
  117. package/mintlify-docs/images/create_agents.png +0 -0
  118. package/mintlify-docs/images/evals.png +0 -0
  119. package/mintlify-docs/images/graphql.png +0 -0
  120. package/mintlify-docs/images/graphql_api.png +0 -0
  121. package/mintlify-docs/images/hero-dark.png +0 -0
  122. package/mintlify-docs/images/hero-light.png +0 -0
  123. package/mintlify-docs/images/hero.png +0 -0
  124. package/mintlify-docs/images/knowledge_sources.png +0 -0
  125. package/mintlify-docs/images/mcp.png +0 -0
  126. package/mintlify-docs/images/scaling.png +0 -0
  127. package/mintlify-docs/index.mdx +411 -0
  128. package/mintlify-docs/logo/dark.svg +9 -0
  129. package/mintlify-docs/logo/light.svg +9 -0
  130. package/mintlify-docs/partners.mdx +558 -0
  131. package/mintlify-docs/products.mdx +77 -0
  132. package/mintlify-docs/snippets/snippet-intro.mdx +4 -0
  133. package/mintlify-docs/styles.css +207 -0
  134. package/{documentation → old-documentation}/logging.md +3 -3
  135. package/package.json +35 -4
  136. package/skills-lock.json +10 -0
  137. package/types/context-processor.ts +45 -0
  138. package/types/exulu-table-definition.ts +79 -0
  139. package/types/file-types.ts +18 -0
  140. package/types/models/agent.ts +10 -12
  141. package/types/models/exulu-agent-tool-config.ts +11 -0
  142. package/types/models/rate-limiter-rules.ts +7 -0
  143. package/types/provider-config.ts +21 -0
  144. package/types/queue-config.ts +16 -0
  145. package/types/rbac-rights-modes.ts +1 -0
  146. package/types/statistics.ts +20 -0
  147. package/types/workflow.ts +31 -0
  148. package/changelog-backend-10.11.2025_03.12.2025.md +0 -316
  149. package/types/models/agent-backend.ts +0 -15
  150. /package/{documentation → old-documentation}/otel.md +0 -0
  151. /package/{patch-older-releases-readme.md → old-documentation/patch-older-releases.md} +0 -0
package/README.md ADDED
@@ -0,0 +1,747 @@
1
+ <a href="https://exulu.com/"><img width="100%" src="https://mintlify.s3.us-west-1.amazonaws.com/exulu/images/create_agents.png" alt="Exulu IMP - Create, deploy and manage AI agents" /></a>
2
+
3
+ <br />
4
+ <br />
5
+
6
+ <p align="left">
7
+ <a href="https://github.com/Qventu/exulu-backend/actions"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/Qventu/exulu-backend/main.yml?style=flat-square"></a>
8
+ &nbsp;
9
+ <a href="https://discord.com/channels/936044636693221439"><img alt="Discord" src="https://img.shields.io/discord/936044636693221439?label=Discord&color=7289da&style=flat-square" /></a>
10
+ &nbsp;
11
+ <a href="https://www.npmjs.com/package/@exulu/backend"><img alt="npm downloads" src="https://img.shields.io/npm/dw/@exulu/backend?style=flat-square" /></a>
12
+ &nbsp;
13
+ <a href="https://www.npmjs.com/package/@exulu/backend"><img alt="npm version" src="https://img.shields.io/npm/v/@exulu/backend?style=flat-square" /></a>
14
+ &nbsp;
15
+ <img alt="Node.js version" src="https://img.shields.io/badge/Node.js-22.18.0-green?style=flat-square" />
16
+ </p>
17
+
18
+ <hr/>
19
+
20
+ <h4>
21
+ <a target="_blank" href="https://docs.exulu.com" rel="dofollow"><strong>📚 Explore the Docs</strong></a>&nbsp;&nbsp;·&nbsp;&nbsp;<a target="_blank" href="https://exulu.com/community-help" rel="dofollow"><strong>💬 Community Help</strong></a>&nbsp;&nbsp;·&nbsp;&nbsp;<a target="_blank" href="https://github.com/Qventu/exulu-backend/discussions/2" rel="dofollow"><strong>🗺️ Roadmap</strong></a>
22
+ </h4>
23
+
24
+ <hr/>
25
+
26
+ > [!IMPORTANT]
27
+ > ⭐ Star this repo to follow development and updates
28
+
29
+ **Exulu IMP** (Intelligence Management Platform) is an open-source TypeScript framework for building production-ready AI agent applications. It provides the backend infrastructure for managing agents, semantic search contexts, background job processing, and tool integrations.
30
+
31
+ <h3>✨ Why Exulu IMP?</h3>
32
+
33
+ <ul>
34
+ <li>🤖 <strong>Multi-provider agents</strong> - Built-in support for OpenAI, Anthropic, Google, Cerebras and any AI SDK provider</li>
35
+ <li>🔍 <strong>Semantic search</strong> - Vector-powered RAG with pgvector and automatic embedding generation</li>
36
+ <li>⚙️ <strong>Background workers</strong> - BullMQ-based job queues for long-running tasks</li>
37
+ <li>🔐 <strong>Authentication</strong> - API keys, NextAuth integration, and role-based access control</li>
38
+ <li>🛠️ <strong>Tool system</strong> - Extend agent capabilities with custom functions and external APIs</li>
39
+ <li>📦 <strong>Self-hosted</strong> - Deploy anywhere you want, no vendor lock-in</li>
40
+ <li>🔌 <strong>Express API</strong> - GraphQL and REST endpoints out of the box</li>
41
+ <li>📊 <strong>OpenTelemetry</strong> - Built-in logging and tracing with SigNoz integration</li>
42
+ <li>⚡ <strong>TypeScript-first</strong> - Fully typed with automatic type inference</li>
43
+ </ul>
44
+
45
+ ## 🚀 Quickstart
46
+
47
+ ### Installation
48
+
49
+ ```bash
50
+ npm install @exulu/backend
51
+ ```
52
+
53
+ ### Basic setup
54
+
55
+ ```typescript
56
+ import { ExuluApp, ExuluAgent, ExuluDefaultAgents } from "@exulu/backend";
57
+
58
+ const app = new ExuluApp();
59
+
60
+ await app.create({
61
+ config: {
62
+ express: { enabled: true, port: 3000 },
63
+ workers: { enabled: true },
64
+ telemetry: { enabled: false }
65
+ },
66
+ agents: [
67
+ ExuluDefaultAgents.anthropic.sonnet45,
68
+ ExuluDefaultAgents.openai.gpt5
69
+ ],
70
+ contexts: {},
71
+ tools: []
72
+ });
73
+
74
+ const server = await app.express.init();
75
+ server.listen(3000, () => {
76
+ console.log("🚀 Exulu IMP running on http://localhost:3000");
77
+ });
78
+ ```
79
+
80
+ **For a complete working example**, check out the [Exulu Example Repository](https://github.com/Qventu/exulu-example) which includes:
81
+
82
+ - Docker Compose setup for PostgreSQL, Redis, and MinIO
83
+ - Pre-configured agents and contexts
84
+ - Worker implementation
85
+ - Environment configuration templates
86
+ - Database initialization scripts
87
+
88
+ ## 🎨 Admin Frontend
89
+
90
+ <div align="center">
91
+
92
+ ### **[Exulu Frontend →](https://github.com/Qventu/exulu-frontend)**
93
+
94
+ <a href="https://github.com/Qventu/exulu-frontend">
95
+ <img src="https://img.shields.io/badge/Exulu-Frontend-16A34A?style=for-the-badge&logo=react&logoColor=white" alt="Exulu Frontend" />
96
+ </a>
97
+
98
+ **Modern React admin interface for managing your AI agents, contexts, and workflows**
99
+
100
+ </div>
101
+
102
+ The [**Exulu Frontend**](https://github.com/Qventu/exulu-frontend) provides a beautiful, production-ready admin interface built with **Next.js 15**, **React 19**, and **Tailwind CSS**.
103
+
104
+ <table>
105
+ <tr>
106
+ <td width="50%">
107
+
108
+ **✨ Features**
109
+ - 🎯 Agent management & configuration
110
+ - 📊 Real-time session monitoring
111
+ - 🗄️ Context & knowledge base management
112
+ - 🔧 Tool & workflow builder
113
+ - 👥 User & role management
114
+ - 📈 Usage statistics & analytics
115
+
116
+ </td>
117
+ <td width="50%">
118
+
119
+ **🚀 Quick Start**
120
+ ```bash
121
+ # Using npx (recommended)
122
+ npx @exulu/frontend
123
+
124
+ # Or install globally
125
+ npm install -g @exulu/frontend
126
+ exulu-frontend
127
+ ```
128
+
129
+ Connects to your Exulu IMP backend automatically!
130
+
131
+ </td>
132
+ </tr>
133
+ </table>
134
+
135
+ <details>
136
+ <a href="https://exulu.com/"><img width="100%" src="https://mintlify.s3.us-west-1.amazonaws.com/exulu/images/admin_ui.png" alt="Exulu IMP - Create, deploy and manage AI agents" /></a>
137
+
138
+ <br/>
139
+
140
+ **Agent Management**
141
+ <img src="https://mintlify.s3.us-west-1.amazonaws.com/exulu/images/create_agents.png" alt="Agent Management" />
142
+
143
+ **Session Monitoring**
144
+ <img src="https://mintlify.s3.us-west-1.amazonaws.com/exulu/images/agent_session.png" alt="Session Monitoring" />
145
+
146
+ </details>
147
+
148
+ <div align="center">
149
+
150
+ **[📦 GitHub Repository](https://github.com/Qventu/exulu-frontend)** • **[📚 Documentation](https://docs.exulu.com)** • **[🎮 Live Demo](https://demo.exulu.com)**
151
+
152
+ </div>
153
+
154
+ ---
155
+
156
+ ## 📖 Documentation
157
+
158
+ Visit **[docs.exulu.com](https://docs.exulu.com)** for comprehensive documentation including:
159
+
160
+ - **[Quickstart Guide](https://docs.exulu.com/quickstart)** - Get up and running in minutes
161
+ - **[Core Classes](https://docs.exulu.com/core/exulu-app/introduction)** - Learn about ExuluApp, ExuluAgent, ExuluContext, and more
162
+ - **[API Reference](https://docs.exulu.com/api-reference/introduction)** - Complete API documentation
163
+ - **[Configuration](https://docs.exulu.com/core/exulu-app/configuration)** - Detailed configuration options
164
+
165
+ ## 🏗️ Core concepts
166
+
167
+ ### ExuluApp
168
+
169
+ The main application class that orchestrates all components:
170
+
171
+ ```typescript
172
+ import { ExuluApp } from "@exulu/backend";
173
+
174
+ const agent = new ExuluAgent({
175
+ id: "assistant",
176
+ name: "Assistant",
177
+ provider: "anthropic",
178
+ type: "agent",
179
+ maxContextLength: 200000,
180
+ config: {
181
+ model: {
182
+ create: ({ apiKey }) => {
183
+ const anthropic = createAnthropic({ apiKey });
184
+ return anthropic.languageModel("claude-sonnet-4-5");
185
+ }
186
+ },
187
+ instructions: "You are a helpful assistant."
188
+ }
189
+ });
190
+
191
+ const app = new ExuluApp();
192
+ await app.create({
193
+ config: {},
194
+ agents: [agent],
195
+ contexts: {...},
196
+ tools: [...]
197
+ });
198
+ ```
199
+
200
+ ### ExuluAgent
201
+
202
+ Create AI agents with different LLM providers:
203
+
204
+ ```typescript
205
+ import { ExuluAgent } from "@exulu/backend";
206
+ import { createAnthropic } from "@ai-sdk/anthropic";
207
+
208
+ const agent = new ExuluAgent({
209
+ id: "assistant",
210
+ name: "Assistant",
211
+ provider: "anthropic",
212
+ type: "agent",
213
+ capabilities: {
214
+ text: true,
215
+ images: [".png", ".jpg"],
216
+ files: [".pdf", ".docx"]
217
+ },
218
+ maxContextLength: 200000,
219
+ config: {
220
+ model: {
221
+ create: ({ apiKey }) => {
222
+ const anthropic = createAnthropic({ apiKey });
223
+ return anthropic.languageModel("claude-sonnet-4-5");
224
+ }
225
+ },
226
+ instructions: "You are a helpful assistant."
227
+ }
228
+ });
229
+ ```
230
+
231
+ Or use **pre-configured agents**:
232
+
233
+ ```typescript
234
+ import { ExuluDefaultAgents } from "@exulu/backend";
235
+
236
+ // OpenAI
237
+ ExuluDefaultAgents.openai.gpt5;
238
+ ExuluDefaultAgents.openai.gpt4o;
239
+
240
+ // Anthropic
241
+ ExuluDefaultAgents.anthropic.opus4;
242
+ ExuluDefaultAgents.anthropic.sonnet45;
243
+
244
+ // Google
245
+ ExuluDefaultAgents.google.vertexGemini25Pro;
246
+
247
+ // Cerebras
248
+ ExuluDefaultAgents.cerebras.llama3370b;
249
+ ```
250
+
251
+ ### ExuluContext
252
+
253
+ Semantic search with vector embeddings for RAG:
254
+
255
+ ```typescript
256
+ import { ExuluContext, ExuluEmbedder } from "@exulu/backend";
257
+
258
+ const embedder = new ExuluEmbedder({
259
+ id: "embedder",
260
+ name: "OpenAI Embedder",
261
+ provider: "openai",
262
+ model: "text-embedding-3-small",
263
+ vectorDimensions: 1536,
264
+ authenticationInformation: process.env.OPENAI_API_KEY
265
+ });
266
+
267
+ const context = new ExuluContext({
268
+ id: "docs",
269
+ name: "Documentation",
270
+ description: "Product documentation",
271
+ embedder,
272
+ tableName: "docs_items",
273
+ fields: [
274
+ { name: "title", type: "string" },
275
+ { name: "url", type: "string" }
276
+ ]
277
+ });
278
+
279
+ // Add documents
280
+ await context.addItem({
281
+ content: "Product documentation content...",
282
+ metadata: { title: "Getting Started", url: "https://docs.example.com/start" }
283
+ });
284
+
285
+ // Search (automatically available to agents)
286
+ const results = await context.search("How do I get started?", 5);
287
+ ```
288
+
289
+ ### ExuluTool
290
+
291
+ Extend agent capabilities with custom functions:
292
+
293
+ ```typescript
294
+ import { ExuluTool } from "@exulu/backend";
295
+ import { z } from "zod";
296
+
297
+ const weatherTool = new ExuluTool({
298
+ id: "get_weather",
299
+ name: "Get Weather",
300
+ description: "Get current weather for a location",
301
+ parameters: z.object({
302
+ location: z.string().describe("City name")
303
+ }),
304
+ execute: async ({ location }) => {
305
+ const response = await fetch(`https://api.weather.com/${location}`);
306
+ return await response.json();
307
+ }
308
+ });
309
+ ```
310
+
311
+ ### ExuluDatabase
312
+
313
+ Initialize database and generate API keys:
314
+
315
+ ```typescript
316
+ import { ExuluDatabase } from "@exulu/backend";
317
+
318
+ // Initialize database with contexts
319
+ await ExuluDatabase.init({ contexts: [documentationContext] });
320
+
321
+ // Generate API key
322
+ const { key } = await ExuluDatabase.api.key.generate(
323
+ "Production API",
324
+ "api@example.com"
325
+ );
326
+ console.log(`API Key: ${key}`);
327
+ ```
328
+
329
+ ### Background workers
330
+
331
+ Process long-running tasks with BullMQ:
332
+
333
+ ```typescript
334
+ import { ExuluApp } from "@exulu/backend";
335
+
336
+ const app = new ExuluApp();
337
+ await app.create({
338
+ config: {
339
+ workers: { enabled: true }
340
+ },
341
+ // ... agents, contexts, tools
342
+ });
343
+
344
+ // Create worker to process jobs
345
+ const worker = await app.bullmq.workers.create();
346
+
347
+ // Worker automatically processes:
348
+ // - Embedding generation
349
+ // - Document chunking
350
+ // - Scheduled tasks
351
+ // - Custom queued jobs
352
+ ```
353
+
354
+ ## ⚙️ Requirements
355
+
356
+ - **Node.js**: 22.18.0 (enforced via `engines` in package.json)
357
+ - **PostgreSQL**: 13+ with pgvector extension
358
+ - **Redis**: Optional, only required if using background workers
359
+
360
+ ## 🗂️ Exulu IMP ecosystem
361
+
362
+ The Exulu IMP platform consists of multiple repositories working together:
363
+
364
+ <table>
365
+ <tr>
366
+ <td width="33%">
367
+
368
+ **🔧 Backend**
369
+ <br/>
370
+ [**@exulu/backend**](https://github.com/Qventu/exulu-backend)
371
+ <br/>
372
+ Core framework with agents, contexts, tools, and API
373
+
374
+ </td>
375
+ <td width="33%">
376
+
377
+ **🎨 Frontend**
378
+ <br/>
379
+ [**@exulu/frontend**](https://github.com/Qventu/exulu-frontend)
380
+ <br/>
381
+ Admin interface for managing agents and workflows
382
+
383
+ </td>
384
+ <td width="33%">
385
+
386
+ **📦 Example**
387
+ <br/>
388
+ [**exulu-example**](https://github.com/Qventu/exulu-example)
389
+ <br/>
390
+ Complete implementation with Docker setup
391
+
392
+ </td>
393
+ </tr>
394
+ </table>
395
+
396
+ ### Backend structure
397
+
398
+ ```
399
+ @exulu/backend/
400
+ ├── src/
401
+ │ ├── exulu/
402
+ │ │ ├── app/ # ExuluApp implementation
403
+ │ │ ├── agent.ts # ExuluAgent class
404
+ │ │ ├── context.ts # ExuluContext class
405
+ │ │ ├── tool.ts # ExuluTool class
406
+ │ │ ├── evals.ts # ExuluEval class
407
+ │ │ └── otel.ts # OpenTelemetry setup
408
+ │ ├── auth/ # Authentication utilities
409
+ │ ├── bullmq/ # Queue management
410
+ │ ├── chunking/ # Text chunking
411
+ │ ├── postgres/ # Database client
412
+ │ ├── redis/ # Redis client
413
+ │ └── templates/ # Default agents
414
+ ├── types/ # TypeScript type definitions
415
+ └── mintlify-docs/ # Documentation source
416
+ ```
417
+
418
+ ## 🔐 Authentication
419
+
420
+ Exulu IMP supports multiple authentication methods:
421
+
422
+ ### API Key authentication
423
+
424
+ ```typescript
425
+ import { ExuluAuthentication, postgresClient } from "@exulu/backend";
426
+
427
+ const { db } = await postgresClient();
428
+ const result = await ExuluAuthentication.authenticate({
429
+ apikey: "sk_abc123.../production-api-key",
430
+ db
431
+ });
432
+
433
+ if (!result.error) {
434
+ console.log(`Authenticated as: ${result.user?.email}`);
435
+ }
436
+ ```
437
+
438
+ ### NextAuth session tokens
439
+
440
+ ```typescript
441
+ import { getToken } from "next-auth/jwt";
442
+
443
+ const token = await getToken({ req });
444
+ const result = await ExuluAuthentication.authenticate({
445
+ authtoken: token,
446
+ db
447
+ });
448
+ ```
449
+
450
+ ### Internal service keys
451
+
452
+ ```typescript
453
+ const result = await ExuluAuthentication.authenticate({
454
+ internalkey: process.env.INTERNAL_SECRET,
455
+ db
456
+ });
457
+ ```
458
+
459
+ ## 📊 Evaluation framework
460
+
461
+ Test and measure agent performance:
462
+
463
+ ```typescript
464
+ import { ExuluEval } from "@exulu/backend";
465
+
466
+ const evaluation = new ExuluEval({
467
+ id: "accuracy",
468
+ name: "Response Accuracy",
469
+ description: "Measures response accuracy",
470
+ llm: false,
471
+ execute: async ({ messages, testCase }) => {
472
+ const response = messages[messages.length - 1]?.content || "";
473
+ return response === testCase.expected_output ? 100 : 0;
474
+ }
475
+ });
476
+
477
+ const score = await evaluation.run(agent, backend, testCase, messages);
478
+ console.log(`Score: ${score}/100`);
479
+ ```
480
+
481
+ ## 🔬 OpenTelemetry integration
482
+
483
+ Monitor your application with distributed tracing and logging:
484
+
485
+ ```typescript
486
+ import { ExuluOtel } from "@exulu/backend";
487
+
488
+ const otel = ExuluOtel.create({
489
+ SIGNOZ_TRACES_URL: process.env.SIGNOZ_TRACES_URL!,
490
+ SIGNOZ_LOGS_URL: process.env.SIGNOZ_LOGS_URL!,
491
+ SIGNOZ_ACCESS_TOKEN: process.env.SIGNOZ_ACCESS_TOKEN!
492
+ });
493
+
494
+ otel.start();
495
+
496
+ // Enable in ExuluApp
497
+ await app.create({
498
+ config: {
499
+ telemetry: { enabled: true },
500
+ workers: {
501
+ telemetry: { enabled: true },
502
+ enabled: true
503
+ }
504
+ }
505
+ });
506
+ ```
507
+
508
+ ## 🌍 Environment variables
509
+
510
+ Create a `.env` file with:
511
+
512
+ ```bash
513
+ # Database
514
+ DATABASE_URL=postgresql://user:password@localhost:5432/exulu
515
+
516
+ # NextAuth
517
+ NEXTAUTH_SECRET=your-secret-key
518
+
519
+ # Redis (optional, for workers)
520
+ REDIS_HOST=localhost
521
+ REDIS_PORT=6379
522
+
523
+ # S3 Storage (optional, for file uploads)
524
+ COMPANION_S3_REGION=us-east-1
525
+ COMPANION_S3_KEY=your-key
526
+ COMPANION_S3_SECRET=your-secret
527
+ COMPANION_S3_BUCKET=exulu-uploads
528
+ COMPANION_S3_ENDPOINT=https://s3.amazonaws.com
529
+
530
+ # OpenTelemetry (optional)
531
+ SIGNOZ_TRACES_URL=http://localhost:4318/v1/traces
532
+ SIGNOZ_LOGS_URL=http://localhost:4318/v1/logs
533
+ SIGNOZ_ACCESS_TOKEN=your-token
534
+ ```
535
+
536
+ ## 📦 Complete example
537
+
538
+ For a **production-ready implementation**, see the [Exulu Example Repository](https://github.com/Qventu/exulu-example):
539
+
540
+ ```bash
541
+ git clone https://github.com/Qventu/exulu-example.git
542
+ cd exulu-example
543
+ npm install
544
+ docker compose up -d
545
+ npm run utils:initdb
546
+ npm run dev:server
547
+ ```
548
+
549
+ The example includes:
550
+ - ✅ Docker Compose for all services
551
+ - ✅ Database initialization
552
+ - ✅ Pre-configured agents
553
+ - ✅ Context examples
554
+ - ✅ Custom tools
555
+ - ✅ Worker implementation
556
+ - ✅ Environment templates
557
+
558
+ **Add the admin frontend:**
559
+
560
+ ```bash
561
+ # In a new terminal window
562
+ npx @exulu/frontend
563
+ ```
564
+
565
+ Visit `http://localhost:3001` to access the admin interface. See the [**Exulu Frontend**](https://github.com/Qventu/exulu-frontend) repository for more details.
566
+
567
+ ## 🛠️ Development
568
+
569
+ ```bash
570
+ # Install dependencies
571
+ npm install
572
+
573
+ # Build package
574
+ npm run build
575
+
576
+ # Run tests
577
+ npm test
578
+
579
+ # Lint code
580
+ npm run lint
581
+
582
+ # Format code
583
+ npm run format
584
+
585
+ # Type check
586
+ npm run type-check
587
+ ```
588
+
589
+ ## 📚 Examples
590
+
591
+ ### RAG application
592
+
593
+ ```typescript
594
+ const context = new ExuluContext({
595
+ id: "knowledge",
596
+ name: "Knowledge Base",
597
+ description: "Company knowledge base",
598
+ embedder,
599
+ tableName: "knowledge_items"
600
+ });
601
+
602
+ const agent = new ExuluAgent({
603
+ id: "rag-agent",
604
+ name: "RAG Assistant",
605
+ provider: "anthropic",
606
+ config: {
607
+ instructions: "Answer questions using the knowledge base.",
608
+ model: { create: ({ apiKey }) => anthropic("claude-sonnet-4-5", apiKey) }
609
+ }
610
+ });
611
+
612
+ await app.create({
613
+ agents: [agent],
614
+ contexts: { knowledge: context }
615
+ });
616
+
617
+ // Agent automatically searches context when answering
618
+ ```
619
+
620
+ ### Multi-agent workflow
621
+
622
+ ```typescript
623
+ const researchAgent = new ExuluAgent({
624
+ id: "researcher",
625
+ name: "Research Agent",
626
+ provider: "openai",
627
+ config: { /* ... */ }
628
+ });
629
+
630
+ const writerAgent = new ExuluAgent({
631
+ id: "writer",
632
+ name: "Writer Agent",
633
+ provider: "anthropic",
634
+ config: { /* ... */ }
635
+ });
636
+
637
+ await app.create({
638
+ agents: [researchAgent, writerAgent],
639
+ contexts: {},
640
+ tools: [webSearchTool, documentTool]
641
+ });
642
+ ```
643
+
644
+ ### Custom tool with API integration
645
+
646
+ ```typescript
647
+ const slackTool = new ExuluTool({
648
+ id: "send_slack_message",
649
+ name: "Send Slack Message",
650
+ description: "Send a message to a Slack channel",
651
+ parameters: z.object({
652
+ channel: z.string(),
653
+ message: z.string()
654
+ }),
655
+ execute: async ({ channel, message }) => {
656
+ const response = await fetch("https://slack.com/api/chat.postMessage", {
657
+ method: "POST",
658
+ headers: {
659
+ "Authorization": `Bearer ${process.env.SLACK_TOKEN}`,
660
+ "Content-Type": "application/json"
661
+ },
662
+ body: JSON.stringify({ channel, text: message })
663
+ });
664
+ return await response.json();
665
+ }
666
+ });
667
+ ```
668
+
669
+ ## 🚨 Need help?
670
+
671
+ - 📖 **[Documentation](https://docs.exulu.com)** - Comprehensive guides and API reference
672
+ - 💬 **[Discord](https://discord.com/channels/936044636693221439)** - Join our community
673
+ - 🐛 **[GitHub Issues](https://github.com/Qventu/exulu-backend/issues)** - Report bugs
674
+ - 💡 **[GitHub Discussions](https://github.com/Qventu/exulu-backend/discussions)** - Ask questions
675
+
676
+ ## 🗺️ Roadmap
677
+
678
+ Check out our [Roadmap Discussion](https://github.com/Qventu/exulu-backend/discussions/2) to see what we're working on and suggest features.
679
+
680
+ ## 📄 License
681
+
682
+ This project is licensed under a **commercial license**. See [exulu.com](https://exulu.com) for licensing information.
683
+
684
+ The [Exulu Example Project](https://github.com/Qventu/exulu-example) is open source under the MIT License.
685
+
686
+ ## 🌟 Related projects
687
+
688
+ <table>
689
+ <tr>
690
+ <td width="50%" align="center">
691
+
692
+ ### [**Exulu Frontend** →](https://github.com/Qventu/exulu-frontend)
693
+ <a href="https://github.com/Qventu/exulu-frontend">
694
+ <img src="https://img.shields.io/github/stars/Qventu/exulu-frontend?style=social" alt="GitHub stars" />
695
+ </a>
696
+ <br/>
697
+ <br/>
698
+ Modern admin interface built with Next.js 15
699
+ <br/>
700
+ Manage agents, contexts, and workflows visually
701
+
702
+ </td>
703
+ <td width="50%" align="center">
704
+
705
+ ### [**Exulu Example** →](https://github.com/Qventu/exulu-example)
706
+ <a href="https://github.com/Qventu/exulu-example">
707
+ <img src="https://img.shields.io/github/stars/Qventu/exulu-example?style=social" alt="GitHub stars" />
708
+ </a>
709
+ <br/>
710
+ <br/>
711
+ Complete implementation example
712
+ <br/>
713
+ Docker setup with all services configured
714
+
715
+ </td>
716
+ </tr>
717
+ </table>
718
+
719
+ ## ⭐ Star us on GitHub
720
+
721
+ If you find Exulu IMP useful, give us a star! It helps others discover the project.
722
+
723
+ <a href="https://star-history.com/#Qventu/exulu-backend&Date">
724
+ <picture>
725
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=Qventu/exulu-backend&type=Date&theme=dark" />
726
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=Qventu/exulu-backend&type=Date" />
727
+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=Qventu/exulu-backend&type=Date" />
728
+ </picture>
729
+ </a>
730
+
731
+ ## 👏 Thanks to all our contributors
732
+
733
+ <img align="left" src="https://contributors-img.web.app/image?repo=Qventu/exulu-backend"/>
734
+
735
+ <br clear="left"/>
736
+
737
+ ---
738
+
739
+ <div align="center">
740
+
741
+ **Exulu IMP** - Intelligence Management Platform
742
+
743
+ Made with ❤️ by [Qventu](https://qventu.com)
744
+
745
+ [Website](https://exulu.com) · [Documentation](https://docs.exulu.com) · [Frontend](https://github.com/Qventu/exulu-frontend) · [Discord](https://discord.com/channels/936044636693221439)
746
+
747
+ </div>