@exulu/backend 1.48.2 → 1.49.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 (164) hide show
  1. package/dist/index.cjs +351 -42
  2. package/dist/index.d.cts +96 -1
  3. package/dist/index.d.ts +96 -1
  4. package/dist/index.js +340 -38
  5. package/ee/{markdown.ts → chunking/markdown.ts} +2 -2
  6. package/ee/python/README.md +295 -0
  7. package/ee/python/documents/processing/README.md +155 -0
  8. package/ee/{documents → python/documents}/processing/doc_processor.ts +25 -17
  9. package/ee/{documents/processing/pdf_to_markdown.py → python/documents/processing/document_to_markdown.py} +3 -10
  10. package/ee/python/setup.sh +180 -0
  11. package/package.json +14 -3
  12. package/scripts/postinstall.cjs +149 -0
  13. package/.agents/skills/mintlify/SKILL.md +0 -347
  14. package/.editorconfig +0 -15
  15. package/.eslintrc.json +0 -52
  16. package/.github/workflows/release-backend.yml +0 -38
  17. package/.husky/commit-msg +0 -1
  18. package/.jscpd.json +0 -18
  19. package/.mcp.json +0 -25
  20. package/.nvmrc +0 -1
  21. package/.prettierignore +0 -5
  22. package/.prettierrc.json +0 -12
  23. package/CHANGELOG.md +0 -8
  24. package/SECURITY.md +0 -5
  25. package/commitlint.config.js +0 -4
  26. package/devops/documentation/patch-older-releases.md +0 -42
  27. package/ee/documents/processing/build_pdf_processor.sh +0 -35
  28. package/ee/documents/processing/chunk_markdown.py +0 -263
  29. package/ee/documents/processing/pdf_processor.spec +0 -115
  30. package/eslint.config.js +0 -88
  31. package/jest.config.ts +0 -25
  32. package/mintlify-docs/.mintignore +0 -7
  33. package/mintlify-docs/AGENTS.md +0 -33
  34. package/mintlify-docs/CLAUDE.MD +0 -50
  35. package/mintlify-docs/CONTRIBUTING.md +0 -32
  36. package/mintlify-docs/LICENSE +0 -21
  37. package/mintlify-docs/README.md +0 -55
  38. package/mintlify-docs/ai-tools/claude-code.mdx +0 -43
  39. package/mintlify-docs/ai-tools/cursor.mdx +0 -39
  40. package/mintlify-docs/ai-tools/windsurf.mdx +0 -39
  41. package/mintlify-docs/api-reference/core-types/agent-types.mdx +0 -110
  42. package/mintlify-docs/api-reference/core-types/analytics-types.mdx +0 -95
  43. package/mintlify-docs/api-reference/core-types/configuration-types.mdx +0 -83
  44. package/mintlify-docs/api-reference/core-types/evaluation-types.mdx +0 -106
  45. package/mintlify-docs/api-reference/core-types/job-types.mdx +0 -135
  46. package/mintlify-docs/api-reference/core-types/overview.mdx +0 -73
  47. package/mintlify-docs/api-reference/core-types/prompt-types.mdx +0 -102
  48. package/mintlify-docs/api-reference/core-types/rbac-types.mdx +0 -163
  49. package/mintlify-docs/api-reference/core-types/session-types.mdx +0 -77
  50. package/mintlify-docs/api-reference/core-types/user-management.mdx +0 -112
  51. package/mintlify-docs/api-reference/core-types/workflow-types.mdx +0 -88
  52. package/mintlify-docs/api-reference/core-types.mdx +0 -585
  53. package/mintlify-docs/api-reference/dynamic-types.mdx +0 -851
  54. package/mintlify-docs/api-reference/endpoint/create.mdx +0 -4
  55. package/mintlify-docs/api-reference/endpoint/delete.mdx +0 -4
  56. package/mintlify-docs/api-reference/endpoint/get.mdx +0 -4
  57. package/mintlify-docs/api-reference/endpoint/webhook.mdx +0 -4
  58. package/mintlify-docs/api-reference/introduction.mdx +0 -661
  59. package/mintlify-docs/api-reference/mutations.mdx +0 -1012
  60. package/mintlify-docs/api-reference/openapi.json +0 -217
  61. package/mintlify-docs/api-reference/queries.mdx +0 -1154
  62. package/mintlify-docs/backend/introduction.mdx +0 -218
  63. package/mintlify-docs/changelog.mdx +0 -387
  64. package/mintlify-docs/community-edition.mdx +0 -304
  65. package/mintlify-docs/core/exulu-agent/api-reference.mdx +0 -894
  66. package/mintlify-docs/core/exulu-agent/configuration.mdx +0 -690
  67. package/mintlify-docs/core/exulu-agent/introduction.mdx +0 -552
  68. package/mintlify-docs/core/exulu-app/api-reference.mdx +0 -481
  69. package/mintlify-docs/core/exulu-app/configuration.mdx +0 -319
  70. package/mintlify-docs/core/exulu-app/introduction.mdx +0 -117
  71. package/mintlify-docs/core/exulu-authentication.mdx +0 -810
  72. package/mintlify-docs/core/exulu-chunkers/api-reference.mdx +0 -1011
  73. package/mintlify-docs/core/exulu-chunkers/configuration.mdx +0 -596
  74. package/mintlify-docs/core/exulu-chunkers/introduction.mdx +0 -403
  75. package/mintlify-docs/core/exulu-context/api-reference.mdx +0 -911
  76. package/mintlify-docs/core/exulu-context/configuration.mdx +0 -648
  77. package/mintlify-docs/core/exulu-context/introduction.mdx +0 -394
  78. package/mintlify-docs/core/exulu-database.mdx +0 -811
  79. package/mintlify-docs/core/exulu-default-agents.mdx +0 -545
  80. package/mintlify-docs/core/exulu-eval/api-reference.mdx +0 -772
  81. package/mintlify-docs/core/exulu-eval/configuration.mdx +0 -680
  82. package/mintlify-docs/core/exulu-eval/introduction.mdx +0 -459
  83. package/mintlify-docs/core/exulu-logging.mdx +0 -464
  84. package/mintlify-docs/core/exulu-otel.mdx +0 -670
  85. package/mintlify-docs/core/exulu-queues/api-reference.mdx +0 -648
  86. package/mintlify-docs/core/exulu-queues/configuration.mdx +0 -650
  87. package/mintlify-docs/core/exulu-queues/introduction.mdx +0 -474
  88. package/mintlify-docs/core/exulu-reranker/api-reference.mdx +0 -630
  89. package/mintlify-docs/core/exulu-reranker/configuration.mdx +0 -663
  90. package/mintlify-docs/core/exulu-reranker/introduction.mdx +0 -516
  91. package/mintlify-docs/core/exulu-tool/api-reference.mdx +0 -723
  92. package/mintlify-docs/core/exulu-tool/configuration.mdx +0 -805
  93. package/mintlify-docs/core/exulu-tool/introduction.mdx +0 -539
  94. package/mintlify-docs/core/exulu-variables/api-reference.mdx +0 -699
  95. package/mintlify-docs/core/exulu-variables/configuration.mdx +0 -736
  96. package/mintlify-docs/core/exulu-variables/introduction.mdx +0 -511
  97. package/mintlify-docs/development.mdx +0 -94
  98. package/mintlify-docs/docs.json +0 -248
  99. package/mintlify-docs/enterprise-edition.mdx +0 -538
  100. package/mintlify-docs/essentials/code.mdx +0 -35
  101. package/mintlify-docs/essentials/images.mdx +0 -59
  102. package/mintlify-docs/essentials/markdown.mdx +0 -88
  103. package/mintlify-docs/essentials/navigation.mdx +0 -87
  104. package/mintlify-docs/essentials/reusable-snippets.mdx +0 -110
  105. package/mintlify-docs/essentials/settings.mdx +0 -318
  106. package/mintlify-docs/favicon.svg +0 -3
  107. package/mintlify-docs/frontend/introduction.mdx +0 -39
  108. package/mintlify-docs/getting-started.mdx +0 -267
  109. package/mintlify-docs/guides/custom-agent.mdx +0 -608
  110. package/mintlify-docs/guides/first-agent.mdx +0 -315
  111. package/mintlify-docs/images/admin_ui.png +0 -0
  112. package/mintlify-docs/images/contexts.png +0 -0
  113. package/mintlify-docs/images/create_agents.png +0 -0
  114. package/mintlify-docs/images/evals.png +0 -0
  115. package/mintlify-docs/images/graphql.png +0 -0
  116. package/mintlify-docs/images/graphql_api.png +0 -0
  117. package/mintlify-docs/images/hero-dark.png +0 -0
  118. package/mintlify-docs/images/hero-light.png +0 -0
  119. package/mintlify-docs/images/hero.png +0 -0
  120. package/mintlify-docs/images/knowledge_sources.png +0 -0
  121. package/mintlify-docs/images/mcp.png +0 -0
  122. package/mintlify-docs/images/scaling.png +0 -0
  123. package/mintlify-docs/index.mdx +0 -411
  124. package/mintlify-docs/logo/dark.svg +0 -9
  125. package/mintlify-docs/logo/light.svg +0 -9
  126. package/mintlify-docs/partners.mdx +0 -558
  127. package/mintlify-docs/products.mdx +0 -77
  128. package/mintlify-docs/snippets/snippet-intro.mdx +0 -4
  129. package/mintlify-docs/styles.css +0 -207
  130. package/ngrok.bash +0 -1
  131. package/ngrok.md +0 -6
  132. package/ngrok.yml +0 -10
  133. package/release.config.cjs +0 -15
  134. package/skills-lock.json +0 -10
  135. package/types/context-processor.ts +0 -45
  136. package/types/enums/eval-types.ts +0 -5
  137. package/types/enums/field-types.ts +0 -1
  138. package/types/enums/jobs.ts +0 -11
  139. package/types/enums/statistics.ts +0 -13
  140. package/types/exulu-table-definition.ts +0 -79
  141. package/types/file-types.ts +0 -18
  142. package/types/models/agent-session.ts +0 -27
  143. package/types/models/agent.ts +0 -68
  144. package/types/models/context.ts +0 -53
  145. package/types/models/embedding.ts +0 -17
  146. package/types/models/eval-run.ts +0 -40
  147. package/types/models/exulu-agent-tool-config.ts +0 -11
  148. package/types/models/item.ts +0 -21
  149. package/types/models/job.ts +0 -8
  150. package/types/models/project.ts +0 -16
  151. package/types/models/rate-limiter-rules.ts +0 -7
  152. package/types/models/test-case.ts +0 -25
  153. package/types/models/tool.ts +0 -9
  154. package/types/models/user-role.ts +0 -12
  155. package/types/models/user.ts +0 -20
  156. package/types/models/variable.ts +0 -8
  157. package/types/models/vector-methods.ts +0 -7
  158. package/types/provider-config.ts +0 -21
  159. package/types/queue-config.ts +0 -16
  160. package/types/rbac-rights-modes.ts +0 -1
  161. package/types/statistics.ts +0 -20
  162. package/types/workflow.ts +0 -31
  163. /package/ee/{documents → python/documents}/THIRD_PARTY_LICENSES/docling.txt +0 -0
  164. /package/ee/{documents/processing → python}/requirements.txt +0 -0
