Skip to content

Commit 6323b15

Browse files
committed
translate
Signed-off-by: Lada7878 <ladalada7878@gmail.com>
1 parent 6c41d4c commit 6323b15

7 files changed

Lines changed: 1247 additions & 0 deletions

File tree

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
---
2+
title: AI Agent
3+
---
4+
5+
This means: take the first element of the `choices` array, then the `message` field, then the `content` field.
6+
7+
For other formats, possible values ​​are `response.text`, `content`, or `answer`.
8+
9+
**How ​​to determine the correct path:**
10+
1. Make a test request to your API.
11+
1. Examine the structure of the JSON response.
12+
1. Find the field containing the model's response text.
13+
1. Specify the path to this field using dot notation.
14+
15+
#### Request Body Template
16+
17+
The **Request Body Template** field defines the structure of the JSON request that will be sent to the provider's API. You can use variables in the template, which will be automatically replaced with the relevant values.
18+
19+
**Available variables:**
20+
- `{{.prompt}}` — the text of the user's question (will be automatically escaped for JSON).
21+
- `{{.model}}` — the model name specified in the provider settings.
22+
23+
**Template examples:**
24+
25+
For OpenAI-compatible APIs:
26+
27+
```json
28+
{
29+
"model": "{{.model}}",
30+
"messages": [
31+
{
32+
"role": "user",
33+
"content": "{{.prompt}}"
34+
}
35+
],
36+
"temperature": 0.7
37+
}
38+
```
39+
40+
For APIs with a different format:
41+
42+
```json
43+
{
44+
"messages": [
45+
{
46+
"content": "{{.prompt}}",
47+
"role": "user"
48+
}
49+
],
50+
"model": "{{.model}}",
51+
"stream": false
52+
}
53+
``
54+
55+
For APIs with a minimal request structure:
56+
57+
```json
58+
{
59+
"query": "{{.prompt}}",
60+
"model_name": "{{.model}}"
61+
}
62+
```
63+
64+
**Important:**
65+
- The template must be valid JSON. - The `{{.prompt}}` and `{{.model}}` variables will be automatically replaced when sending the request.
66+
- The `{{.prompt}}` value is automatically escaped for safe insertion into JSON.
67+
- You can add any additional fields required for your API (temperature, max_tokens, etc.).
68+
69+
**Example of a complete custom provider setup:**
70+
71+
1. **Name**: `My Custom API`.
72+
1. **Provider**: `Custom`.
73+
1. **Model**: `my-model-v1`.
74+
1. **URL**: `https://api.example.com/v1/chat`.
75+
1. **Method**: `POST`. 1. **Headers**:
76+
77+
```sh
78+
Authorization: Bearer {{ .credentials.api_key }}
79+
Content-Type: application/json
80+
```
81+
82+
where `api_key` is the name of the credential key (see the [Credentials for Providers](#credentials-for-providers) section).
83+
84+
1. **Response Field**: `choices.0.message.content`.
85+
1. **Request body template**:
86+
87+
```json
88+
{
89+
"model": "{{.model}}",
90+
"messages": [
91+
{
92+
"role": "user",
93+
"content": "{{.prompt}}"
94+
}
95+
],
96+
"temperature": 0.7,
97+
"max_tokens": 1000
98+
}
99+
```
100+
101+
## Working with the AI ​​Agent
102+
103+
### Opening Chat
104+
105+
The AI ​​Agent is accessible through the chat sidebar on the right side of the interface. To open the chat, click the chat button in the lower right corner of the screen.
106+
107+
### Selecting a Provider
108+
109+
At the top of the chat is a provider selector. Select the desired provider from the list of available ones. If you only have one provider configured, it will be selected automatically.
110+
111+
### Available Tools (MCP Tools)
112+
113+
The AI ​​Agent uses MCP (Model Context Protocol) tools to work with the platform. A complete list with descriptions, parameters, and examples is provided in the [MCP server documentation](../user/mcp-server/).
114+
115+
The model can call multiple tools in a single request if needed.
116+
117+
Key features:
118+
- Retrieving and analyzing data from the platform catalog.
119+
- MCP proxy to external services (GitLab, SonarQube, Kubernetes, etc.) via `get_external_data` — requests are executed with user credentials.
120+
121+
### Viewing Available Tools
122+
123+
The chat displays a list of all available tools with their descriptions and usage examples. You can:
124+
125+
- Expand the **Available Tools** section to view the list.
126+
- Expand each tool to view its parameters and examples.
127+
- Click on an example to paste it into the input field and immediately execute or edit the request.
128+
129+
### Features
130+
131+
1. **Data Analysis**: The AI ​​agent doesn't just return raw data; it analyzes it and provides structured responses.
132+
1. **Filtering**: You can request data with conditions, and the agent will perform the filtering.
133+
1. **Aggregation**: The agent can count, group data, and provide statistics.
134+
135+
### Debugging
136+
137+
If the agent's response seems incorrect, you can view the debug logs by clicking the question mark icon next to the response. This will help you understand which tools were called and what data was retrieved.
138+
139+
## Usage Examples
140+
141+
### Example 1: Service Analysis
142+
143+
**Question:**
144+
145+
```sh
146+
Get all services and show their name and creation date
147+
```
148+
149+
**Result:**
150+
The agent uses MCP tools to retrieve service data and returns a list with their name and creation date.
151+
152+
### Example 2: Action List
153+
154+
**Question:**
155+
156+
```sh
157+
Get a list of actions
158+
```
159+
160+
**Result:**
161+
The agent will call the MCP tool and return a list of available platform actions.
162+
163+
## Recommendations
164+
165+
1. **Use specific questions**: The more specific the question, the more accurate the answer.
166+
1. **Specify parameters explicitly**: If you know the name of a resource or parameter, specify it in the question.
167+
1. **Experiment**: The AI ​​agent understands natural language, so try different question formulations.
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
---
2+
title: Catalog
3+
weight: 30
4+
---
5+
6+
The catalog is a section of the platform that contains a list of all resources, their parameters and relationships, and allows users to run scripts for resource entities.
7+
8+
The catalog can be populated manually or automatically using data sources or webhooks.
9+
10+
## Resources
11+
12+
A resource is a template or entity type in the platform catalog. A resource defines the data structure, parameters, and properties that all entities of a given type will inherit. For example, the "GitLab Repositories" resource describes the data structure for GitLab repositories, and each specific entity of this resource represents a separate repository.
13+
14+
The fundamental principle of the platform is that the data model is configured by the platform administrator. The administrator can independently create the resources they need.
15+
16+
### Resource Naming
17+
18+
When naming resources, follow these rules:
19+
20+
- **Resource Name** can be any name and does not require special prefixes or separators. - The **Resource ID** must be unique across the entire platform.
21+
22+
### Resource Grouping
23+
24+
Resources in the catalog can be organized hierarchically, allowing for logical grouping of related resources and improving catalog navigation.
25+
26+
To create a resource group, you need to:
27+
28+
1. **Create Resources** — create all the necessary resources that will be included in the group. For example, the "Gitlab" resource could be the parent of "Repositories," "Groups," and other resources.
29+
30+
2. **Link Child Resources to Parent Resources** — in the catalog sidebar, drag the child resource onto the parent resource. Child resources will be automatically linked to the parent and appear in the interface as nested elements.
31+
32+
3. **Configure Display** — in the catalog sidebar, parent resources are displayed with an expand/collapse icon, allowing you to show or hide child elements.
33+
34+
{{< alert level="info" >}}
35+
Changing resource grouping (dragging and dropping resources in the catalog sidebar) requires the global `update:resources-order` permission. For more information on access rights, see the ["Role Model"](../../admin/security/rbac/).
36+
{{< /alert >}}
37+
38+
{{< alert level="info" >}}
39+
To view a child resource, the user must have `read:resources` permissions for the entire hierarchy of parent resources. For more information on access rights, see the ["Role Model"](../../admin/security/rbac/).
40+
{{< /alert >}}
41+
42+
#### Displaying the Full Path
43+
44+
The platform interface (resource selectors, tags, relationship graphs) displays the full resource path with the chain of parent resources separated by the `/` character. For example, if the "Repositories" resource is a child of the "Gitlab" resource, the interface will display "Gitlab / Repositories."
45+
46+
### Resource Card
47+
48+
By default, after creating a resource, its card will display a table of entities for that resource. Clicking on an entity in the table takes you to its card.
49+
50+
If a dashboard is selected in the "Use Dashboard" field, it will be displayed on the resource card instead of the entity table.
51+
52+
### Relationships between Resources
53+
54+
Each resource can be linked to another resource or to itself via a two-way relationship. Relationships are configured by the platform administrator. After setting up relationships for a resource, each entity in that resource can be linked to one or more entities in another resource.
55+
56+
You can create both vertical relationships (an entity from one resource is linked to an entity from another resource) and horizontal relationships (entities within a single resource are linked).
57+
58+
## Entities
59+
60+
An entity is a specific unit of each resource. For example, if a resource is called "Groups" and is a child of the resource "Gitlab," then each Gitlab group registered in the platform is an entity of that resource.
61+
62+
Entities inherit resource parameters, but parameters can be specified separately for each entity.
63+
64+
### Naming Entities
65+
66+
When naming entities, follow these rules:
67+
68+
- **The entity name** can be any name and does not require special prefixes or separators.
69+
- **The entity ID** must be unique within the resource.
70+
71+
### Entity Card
72+
73+
The entity card consists of built-in panels and custom panels. Built-in panels:
74+
75+
- **Overview** — contains blocks indicating the entity's owner, description, parameters, and relationships.
76+
- **Action Triggers** — contains a list of actions that have been triggered for this entity.
77+
- **Process Starts** — Contains a list of processes that have started for this entity.
78+
- **Events** — Contains a list of events generated for this entity.
79+
80+
New dashboards can be added to each entity card.
81+
82+
Adding dashboards to one resource entity applies to all entities within that resource.
83+
84+
### Relationships between entities
85+
86+
Relationships for each entity are displayed in the entity card as a table and a graph. Each entity can be linked to one or more entities of the same or different resource, depending on the configured relationships between resources.
87+
88+
Relationships between entities can be created manually or automatically using data sources or webhooks.
89+
90+
### Events
91+
92+
When the specification of any entity is created, deleted, or modified, an event of the corresponding type is generated: ENTITY_CREATED, ENTITY_DELETED, or ENTITY_UPDATED. These events serve the following purposes:
93+
94+
- **Audit** — recording changes occurring to an entity during its lifecycle.
95+
- **Configure automated reactions** — configure reactions to changes in the entity specification.
96+
97+
The event storage time is limited and can be configured through the platform configuration file.
98+
99+
### Exporting Entities to CSV
100+
101+
The platform provides the ability to export entities to a CSV file for subsequent data analysis and processing.
102+
103+
#### Exporting Entities for a Single Resource
104+
105+
To export entities for a specific resource:
106+
107+
1. Open the resource card in the catalog.
108+
2. In the entity table, click the **Download .csv** button.
109+
3. The exported file will include all resource entities, taking into account the applied filters, sorting, and pagination.
110+
111+
#### Exporting Entities from Multiple Resources
112+
113+
To export entities from multiple resources simultaneously:
114+
115+
1. In the catalog sidebar, click the **Download Entities** button.
116+
2. In the dialog box that opens, select one or more resources.
117+
3. Click the **Download .csv** button.
118+
4. All entities for the selected resources will be combined into a single CSV file.
119+
120+
{{< alert level="info" >}}
121+
Unloading entities requires the global `read:entities` permission. For more information on access rights, see the [Role Model](../../admin/security/rbac/) section.
122+
{{< /alert >}}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: Credentials
3+
menuTitle: Credentials
4+
d8Edition: ee
5+
moduleStatus: experimental
6+
---
7+
8+
Credentials are a mechanism for securely storing and using access credentials to external services (tokens, passwords, API keys, etc.) in the DDP platform.
9+
10+
## How it works
11+
12+
All interactions with infrastructure services in DDP occur using the credentials of a specific user. Credentials are encrypted before being stored in the database and are decrypted only when needed in actions, data sources, and widgets.
13+
14+
For more information on how they work, encryption, and configuration, see the [documentation](../../admin/security/credentials/).
15+
16+
## Filling in credentials
17+
18+
The platform administrator creates credential types in the "Administration" → "Credentials" section. For each credential type, you can specify your personal details in the "Credentials" section of your profile.
19+
20+
For example, if an administrator created the **Kubernetes token** credential type, you can add a personal token for Kubernetes access in your profile.
21+
22+
## Working with Credentials
23+
24+
- After saving credentials, you cannot view their value; you can only update it.
25+
- Your profile displays information about whether certain credentials are filled in.
26+
- Credentials are used automatically in actions, data sources, and widgets where they are specified in the configuration.
27+
28+
The approach to using credentials in actions, data sources, and widgets is described in the relevant sections of the documentation.

0 commit comments

Comments
 (0)