@exulu/backend 1.46.1 → 1.48.1

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 +2 -2
  8. package/README.md +747 -0
  9. package/SECURITY.md +5 -0
  10. package/dist/index.cjs +11747 -10227
  11. package/dist/index.d.cts +725 -667
  12. package/dist/index.d.ts +725 -667
  13. package/dist/index.js +12043 -10516
  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 +348 -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 +387 -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/package.json +35 -4
  135. package/skills-lock.json +10 -0
  136. package/types/context-processor.ts +45 -0
  137. package/types/exulu-table-definition.ts +79 -0
  138. package/types/file-types.ts +18 -0
  139. package/types/models/agent.ts +10 -12
  140. package/types/models/exulu-agent-tool-config.ts +11 -0
  141. package/types/models/rate-limiter-rules.ts +7 -0
  142. package/types/provider-config.ts +21 -0
  143. package/types/queue-config.ts +16 -0
  144. package/types/rbac-rights-modes.ts +1 -0
  145. package/types/statistics.ts +20 -0
  146. package/types/workflow.ts +31 -0
  147. package/changelogs/10.11.2025_03.12.2025.md +0 -316
  148. package/documentation/logging.md +0 -122
  149. package/documentation/otel.md +0 -145
  150. package/types/models/agent-backend.ts +0 -15
  151. /package/{documentation → devops/documentation}/patch-older-releases.md +0 -0
