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
`List of resources:\n${formatResources(adminforth.config.resources)}`,
58
65
`You have always-available base tools: ${alwaysAvailableTools}.`,
59
66
primarySkills.length>0
@@ -70,6 +77,8 @@ export async function buildAgentSystemPrompt(adminforth: IAdminForth) {
70
77
"If a fetched skill lists a non-base tool you need, call fetch_tool_schema for it immediately instead of telling the user the tool is unavailable.",
71
78
"For example: for record creation load mutate_data, read its tool list, call fetch_tool_schema for create_record, and then use create_record after confirmation.",
72
79
"When fetch_tool_schema succeeds, that tool becomes available on the next step.",
80
+
"All admin links must be relative paths and must start with ADMIN_BASE_PATH.",
81
+
"Build record links as ADMIN_BASE_PATH + resource/{resourceId}/show/{primary key}. Do not prepend any extra slash before resource.",
73
82
"Try to call as many tools as possible in parallel in one step.",
Copy file name to clipboardExpand all lines: custom/skills/fetch_data/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,4 +12,4 @@ To find specific data record you should use filters. ILIKE filters are preferred
12
12
13
13
For long texts show only several first words and add "..." at the end (only if user did not request this field specifically).
14
14
15
-
Also when you communicate with user about record, add related link to this record. For example /{BASE_URL}/resource/{resourceId}/show/{primary key}. Use _label from `get_resource_data` as anchor text for link (use markdown link). Links shoudl be always relative path, starting with slash.
15
+
Also when you communicate with user about record, add related link to this record. Build it as `{ADMIN_BASE_PATH}resource/{resourceId}/show/{primary key}`. Use _label from `get_resource_data` as anchor text for link (use markdown link). Links should always be relative paths and must start with `ADMIN_BASE_PATH`. Do not add an extra slash after `ADMIN_BASE_PATH`.
Copy file name to clipboardExpand all lines: custom/skills/mutate_data/SKILL.md
+15-10Lines changed: 15 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,25 +21,30 @@ Use `start_custom_action` and `start_custom_bulk_action` for resource actions.
21
21
Before performing any state mutation including action calls edit/delete please fetch record which is going to be edited/deleted and show user record in format field → value (show several most important fields which can help user to understand what exactly record he is going to edit or delete).
22
22
23
23
For field values with long texts show only several first words and add "..." at the end.
24
-
Also please add related link to record with will be changed. For example /{BASE_URL}/resource/{resourceId}/show/{primary key}. Use _label from `get_resource_data` as anchor text for link (use markdown link). Links shoudl be always relative path, starting with slash.
24
+
Also please add related link to record with will be changed. Build it as `{ADMIN_BASE_PATH}resource/{resourceId}/show/{primary key}`. Use _label from `get_resource_data` as anchor text for link (use markdown link). Links should always be relative paths and must start with `ADMIN_BASE_PATH`. Do not add an extra slash after `ADMIN_BASE_PATH`.
25
25
26
26
And in the same message ask user for final confirmation.
27
27
28
28
When creating new record, show user all data which you gona create and in same message ask for confirmation.
29
29
30
30
Accept any positive confirmation from user like "yes", "sure", "+", anything non-negative call to action, can be considered as confirmation.
31
31
32
-
A confirmation is valid only for the exact mutation plan from the immediately previous assistant message.
32
+
A confirmation is valid only for the clearly described mutation plan from the immediately previous assistant message.
33
33
34
34
Never reuse an older confirmation for a later mutation.
35
35
36
-
After one mutation is executed, confirmation is consumed and reset.
36
+
One confirmation may cover:
37
+
- one single mutation
38
+
- one explicitly described batch
39
+
- one short sequence of related mutations that together implement the same user request
37
40
38
-
If you want to perform another create/update/delete/action after that, ask for confirmation again even if the user previously said "yes".
41
+
If the confirmed plan contains several related mutation steps, execute that whole confirmed plan without asking again between those steps.
39
42
40
-
If the mutation plan changes in any way (different record, different fields, different values, different number of records, different action), the old confirmation is invalid and you must ask again.
43
+
Ask for confirmation again if the plan changes in any way: different record, different fields, different values, different number of records, different action, or any extra mutation that was not listed in the confirmation message.
41
44
42
-
If you are creating or deleting multiple records in one batch, you may ask once only for that exact batch, but you must list the whole batch explicitly in the confirmation message. Any extra record outside that described batch requires a new confirmation.
45
+
If you are creating or deleting multiple records in one batch, you may ask once for that exact batch, but list the whole batch explicitly in the confirmation message. Any extra record outside that described batch requires a new confirmation.
46
+
47
+
After the confirmed plan is finished, do not treat that confirmation as still active for later requests.
43
48
44
49
# Calling actions
45
50
@@ -57,7 +62,7 @@ If you want to block some user you can confirm that this action by saying:
57
62
* IP Country: USA
58
63
* Currently blocked: No // show this field only if it exists in user record
0 commit comments