You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/05-Adapters/05-ai-completion-adapters.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,7 +129,7 @@ new CompletionAdapterOpenAIResponses({
129
129
130
130
You can specify any GPT model you need. The default is `gpt-5-nano` as it is cheapest though may behave weakly.
131
131
132
-
By default, this adapter uses the OpenAI `responses` API (`v1/responses`) unless `useComplitionApi` is set to `true`. If `useComplitionApi` is `true`, it uses the older Chat Completions API (`v1/chat/completions`).
132
+
By default, this adapter uses the OpenAI `responses` API (`v1/responses`) unless `useCompletionApi` is set to `true`. If `useCompletionApi` is `true`, it uses the older Chat Completions API (`v1/chat/completions`).
133
133
134
134
135
135
### Using with OpenAI-compatible API providers (for example based on self-hosted vLLM docker images)
@@ -141,25 +141,25 @@ new CompletionAdapterOpenAIResponses({
If `useComplitionApi` is omitted, the adapter keeps the current default behavior:
151
+
If `useCompletionApi` is omitted, the adapter keeps the current default behavior:
152
152
153
153
- official OpenAI uses the `responses` API
154
154
- custom `baseUrl` providers use the Chat Completions API.
155
155
156
-
This is because many OpenAI-compatible providers do not yet support the `responses` API or support it unstably (for example OVH AI Endpoints still - Apr 2026 does not fully support the `responses`, so `useComplitionApi: false` may work unstably there, though you can re-test it by manually enabling it by setting `useComplitionApi: true` and checking if it works).
156
+
This is because many OpenAI-compatible providers do not yet support the `responses` API or support it unstably (for example OVH AI Endpoints still - Apr 2026 does not fully support the `responses`, so `useCompletionApi: false` may work unstably there, though you can re-test it by manually enabling it by setting `useCompletionApi: true` and checking if it works).
157
157
Any 3rd-party API providers might have next reasones of pure `responses` API compatibility:
158
158
159
159
1) If they use vLLM open-source software under the hood they might have outdated version
160
160
2) Custom non-vLLM implmentation might have reliable chat API implementation while give less priority to responses API as it is more complex and new.
161
161
162
-
We recommend you to try responses API first by setting `false` in `useComplitionApi` because it gives rich features set, including summarization and better structured outputs, and if it does not work for your provider, then set it to `true` to have less features but working implementation.
162
+
We recommend you to try responses API first by setting `false` in `useCompletionApi` because it gives rich features set, including summarization and better structured outputs, and if it does not work for your provider, then set it to `true` to have less features but working implementation.
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/08-Plugins/01-agent.md
+34-3Lines changed: 34 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -579,18 +579,18 @@ completionAdapter: new CompletionAdapterOpenAIResponses({
579
579
580
580
However some of 3rd party providers might serve outdated vLLM and still don't fully support the Responses API needed for langchain internal implmentation, for example [OVH AI Endpoints](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/) in Responses mode still don't play well with langchain proxy (25 Apr 2026)
581
581
582
-
In that case you can try to use the OpenAI Complition API mode of the plugin, which is less efficient but more compatible with older APIs, you can force Chat Completions API mode with `useComplitionApi: true`:
582
+
In that case you can try to use the OpenAI Chat Completions API mode of the plugin, which is less efficient but more compatible with older APIs, you can force Chat Completions API mode with `useCompletionApi: true`:
OVH AI Endpoints still does not fully support the OpenAI `responses` API, so `useComplitionApi: false` may work unstably there.
593
+
OVH AI Endpoints still does not fully support the OpenAI `responses` API, so `useCompletionApi: false` may work unstably there.
594
594
595
595
596
596
## Turn on audio chat support
@@ -655,6 +655,29 @@ To define a custom tool, register an API endpoint with `admin.express.endpoint`.
655
655
656
656
By default, `admin.express.endpoint` applies AdminForth authorization. The endpoint handler receives `adminUser` from the user who is controlling the agent. In other words, all permissions and access rights of the agent are defined by that admin user. At the same time, actions done by the agent are automatically attributed in the audit log to the admin user who is controlling the agent.
657
657
658
+
If a tool is risky, you can attach AdminForth agent metadata directly to the endpoint with the `agent` field.
659
+
660
+
```ts
661
+
typeAgentRiskLevel='safe'|'danger';
662
+
663
+
typeAgentToolMeta= {
664
+
riskLevel?:AgentRiskLevel;
665
+
confirmation?: {
666
+
title?:string;
667
+
message?:string;
668
+
confirmLabel?:string;
669
+
};
670
+
};
671
+
```
672
+
673
+
Use it in `.endpoint(...)` like this:
674
+
675
+
-`riskLevel: 'safe'` marks the tool as low-risk.
676
+
-`riskLevel: 'danger'` marks the tool as dangerous.
677
+
-`confirmation` customizes the confirmation dialog shown before the tool is executed.
678
+
679
+
This metadata is rendered into the generated OpenAPI document, so the agent can understand that a tool is dangerous and requires an explicit confirmation UI before execution.
680
+
658
681
This example uses the same email adapter pattern shown in the Email Invite and Email Password Reset plugins. The transport below uses Mailgun only to keep the snippet short; you can replace it with SES or any other adapter from [List of adapters](/docs/tutorial/ListOfAdapters/).
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/08-Plugins/17-bulk-ai-flow.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -283,6 +283,31 @@ new BulkAiFlowPlugin({
283
283
}),
284
284
```
285
285
286
+
## Image generation quality
287
+
288
+
`ImageGenerationAdapterOpenAI` accepts an `extraParams` object that is passed directly to the OpenAI API. The most useful option here is `quality`, which controls the fidelity and cost of each generated image:
289
+
290
+
| Value | Description |
291
+
|-------|-------------|
292
+
| `'low'` | Fastest generation, lowest cost. Good for drafts or high-volume batch jobs where speed matters more than visual fidelity. |
293
+
| `'medium'` | Balanced quality and speed. A sensible default for most use cases. |
294
+
| `'high'` | Best image quality, slowest and most expensive. Use for final promotional assets or when visual detail is critical. |
295
+
296
+
```ts
297
+
newImageGenerationAdapterOpenAI({
298
+
openAiApiKey: process.env.OPENAI_API_KEYasstring,
299
+
model: 'gpt-image-1',
300
+
//diff-add
301
+
extraParams: {
302
+
//diff-add
303
+
quality: 'low', // 'low' | 'medium' | 'high'
304
+
//diff-add
305
+
},
306
+
}),
307
+
```
308
+
309
+
> ☝️ `'low'` quality is a great starting point when processing large datasets — you can always re-run generation with `'high'` for selected records once you're happy with the prompts.
310
+
286
311
## Rate Limiting and Best Practices
287
312
288
313
- Use `rateLimit` for individual image generation operations and for the bulk image generation
@@ -429,6 +454,21 @@ If you are processing large sets of data, you might want to limit the number of
429
454
430
455
And there won't be more than 5 parallel requests being handled.
431
456
457
+
## Controlling page size in the generation dialog
458
+
459
+
When users trigger bulk generation, records are displayed as cards in a paginated dialog. By default, 6 cards are shown per page. Use `pageSize` to tune this — lower values help when cards contain large images or long text, keeping the dialog fast and reviewable:
460
+
461
+
```ts
462
+
newBulkAiFlowPlugin({
463
+
actionName: 'Generate description and Price',
464
+
465
+
//diff-add
466
+
pageSize: 10, // default is 6
467
+
468
+
// ...
469
+
}),
470
+
```
471
+
432
472
## Confirming long-running generations
433
473
434
474
For very large datasets, you can pause generation at specific checkpoints so users can review results before continuing.
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/08-Plugins/27-dashboard.md
+57-16Lines changed: 57 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: Dashboard
3
-
description: "Guide to the Dashboard plugin."
2
+
title: Dashboard plugin
3
+
description: "Documentation for the Dashboard plugin."
4
4
slug: /tutorial/Plugins/dashboard
5
5
---
6
6
@@ -24,7 +24,7 @@ Supported widgets:
24
24
pnpm install @adminforth/dashboard --save
25
25
```
26
26
27
-
## Create Dashboard Configs Table
27
+
###Create Dashboard Configs Table
28
28
29
29
The plugin needs one resource to store dashboard definitions. For Prisma-based projects, add the table to your schema:
30
30
@@ -64,7 +64,7 @@ CREATE INDEX "dashboard_configs_slug_idx" ON "dashboard_configs"("slug");
64
64
65
65
Use the JSON column type supported by your database connector. For example, PostgreSQL migrations might use `JSONB`, while SQLite migrations can use `JSON`.
66
66
67
-
## Create Resource
67
+
###Create Resource
68
68
69
69
Create a resource that points to the `dashboard_configs` table:
70
70
@@ -136,7 +136,7 @@ export const admin = new AdminForth({
136
136
});
137
137
```
138
138
139
-
## Configure Plugin
139
+
###Configure Plugin
140
140
141
141
Attach the plugin to one of your resources, usually the users resource:
142
142
@@ -332,7 +332,7 @@ query:
332
332
333
333
### Chart With Multiple Sources
334
334
335
-
Use `query.steps` when funnel steps come from different resources. Each step returns one row with `name`and the metric alias.
335
+
Use `query.source: steps` when chart data comes from different resources. Each step returns one row with `name`, `resource`, and the selected aggregate aliases.
336
336
337
337
```yaml
338
338
label: Sales Funnel
@@ -343,27 +343,68 @@ chart:
343
343
type: funnel
344
344
title: Sales funnel
345
345
query:
346
+
source: steps
346
347
steps:
347
348
- name: Leads
348
349
resource: leads
349
-
metric:
350
-
agg: count
351
-
as: value
350
+
select:
351
+
- agg: count
352
+
as: value
352
353
- name: Qualified
353
354
resource: leads
354
-
metric:
355
-
agg: count
356
-
as: value
355
+
select:
356
+
- agg: count
357
+
as: value
357
358
filters:
358
359
and:
359
360
- field: status
360
361
eq: qualified
361
362
- name: Customers
362
363
resource: orders
363
-
metric:
364
-
agg: count_distinct
365
-
field: customer_id
366
-
as: value
364
+
select:
365
+
- agg: count_distinct
366
+
field: customer_id
367
+
as: value
368
+
```
369
+
370
+
For the same numeric buckets across multiple resources, add `query.bucket` and render the result as a stacked bar chart. The dashboard runs every step once per bucket and returns rows with `label`, `name`, `resource`, and the aggregate aliases:
Copy file name to clipboardExpand all lines: adminforth/documentation/src/pages/index.tsx
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -140,6 +140,18 @@ const images = [
140
140
link: '/docs/tutorial/Plugins/background-jobs/',
141
141
description: 'Use background jobs to handle long-running tasks efficiently. Schedule, monitor, and manage your background processes with ease even after server restarts'
title: 'Agent Plugin - give AI any task and let it handle it',
146
+
link: '/docs/tutorial/Plugins/agent/',
147
+
description: 'Provides an internal agent that can perform various tasks based on natural language instructions. Connect it to your data and let it help you with content generation, data management, or any custom use case you can think of'
title: 'Dashboard Plugin - creare custom dashboards from web interface',
152
+
link: '/docs/tutorial/Plugins/dashboard/',
153
+
description: 'Provides a customizable dashboard plugin that allows you to create and manage dashboards for your data. Connect it to your resources and visualize your data in a meaningful way'
description: 'Creates a new record in the specified resource. The endpoint validates create permissions, required fields, hidden or backend-only field rules, polymorphic foreign keys, and resource hooks before persisting and returning the created primary key.',
description: 'Updates an existing record by primary key. The endpoint validates edit permissions, current record existence, hidden, backend-only, and read-only field rules, polymorphic foreign keys, and resource hooks before saving changes.',
description: 'Deletes an existing record by primary key. The endpoint validates delete permissions, loads the current record, executes configured cascade child deletion, and then removes the record.',
description: 'Executes a custom resource action for a single record. The endpoint validates the resource, action existence, and action permissions, then either returns a redirect URL or executes the action handler and returns its result together with action context.',
description: 'Executes a custom resource action in bulk mode for multiple records. The endpoint validates the resource, action existence, bulk handler availability, and permissions, then runs the bulk handler and returns its result together with action context.',
0 commit comments