@@ -1,552 +0,0 @@
1
- ---
2
- title: "Overview"
3
- description: "AI agents powered by LLMs that execute tasks, use tools, and interact with users"
4
- ---
5
-
6
- ## Overview
7
-
8
- `ExuluAgent` represents an AI agent that processes requests using large language models (LLMs). Agents can execute tasks, call tools, maintain conversations, and generate structured outputs. They serve as the primary interface between users and your AI application.
9
-
10
- ## Key features
11
-
12
- <CardGroup cols={2}>
13
- <Card title="Multi-provider support" icon="network-wired">
14
- Built-in support for OpenAI, Anthropic, Google, Cerebras, and custom providers
15
- </Card>
16
- <Card title="Tool calling" icon="wrench">
17
- Agents can use tools to query databases, call APIs, and perform actions
18
- </Card>
19
- <Card title="Streaming responses" icon="stream">
20
- Real-time streaming for progressive response generation
21
- </Card>
22
- <Card title="Memory integration" icon="brain">
23
- Optional context-based memory for persistent knowledge
24
- </Card>
25
- <Card title="Multi-modal support" icon="file-image">
26
- Process text, images, documents, audio, and video
27
- </Card>
28
- <Card title="Structured outputs" icon="code">
29
- Generate validated JSON outputs with Zod schemas
30
- </Card>
31
- </CardGroup>
32
-
33
- ## What is an agent?
34
-
35
- An agent is an LLM-powered entity that:
36
-
37
- 1. **Receives input** from users or other agents (text, images, files, etc.)
38
- 2. **Processes the request** using an LLM with custom instructions
39
- 3. **Uses tools** to query information or perform actions
40
- 4. **Generates responses** as text or structured data
41
- 5. **Maintains conversation history** across multiple interactions
42
-
43
- Think of agents as intelligent assistants that can understand context, make decisions, and take actions on behalf of users.
44
-
45
- ## Quick start
46
-
47
- ```typescript
48
- import { ExuluAgent } from "@exulu/backend";
49
- import { createOpenAI } from "@ai-sdk/openai";
50
-
51
- // Create an agent
52
- const assistantAgent = new ExuluAgent({
53
- id: "assistant",
54
- name: "Assistant",
55
- type: "agent",
56
- description: "A helpful AI assistant",
57
- provider: "openai",
58
- config: {
59
- name: "gpt-4o",
60
- model: {
61
- create: ({ apiKey }) => createOpenAI({ apiKey })("gpt-4o")
62
- },
63
- instructions: "You are a helpful assistant. Answer questions clearly and concisely."
64
- },
65
- capabilities: {
66
- text: true,
67
- images: [".png", ".jpg", ".jpeg"],
68
- files: [".pdf", ".docx", ".txt"],
69
- audio: [],
70
- video: []
71
- }
72
- });
73
-
74
- // Register with ExuluApp
75
- const app = new ExuluApp();
76
- await app.create({
77
- agents: {
78
- assistant: assistantAgent
79
- },
80
- config: { /* ... */ }
81
- });
82
-
83
- // Use the agent
84
- const response = await assistantAgent.generateSync({
85
- prompt: "What is the capital of France?",
86
- agentInstance: await loadAgent("assistant"),
87
- currentTools: [],
88
- statistics: {
89
- label: "assistant",
90
- trigger: "api"
91
- }
92
- });
93
-
94
- console.log(response); // "The capital of France is Paris."
95
- ```
96
-
97
- ## Agent types
98
-
99
- Exulu IMP includes pre-built agents for major providers:
100
-
101
- <Tabs>
102
- <Tab title="OpenAI">
103
- ```typescript
104
- import { ExuluDefaultAgents } from "@exulu/backend";
105
-
106
- const gpt4Agent = ExuluDefaultAgents.GPT_4O;
107
- const gpt5Agent = ExuluDefaultAgents.GPT_5;
108
- const o1Agent = ExuluDefaultAgents.O1;
109
- ```
110
-
111
- Available models: GPT-4o, GPT-4o-mini, GPT-4.1, GPT-5, O1, O1-mini, O3-mini
112
- </Tab>
113
-
114
- <Tab title="Anthropic">
115
- ```typescript
116
- import { ExuluDefaultAgents } from "@exulu/backend";
117
-
118
- const claudeSonnet = ExuluDefaultAgents.CLAUDE_SONNET_4_5;
119
- const claudeOpus = ExuluDefaultAgents.CLAUDE_OPUS_4;
120
- ```
121
-
122
- Available models: Claude Opus 4, Claude Sonnet 4, Claude Sonnet 4.5
123
- </Tab>
124
-
125
- <Tab title="Google">
126
- ```typescript
127
- import { ExuluDefaultAgents } from "@exulu/backend";
128
-
129
- const gemini = ExuluDefaultAgents.GEMINI_2_5_FLASH;
130
- const geminiPro = ExuluDefaultAgents.GEMINI_2_5_PRO;
131
- ```
132
-
133
- Available models: Gemini 2.5 Flash, Gemini 2.5 Pro
134
- </Tab>
135
-
136
- <Tab title="Other providers">
137
- ```typescript
138
- import { ExuluDefaultAgents } from "@exulu/backend";
139
-
140
- const llama = ExuluDefaultAgents.LLAMA_3_3;
141
- const cerebras = ExuluDefaultAgents.CEREBRAS_LLAMA;
142
- ```
143
-
144
- Also supports: Llama 3.3, Cerebras, DeepSeek, and custom providers
145
- </Tab>
146
- </Tabs>
147
-
148
- ## Architecture
149
-
150
- ### AI SDK integration
151
-
152
- ExuluAgent is built on Vercel's AI SDK, providing:
153
-
154
- - **Unified interface** across multiple LLM providers
155
- - **Streaming support** for real-time responses
156
- - **Tool calling** with automatic function execution
157
- - **Structured outputs** with Zod schema validation
158
-
159
- ```typescript
160
- import { streamText, generateText, generateObject } from "ai";
161
-
162
- // ExuluAgent uses these internally
163
- const response = await generateText({
164
- model: agent.model.create({ apiKey }),
165
- prompt: "Hello!",
166
- tools: convertedTools
167
- });
168
- ```
169
-
170
- ### Conversation management
171
-
172
- Agents maintain conversation history through sessions:
173
-
174
- ```typescript
175
- // Messages are stored in the database
176
- const session = "session-123";
177
- const previousMessages = await getAgentMessages({ session, user: userId });
178
-
179
- // New messages are appended
180
- const response = await agent.generateStream({
181
- message: newMessage,
182
- session: session,
183
- user: currentUser
184
- });
185
- ```
186
-
187
- ### Tool integration
188
-
189
- Agents can use any ExuluTool:
190
-
191
- ```typescript
192
- const agent = new ExuluAgent({
193
- // ... agent config
194
- });
195
-
196
- // Tools are provided at runtime
197
- const response = await agent.generateSync({
198
- prompt: "Search our docs for authentication",
199
- currentTools: [
200
- documentationSearchTool,
201
- databaseQueryTool,
202
- apiCallTool
203
- ]
204
- });
205
- ```
206
-
207
- ## Core concepts
208
-
209
- ### Instructions
210
-
211
- Instructions define the agent's behavior and personality:
212
-
213
- ```typescript
214
- config: {
215
- instructions: `You are a customer support agent for Acme Corp.
216
-
217
- Guidelines:
218
- - Be friendly and professional
219
- - Answer questions about our products and services
220
- - Escalate billing issues to human agents
221
- - Provide accurate, helpful information
222
-
223
- Company info:
224
- - Founded in 2020
225
- - Specializes in enterprise SaaS
226
- - 24/7 support available`
227
- }
228
- ```
229
-
230
- <Tip>
231
- Keep instructions clear and specific. Well-defined instructions significantly improve agent performance.
232
- </Tip>
233
-
234
- ### Capabilities
235
-
236
- Define what input types the agent can handle:
237
-
238
- ```typescript
239
- capabilities: {
240
- text: true, // Text input
241
- images: [".png", ".jpg", ".jpeg"], // Image files
242
- files: [".pdf", ".docx", ".txt"], // Document files
243
- audio: [".mp3", ".wav"], // Audio files
244
- video: [".mp4"] // Video files
245
- }
246
- ```
247
-
248
- ### Memory
249
-
250
- Agents can have persistent memory using ExuluContext:
251
-
252
- ```typescript
253
- const agent = new ExuluAgent({
254
- id: "assistant_with_memory",
255
- name: "Assistant with Memory",
256
- // ... other config
257
- config: {
258
- // ... model config
259
- memory: "user_interactions" // Context ID for memory
260
- }
261
- });
262
- ```
263
-
264
- When configured, the agent:
265
- 1. Searches relevant memories before responding
266
- 2. Can create new memory items during conversations
267
- 3. Maintains context across sessions
268
-
269
- ### Workflows
270
-
271
- Enable background task processing:
272
-
273
- ```typescript
274
- workflows: {
275
- enabled: true,
276
- queue: await ExuluQueues.register("agent_workflows")
277
- }
278
- ```
279
-
280
- ## Generation modes
281
-
282
- <Tabs>
283
- <Tab title="Streaming">
284
- Real-time progressive responses:
285
-
286
- ```typescript
287
- const { stream } = await agent.generateStream({
288
- message: userMessage,
289
- session: sessionId,
290
- user: currentUser,
291
- currentTools: tools,
292
- agentInstance: agentData
293
- });
294
-
295
- // Stream to client
296
- for await (const chunk of stream) {
297
- console.log(chunk);
298
- }
299
- ```
300
-
301
- Best for: Interactive chat, long responses, real-time feedback
302
- </Tab>
303
-
304
- <Tab title="Synchronous">
305
- Wait for complete response:
306
-
307
- ```typescript
308
- const response = await agent.generateSync({
309
- prompt: "Summarize this document",
310
- agentInstance: agentData,
311
- currentTools: tools
312
- });
313
-
314
- console.log(response); // Complete text response
315
- ```
316
-
317
- Best for: API calls, batch processing, background jobs
318
- </Tab>
319
-
320
- <Tab title="Structured output">
321
- Generate validated JSON:
322
-
323
- ```typescript
324
- const result = await agent.generateSync({
325
- prompt: "Extract key information from this text",
326
- outputSchema: z.object({
327
- title: z.string(),
328
- summary: z.string(),
329
- tags: z.array(z.string())
330
- }),
331
- agentInstance: agentData
332
- });
333
-
334
- console.log(result.title); // Type-safe access
335
- console.log(result.summary);
336
- console.log(result.tags);
337
- ```
338
-
339
- Best for: Data extraction, form filling, structured data generation
340
- </Tab>
341
- </Tabs>
342
-
343
- ## Usage patterns
344
-
345
- ### As a conversational assistant
346
-
347
- ```typescript
348
- const chatAgent = new ExuluAgent({
349
- id: "chat_assistant",
350
- name: "Chat Assistant",
351
- type: "agent",
352
- description: "Conversational AI assistant",
353
- provider: "openai",
354
- config: {
355
- name: "gpt-4o",
356
- model: {
357
- create: ({ apiKey }) => createOpenAI({ apiKey })("gpt-4o")
358
- },
359
- instructions: "You are a friendly, helpful assistant."
360
- },
361
- capabilities: {
362
- text: true,
363
- images: [".png", ".jpg"],
364
- files: [".pdf", ".txt"],
365
- audio: [],
366
- video: []
367
- }
368
- });
369
-
370
- // Stream responses
371
- const { stream } = await chatAgent.generateStream({
372
- message: newMessage,
373
- session: sessionId,
374
- user: currentUser,
375
- currentTools: [searchTool, calculatorTool]
376
- });
377
- ```
378
-
379
- ### As a data processor
380
-
381
- ```typescript
382
- const extractorAgent = new ExuluAgent({
383
- id: "data_extractor",
384
- name: "Data Extractor",
385
- type: "agent",
386
- description: "Extracts structured data from text",
387
- provider: "openai",
388
- config: {
389
- name: "gpt-4o-mini",
390
- model: {
391
- create: ({ apiKey }) => createOpenAI({ apiKey })("gpt-4o-mini")
392
- }
393
- },
394
- capabilities: {
395
- text: true,
396
- images: [],
397
- files: [".pdf", ".docx", ".txt"],
398
- audio: [],
399
- video: []
400
- }
401
- });
402
-
403
- // Generate structured output
404
- const data = await extractorAgent.generateSync({
405
- prompt: "Extract contact information from this email",
406
- outputSchema: z.object({
407
- name: z.string(),
408
- email: z.string().email(),
409
- phone: z.string().optional()
410
- })
411
- });
412
- ```
413
-
414
- ### As a tool for other agents
415
-
416
- Agents can call other agents as tools:
417
-
418
- ```typescript
419
- const specialistAgent = new ExuluAgent({
420
- id: "sql_specialist",
421
- name: "SQL Specialist",
422
- type: "agent",
423
- description: "Expert at writing SQL queries",
424
- provider: "openai",
425
- config: {
426
- name: "gpt-4o",
427
- model: { /* ... */ },
428
- instructions: "You are an expert SQL developer. Write optimized, secure queries."
429
- },
430
- capabilities: {
431
- text: true,
432
- images: [],
433
- files: [],
434
- audio: [],
435
- video: []
436
- }
437
- });
438
-
439
- // Export as tool
440
- const sqlTool = await specialistAgent.tool(
441
- "sql_specialist",
442
- [specialistAgent],
443
- contexts,
444
- rerankers
445
- );
446
-
447
- // Main agent can use it
448
- const mainAgent = new ExuluAgent({
449
- id: "main_assistant",
450
- name: "Main Assistant",
451
- type: "agent",
452
- description: "General assistant that can delegate to specialists",
453
- // ... config
454
- });
455
-
456
- const response = await mainAgent.generateSync({
457
- prompt: "Write a query to find top customers",
458
- currentTools: [sqlTool], // Main agent can call SQL specialist
459
- // ... other params
460
- });
461
- ```
462
-
463
- ## Multi-modal capabilities
464
-
465
- <AccordionGroup>
466
- <Accordion title="Text input">
467
- All agents support text input by default:
468
-
469
- ```typescript
470
- capabilities: {
471
- text: true
472
- }
473
- ```
474
- </Accordion>
475
-
476
- <Accordion title="Images">
477
- Agents can process images (PNG, JPG, JPEG, GIF, WebP):
478
-
479
- ```typescript
480
- capabilities: {
481
- text: true,
482
- images: [".png", ".jpg", ".jpeg", ".gif", ".webp"]
483
- }
484
- ```
485
-
486
- Images are passed directly to models that support vision (GPT-4o, Claude Opus, Gemini Pro).
487
- </Accordion>
488
-
489
- <Accordion title="Documents">
490
- Documents are converted to text before processing:
491
-
492
- ```typescript
493
- capabilities: {
494
- text: true,
495
- files: [".pdf", ".docx", ".xlsx", ".txt", ".md"]
496
- }
497
- ```
498
-
499
- ExuluAgent uses `officeparser` to extract text from documents.
500
- </Accordion>
501
-
502
- <Accordion title="Audio">
503
- Audio files can be processed if the model supports it:
504
-
505
- ```typescript
506
- capabilities: {
507
- text: true,
508
- audio: [".mp3", ".wav", ".m4a"]
509
- }
510
- ```
511
- </Accordion>
512
-
513
- <Accordion title="Video">
514
- Video files for models with video understanding:
515
-
516
- ```typescript
517
- capabilities: {
518
- text: true,
519
- video: [".mp4"]
520
- }
521
- ```
522
- </Accordion>
523
- </AccordionGroup>
524
-
525
- ## Best practices
526
-
527
- <Tip>
528
- **Clear instructions**: Write detailed, specific instructions. Include examples of desired behavior and edge cases to handle.
529
- </Tip>
530
-
531
- <Note>
532
- **Tool selection**: Provide only relevant tools to each agent. Too many tools can confuse the agent and increase latency.
533
- </Note>
534
-
535
- <Warning>
536
- **API key security**: Always use encrypted variables for API keys. Never hardcode credentials in agent configurations.
537
- </Warning>
538
-
539
- <Info>
540
- **Context length**: Monitor token usage and set appropriate `maxContextLength` to prevent exceeding model limits.
541
- </Info>
542
-
543
- ## Next steps
544
-
545
- <CardGroup cols={2}>
546
- <Card title="Configuration" icon="gear" href="/core/exulu-agent/configuration">
547
- Learn about all configuration options
548
- </Card>
549
- <Card title="API reference" icon="code" href="/core/exulu-agent/api-reference">
550
- Explore methods and properties
551
- </Card>
552
- </CardGroup>