@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,545 +0,0 @@
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>