@@ -0,0 +1,545 @@
1
+ ---
2
+ title: "ExuluDefaultAgents"
3
+ description: "Pre-configured agent instances for popular AI providers"
4
+ ---
5
+
6
+ ## Overview
7
+
8
+ `ExuluDefaultAgents` provides ready-to-use ExuluProvider configurations for popular AI providers supported by the [Vercel AI SDK](https://ai-sdk.dev/providers/ai-sdk-providers). These default agents are convenience wrappers that make it easy to get started with different providers without having to configure each one manually.
9
+
10
+ <Note>
11
+ ExuluDefaultAgents are merely implementations of AI SDK providers. You can easily create agents for **any provider** supported by the AI SDK by using the `ExuluProvider` class directly. See the [AI SDK providers documentation](https://ai-sdk.dev/providers/ai-sdk-providers) for the full list of available providers.
12
+ </Note>
13
+
14
+ ## Available default agents
15
+
16
+ ExuluDefaultAgents includes pre-configured agents for the most popular providers:
17
+
18
+ <CardGroup cols={2}>
19
+ <Card title="OpenAI" icon="openai">
20
+ GPT-4, GPT-4 Turbo, GPT-3.5, and more
21
+ </Card>
22
+ <Card title="Anthropic" icon="robot">
23
+ Claude Opus, Sonnet, and Haiku models
24
+ </Card>
25
+ <Card title="Google" icon="google">
26
+ Gemini Pro, Gemini Flash models
27
+ </Card>
28
+ <Card title="Custom providers" icon="plus">
29
+ Easy to add any AI SDK provider
30
+ </Card>
31
+ </CardGroup>
32
+
33
+ ## Quick start
34
+
35
+ ```typescript
36
+ import { ExuluDefaultAgents } from "@exulu/backend";
37
+
38
+ // Use a pre-configured agent (example - actual API depends on implementation)
39
+ const openaiAgent = ExuluDefaultAgents.openai;
40
+ const anthropicAgent = ExuluDefaultAgents.anthropic;
41
+ const googleAgent = ExuluDefaultAgents.google;
42
+ ```
43
+
44
+ <Info>
45
+ Default agents still require authentication credentials. Use [ExuluVariables](/core/exulu-variables/introduction) to manage API keys securely.
46
+ </Info>
47
+
48
+ ## Creating custom agents with AI SDK providers
49
+
50
+ While ExuluDefaultAgents provides convenient defaults, you can create agents for **any** provider supported by the AI SDK:
51
+
52
+ ### OpenAI
53
+
54
+ ```typescript
55
+ import { ExuluProvider } from "@exulu/backend";
56
+ import { createOpenAI } from "@ai-sdk/openai";
57
+
58
+ const openaiAgent = new ExuluProvider({
59
+ id: "openai_gpt4",
60
+ name: "OpenAI GPT-4",
61
+ type: "agent",
62
+ description: "GPT-4 powered agent",
63
+ provider: "openai",
64
+ config: {
65
+ name: "gpt-4o",
66
+ model: {
67
+ create: ({ apiKey }) => createOpenAI({ apiKey })("gpt-4o")
68
+ },
69
+ instructions: "You are a helpful AI assistant."
70
+ },
71
+ capabilities: {
72
+ text: true,
73
+ images: [".png", ".jpg", ".jpeg", ".gif", ".webp"],
74
+ files: [".pdf", ".txt"],
75
+ audio: [],
76
+ video: []
77
+ }
78
+ });
79
+ ```
80
+
81
+ **Available models:** `gpt-4o`, `gpt-4o-mini`, `gpt-4-turbo`, `gpt-4`, `gpt-3.5-turbo`
82
+
83
+ [OpenAI AI SDK Documentation](https://ai-sdk.dev/providers/ai-sdk-providers/openai)
84
+
85
+ ### Anthropic
86
+
87
+ ```typescript
88
+ import { ExuluProvider } from "@exulu/backend";
89
+ import { createAnthropic } from "@ai-sdk/anthropic";
90
+
91
+ const anthropicAgent = new ExuluProvider({
92
+ id: "anthropic_claude",
93
+ name: "Claude Opus 4",
94
+ type: "agent",
95
+ description: "Claude Opus 4 powered agent",
96
+ provider: "anthropic",
97
+ config: {
98
+ name: "claude-opus-4-20250514",
99
+ model: {
100
+ create: ({ apiKey }) => createAnthropic({ apiKey })("claude-opus-4-20250514")
101
+ },
102
+ instructions: "You are Claude, a helpful AI assistant."
103
+ },
104
+ capabilities: {
105
+ text: true,
106
+ images: [".png", ".jpg", ".jpeg", ".gif", ".webp"],
107
+ files: [".pdf", ".txt"],
108
+ audio: [],
109
+ video: []
110
+ }
111
+ });
112
+ ```
113
+
114
+ **Available models:** `claude-opus-4-20250514`, `claude-sonnet-4-20250514`, `claude-3-5-sonnet-20241022`, `claude-3-opus-20240229`, `claude-3-haiku-20240307`
115
+
116
+ [Anthropic AI SDK Documentation](https://ai-sdk.dev/providers/ai-sdk-providers/anthropic)
117
+
118
+ ### Google Generative AI
119
+
120
+ ```typescript
121
+ import { ExuluProvider } from "@exulu/backend";
122
+ import { createGoogleGenerativeAI } from "@ai-sdk/google";
123
+
124
+ const googleAgent = new ExuluProvider({
125
+ id: "google_gemini",
126
+ name: "Google Gemini Pro",
127
+ type: "agent",
128
+ description: "Gemini Pro powered agent",
129
+ provider: "google",
130
+ config: {
131
+ name: "gemini-2.0-flash-exp",
132
+ model: {
133
+ create: ({ apiKey }) => createGoogleGenerativeAI({ apiKey })("gemini-2.0-flash-exp")
134
+ },
135
+ instructions: "You are a helpful AI assistant."
136
+ },
137
+ capabilities: {
138
+ text: true,
139
+ images: [".png", ".jpg", ".jpeg", ".gif", ".webp"],
140
+ files: [],
141
+ audio: [],
142
+ video: []
143
+ }
144
+ });
145
+ ```
146
+
147
+ **Available models:** `gemini-2.0-flash-exp`, `gemini-1.5-pro`, `gemini-1.5-flash`, `gemini-1.0-pro`
148
+
149
+ [Google AI SDK Documentation](https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai)
150
+
151
+ ### Mistral
152
+
153
+ ```typescript
154
+ import { ExuluProvider } from "@exulu/backend";
155
+ import { createMistral } from "@ai-sdk/mistral";
156
+
157
+ const mistralAgent = new ExuluProvider({
158
+ id: "mistral_large",
159
+ name: "Mistral Large",
160
+ type: "agent",
161
+ description: "Mistral Large powered agent",
162
+ provider: "mistral",
163
+ config: {
164
+ name: "mistral-large-latest",
165
+ model: {
166
+ create: ({ apiKey }) => createMistral({ apiKey })("mistral-large-latest")
167
+ },
168
+ instructions: "You are a helpful AI assistant."
169
+ },
170
+ capabilities: {
171
+ text: true,
172
+ images: [],
173
+ files: [],
174
+ audio: [],
175
+ video: []
176
+ }
177
+ });
178
+ ```
179
+
180
+ **Available models:** `mistral-large-latest`, `mistral-small-latest`, `codestral-latest`
181
+
182
+ [Mistral AI SDK Documentation](https://ai-sdk.dev/providers/ai-sdk-providers/mistral)
183
+
184
+ ### Cohere
185
+
186
+ ```typescript
187
+ import { ExuluProvider } from "@exulu/backend";
188
+ import { createCohere } from "@ai-sdk/cohere";
189
+
190
+ const cohereAgent = new ExuluProvider({
191
+ id: "cohere_command",
192
+ name: "Cohere Command R+",
193
+ type: "agent",
194
+ description: "Cohere Command R+ powered agent",
195
+ provider: "cohere",
196
+ config: {
197
+ name: "command-r-plus",
198
+ model: {
199
+ create: ({ apiKey }) => createCohere({ apiKey })("command-r-plus")
200
+ },
201
+ instructions: "You are a helpful AI assistant."
202
+ },
203
+ capabilities: {
204
+ text: true,
205
+ images: [],
206
+ files: [],
207
+ audio: [],
208
+ video: []
209
+ }
210
+ });
211
+ ```
212
+
213
+ **Available models:** `command-r-plus`, `command-r`, `command-light`
214
+
215
+ [Cohere AI SDK Documentation](https://ai-sdk.dev/providers/ai-sdk-providers/cohere)
216
+
217
+ ### Groq
218
+
219
+ ```typescript
220
+ import { ExuluAgent } from "@exulu/backend";
221
+ import { createGroq } from "@ai-sdk/groq";
222
+
223
+ const groqAgent = new ExuluAgent({
224
+ id: "groq_llama",
225
+ name: "Groq Llama 3",
226
+ type: "agent",
227
+ description: "Groq-powered Llama 3 agent",
228
+ provider: "groq",
229
+ config: {
230
+ name: "llama-3.1-70b-versatile",
231
+ model: {
232
+ create: ({ apiKey }) => createGroq({ apiKey })("llama-3.1-70b-versatile")
233
+ },
234
+ instructions: "You are a helpful AI assistant."
235
+ },
236
+ capabilities: {
237
+ text: true,
238
+ images: [],
239
+ files: [],
240
+ audio: [],
241
+ video: []
242
+ }
243
+ });
244
+ ```
245
+
246
+ **Available models:** `llama-3.1-70b-versatile`, `llama-3.1-8b-instant`, `mixtral-8x7b-32768`
247
+
248
+ [Groq AI SDK Documentation](https://ai-sdk.dev/providers/ai-sdk-providers/groq)
249
+
250
+ ### Azure OpenAI
251
+
252
+ ```typescript
253
+ import { ExuluAgent } from "@exulu/backend";
254
+ import { createAzure } from "@ai-sdk/azure";
255
+
256
+ const azureAgent = new ExuluAgent({
257
+ id: "azure_gpt4",
258
+ name: "Azure GPT-4",
259
+ type: "agent",
260
+ description: "Azure OpenAI GPT-4 agent",
261
+ provider: "azure",
262
+ config: {
263
+ name: "gpt-4",
264
+ model: {
265
+ create: ({ apiKey }) => createAzure({
266
+ apiKey,
267
+ resourceName: "your-resource-name",
268
+ })("gpt-4-deployment-name")
269
+ },
270
+ instructions: "You are a helpful AI assistant."
271
+ },
272
+ capabilities: {
273
+ text: true,
274
+ images: [".png", ".jpg", ".jpeg", ".gif", ".webp"],
275
+ files: [".pdf", ".txt"],
276
+ audio: [],
277
+ video: []
278
+ }
279
+ });
280
+ ```
281
+
282
+ [Azure OpenAI AI SDK Documentation](https://ai-sdk.dev/providers/ai-sdk-providers/azure)
283
+
284
+ ## Using with ExuluVariables
285
+
286
+ Combine custom agents with ExuluVariables for secure credential management:
287
+
288
+ ```typescript
289
+ import { ExuluAgent, ExuluVariables } from "@exulu/backend";
290
+ import { createOpenAI } from "@ai-sdk/openai";
291
+ import { createAnthropic } from "@ai-sdk/anthropic";
292
+
293
+ // Retrieve API keys from variables
294
+ const openaiKey = await ExuluVariables.get("openai_api_key");
295
+ const anthropicKey = await ExuluVariables.get("anthropic_api_key");
296
+
297
+ // Create agents with retrieved keys
298
+ const openaiAgent = new ExuluAgent({
299
+ id: "openai_agent",
300
+ name: "OpenAI Assistant",
301
+ type: "agent",
302
+ description: "OpenAI powered assistant",
303
+ provider: "openai",
304
+ authenticationInformation: openaiKey,
305
+ config: {
306
+ name: "gpt-4o",
307
+ model: {
308
+ create: ({ apiKey }) => createOpenAI({ apiKey: apiKey || openaiKey })("gpt-4o")
309
+ },
310
+ instructions: "You are a helpful assistant."
311
+ },
312
+ capabilities: { text: true, images: [], files: [], audio: [], video: [] }
313
+ });
314
+
315
+ const anthropicAgent = new ExuluAgent({
316
+ id: "anthropic_agent",
317
+ name: "Claude Assistant",
318
+ type: "agent",
319
+ description: "Claude powered assistant",
320
+ provider: "anthropic",
321
+ authenticationInformation: anthropicKey,
322
+ config: {
323
+ name: "claude-opus-4-20250514",
324
+ model: {
325
+ create: ({ apiKey }) => createAnthropic({ apiKey: apiKey || anthropicKey })("claude-opus-4-20250514")
326
+ },
327
+ instructions: "You are Claude, a helpful assistant."
328
+ },
329
+ capabilities: { text: true, images: [], files: [], audio: [], video: [] }
330
+ });
331
+ ```
332
+
333
+ ## Multi-provider setup
334
+
335
+ Create a registry of agents for different providers:
336
+
337
+ ```typescript
338
+ import { ExuluAgent, ExuluVariables } from "@exulu/backend";
339
+ import { createOpenAI } from "@ai-sdk/openai";
340
+ import { createAnthropic } from "@ai-sdk/anthropic";
341
+ import { createGoogleGenerativeAI } from "@ai-sdk/google";
342
+
343
+ async function createAgentRegistry() {
344
+ // Retrieve all API keys
345
+ const [openaiKey, anthropicKey, googleKey] = await Promise.all([
346
+ ExuluVariables.get("openai_api_key"),
347
+ ExuluVariables.get("anthropic_api_key"),
348
+ ExuluVariables.get("google_api_key")
349
+ ]);
350
+
351
+ return {
352
+ openai: new ExuluAgent({
353
+ id: "openai_gpt4",
354
+ name: "OpenAI GPT-4",
355
+ type: "agent",
356
+ provider: "openai",
357
+ authenticationInformation: openaiKey,
358
+ config: {
359
+ name: "gpt-4o",
360
+ model: {
361
+ create: ({ apiKey }) => createOpenAI({ apiKey: apiKey || openaiKey })("gpt-4o")
362
+ },
363
+ instructions: "You are a helpful assistant."
364
+ },
365
+ capabilities: { text: true, images: [], files: [], audio: [], video: [] }
366
+ }),
367
+
368
+ anthropic: new ExuluAgent({
369
+ id: "anthropic_opus",
370
+ name: "Claude Opus 4",
371
+ type: "agent",
372
+ provider: "anthropic",
373
+ authenticationInformation: anthropicKey,
374
+ config: {
375
+ name: "claude-opus-4-20250514",
376
+ model: {
377
+ create: ({ apiKey }) => createAnthropic({ apiKey: apiKey || anthropicKey })("claude-opus-4-20250514")
378
+ },
379
+ instructions: "You are Claude, a helpful assistant."
380
+ },
381
+ capabilities: { text: true, images: [], files: [], audio: [], video: [] }
382
+ }),
383
+
384
+ google: new ExuluAgent({
385
+ id: "google_gemini",
386
+ name: "Google Gemini",
387
+ type: "agent",
388
+ provider: "google",
389
+ authenticationInformation: googleKey,
390
+ config: {
391
+ name: "gemini-2.0-flash-exp",
392
+ model: {
393
+ create: ({ apiKey }) => createGoogleGenerativeAI({ apiKey: apiKey || googleKey })("gemini-2.0-flash-exp")
394
+ },
395
+ instructions: "You are a helpful assistant."
396
+ },
397
+ capabilities: { text: true, images: [], files: [], audio: [], video: [] }
398
+ })
399
+ };
400
+ }
401
+
402
+ // Use the registry
403
+ const agents = await createAgentRegistry();
404
+
405
+ const response = await agents.openai.generateSync({
406
+ prompt: "Hello!",
407
+ agentInstance: await loadAgent("openai_gpt4"),
408
+ statistics: { label: "openai", trigger: "api" }
409
+ });
410
+ ```
411
+
412
+ ## Dynamic provider selection
413
+
414
+ Allow users to choose their preferred provider:
415
+
416
+ ```typescript
417
+ import { ExuluAgent, ExuluVariables } from "@exulu/backend";
418
+ import { createOpenAI } from "@ai-sdk/openai";
419
+ import { createAnthropic } from "@ai-sdk/anthropic";
420
+
421
+ async function createAgentForProvider(provider: "openai" | "anthropic") {
422
+ const providerConfigs = {
423
+ openai: {
424
+ variableName: "openai_api_key",
425
+ modelName: "gpt-4o",
426
+ createFn: createOpenAI
427
+ },
428
+ anthropic: {
429
+ variableName: "anthropic_api_key",
430
+ modelName: "claude-opus-4-20250514",
431
+ createFn: createAnthropic
432
+ }
433
+ };
434
+
435
+ const config = providerConfigs[provider];
436
+ const apiKey = await ExuluVariables.get(config.variableName);
437
+
438
+ return new ExuluAgent({
439
+ id: `${provider}_agent`,
440
+ name: `${provider} Agent`,
441
+ type: "agent",
442
+ provider,
443
+ authenticationInformation: apiKey,
444
+ config: {
445
+ name: config.modelName,
446
+ model: {
447
+ create: ({ apiKey: key }) => config.createFn({ apiKey: key || apiKey })(config.modelName)
448
+ },
449
+ instructions: "You are a helpful assistant."
450
+ },
451
+ capabilities: { text: true, images: [], files: [], audio: [], video: [] }
452
+ });
453
+ }
454
+
455
+ // User selects provider
456
+ const selectedProvider = "openai"; // or "anthropic"
457
+ const agent = await createAgentForProvider(selectedProvider);
458
+ ```
459
+
460
+ ## Explore more providers
461
+
462
+ The AI SDK supports many more providers beyond the examples above:
463
+
464
+ <CardGroup cols={3}>
465
+ <Card title="OpenAI" icon="openai" href="https://ai-sdk.dev/providers/ai-sdk-providers/openai">
466
+ GPT-4, GPT-3.5
467
+ </Card>
468
+ <Card title="Anthropic" icon="robot" href="https://ai-sdk.dev/providers/ai-sdk-providers/anthropic">
469
+ Claude models
470
+ </Card>
471
+ <Card title="Google" icon="google" href="https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai">
472
+ Gemini models
473
+ </Card>
474
+ <Card title="Mistral" icon="m" href="https://ai-sdk.dev/providers/ai-sdk-providers/mistral">
475
+ Mistral Large, Small
476
+ </Card>
477
+ <Card title="Cohere" icon="c" href="https://ai-sdk.dev/providers/ai-sdk-providers/cohere">
478
+ Command R+
479
+ </Card>
480
+ <Card title="Groq" icon="bolt" href="https://ai-sdk.dev/providers/ai-sdk-providers/groq">
481
+ Fast LLaMA inference
482
+ </Card>
483
+ <Card title="Azure OpenAI" icon="microsoft" href="https://ai-sdk.dev/providers/ai-sdk-providers/azure">
484
+ Enterprise OpenAI
485
+ </Card>
486
+ <Card title="Vertex AI" icon="google" href="https://ai-sdk.dev/providers/ai-sdk-providers/google-vertex">
487
+ Google Cloud AI
488
+ </Card>
489
+ <Card title="Amazon Bedrock" icon="aws" href="https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock">
490
+ AWS AI models
491
+ </Card>
492
+ </CardGroup>
493
+
494
+ <Info>
495
+ Visit the [AI SDK Providers documentation](https://ai-sdk.dev/providers/ai-sdk-providers) for the complete list of supported providers and their configurations.
496
+ </Info>
497
+
498
+ ## Community providers
499
+
500
+ The AI SDK also supports community-maintained providers:
501
+
502
+ - **Ollama**: Run local models
503
+ - **Replicate**: Access thousands of models
504
+ - **Fireworks AI**: Fast inference
505
+ - **Together AI**: Open-source models
506
+ - **Perplexity**: Search-augmented models
507
+ - **xAI (Grok)**: xAI's Grok models
508
+ - And many more...
509
+
510
+ [View all community providers](https://ai-sdk.dev/providers/community-providers)
511
+
512
+ ## Best practices
513
+
514
+ <Tip>
515
+ **Start with defaults**: Use ExuluDefaultAgents to get started quickly, then customize as needed.
516
+ </Tip>
517
+
518
+ <Note>
519
+ **Secure credentials**: Always use [ExuluVariables](/core/exulu-variables/introduction) to manage API keys securely.
520
+ </Note>
521
+
522
+ <Info>
523
+ **Provider selection**: Choose providers based on your needs: cost, latency, model capabilities, and data privacy requirements.
524
+ </Info>
525
+
526
+ <Warning>
527
+ **Rate limits**: Different providers have different rate limits. Configure [ExuluQueues](/core/exulu-queues/introduction) accordingly.
528
+ </Warning>
529
+
530
+ ## Next steps
531
+
532
+ <CardGroup cols={2}>
533
+ <Card title="ExuluAgent" icon="robot" href="/core/exulu-agent/introduction">
534
+ Learn about ExuluAgent configuration
535
+ </Card>
536
+ <Card title="ExuluVariables" icon="key" href="/core/exulu-variables/introduction">
537
+ Manage API keys securely
538
+ </Card>
539
+ <Card title="AI SDK Providers" icon="globe" href="https://ai-sdk.dev/providers/ai-sdk-providers">
540
+ Explore all available providers
541
+ </Card>
542
+ <Card title="AI SDK Docs" icon="book" href="https://ai-sdk.dev/docs">
543
+ Full AI SDK documentation
544
+ </Card>
545
+ </CardGroup>