@salesforce/plugin-agent 1.11.1 → 1.13.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.
- package/README.md +27 -132
- package/lib/commands/agent/create.d.ts +8 -5
- package/lib/commands/agent/create.js +169 -41
- package/lib/commands/agent/create.js.map +1 -1
- package/lib/commands/agent/generate/{spec-v2.d.ts → agent-spec.d.ts} +1 -2
- package/lib/commands/agent/generate/{spec-v2.js → agent-spec.js} +19 -7
- package/lib/commands/agent/generate/agent-spec.js.map +1 -0
- package/messages/agent.create.md +37 -7
- package/npm-shrinkwrap.json +2 -2
- package/oclif.manifest.json +21 -234
- package/package.json +3 -3
- package/schemas/agent-create.json +129 -5
- package/schemas/{agent-generate-spec__v2.json → agent-generate-agent__spec.json} +4 -17
- package/lib/commands/agent/create-v2.d.ts +0 -22
- package/lib/commands/agent/create-v2.js +0 -164
- package/lib/commands/agent/create-v2.js.map +0 -1
- package/lib/commands/agent/generate/spec-v2.js.map +0 -1
- package/lib/commands/agent/generate/spec.d.ts +0 -42
- package/lib/commands/agent/generate/spec.js +0 -167
- package/lib/commands/agent/generate/spec.js.map +0 -1
- package/messages/agent.create-v2.md +0 -51
- package/messages/agent.generate.spec.md +0 -49
- package/schemas/agent-create__v2.json +0 -145
- package/schemas/agent-generate-spec.json +0 -24
- /package/messages/{agent.generate.spec-v2.md → agent.generate.agent-spec.md} +0 -0
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# summary
|
|
2
|
-
|
|
3
|
-
Create an agent in your org using a local agent spec file.
|
|
4
|
-
|
|
5
|
-
# description
|
|
6
|
-
|
|
7
|
-
Before you run this command, you must first generate an agent spec file by running the "agent generate spec" CLI command, which outputs a YAML file with the agent properties and list of AI-generated topics. Topics define the range of jobs the agent can handle. Then specify the generated agent spec file to this command using the --spec flag, along with the name (label) of the new agent using the --agent-name flag.
|
|
8
|
-
|
|
9
|
-
When this command finishes, your org contains the new agent, which you can then edit in the Agent Builder UI. The new agent's topics are the same as the ones listed in the agent spec file. The agent might also have some AI-generated actions. This command also retrieves all the metadata files associated with the new agent to your local Salesforce DX project.
|
|
10
|
-
|
|
11
|
-
Use the --preview flag to review what the agent looks like without actually saving it in your org. Rather, the command creates a JSON file with all the agent details in the current directory.
|
|
12
|
-
|
|
13
|
-
To open the new agent in your org's Agent Builder UI, run this command: "sf org open agent --name <api-name-of-your-agent>".
|
|
14
|
-
|
|
15
|
-
# flags.spec.summary
|
|
16
|
-
|
|
17
|
-
Path to an agent spec file.
|
|
18
|
-
|
|
19
|
-
# flags.preview.summary
|
|
20
|
-
|
|
21
|
-
Preview the agent without saving it in your org.
|
|
22
|
-
|
|
23
|
-
# flags.agent-name.summary
|
|
24
|
-
|
|
25
|
-
Name (label) of the new agent.
|
|
26
|
-
|
|
27
|
-
# flags.agent-api-name.summary
|
|
28
|
-
|
|
29
|
-
API name of the new agent; if not specified, the API name is derived from the agent name (label); the API name must not exist in the org.
|
|
30
|
-
|
|
31
|
-
# flags.planner-id.summary
|
|
32
|
-
|
|
33
|
-
An existing GenAiPlanner ID to associate with the agent.
|
|
34
|
-
|
|
35
|
-
# error.missingRequiredFlags
|
|
36
|
-
|
|
37
|
-
Missing required flags: %s
|
|
38
|
-
|
|
39
|
-
# error.missingRequiredSpecProperties
|
|
40
|
-
|
|
41
|
-
Missing required spec file properties: %s
|
|
42
|
-
|
|
43
|
-
# examples
|
|
44
|
-
|
|
45
|
-
- Create an agent called "ResortManager" in an org with alias "my-org" using the specified agent spec file:
|
|
46
|
-
|
|
47
|
-
<%= config.bin %> <%= command.id %> --agent-name ResortManager --spec specs/resortManagerAgent.yaml --target-org my-org
|
|
48
|
-
|
|
49
|
-
- Preview the creation of an agent called "ResortManager" and use your default org:
|
|
50
|
-
|
|
51
|
-
<%= config.bin %> <%= command.id %> --agent-name ResortManager --spec specs/resortManagerAgent.yaml --preview
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# summary
|
|
2
|
-
|
|
3
|
-
Generate an agent spec, which is the list of jobs that the agent performs.
|
|
4
|
-
|
|
5
|
-
# description
|
|
6
|
-
|
|
7
|
-
When using Salesforce CLI to create an agent in your org, the first step is to generate the local JSON-formatted agent spec file with this command.
|
|
8
|
-
|
|
9
|
-
An agent spec is a list of jobs and descriptions that capture what the agent can do. Use flags such as --role and --company-description to provide details about your company and the role that the agent plays in your company; you can also enter the information interactively if you prefer. When you then execute this command, the large language model (LLM) associated with your org uses the information to generate the list of jobs that the agent most likely performs. We recommend that you provide good details for --role, --company-description, etc, so that the LLM can generate the best and most relevant list of jobs and descriptions. Once generated, you can edit the spec file; for example, you can remove jobs that don't apply to your agent.
|
|
10
|
-
|
|
11
|
-
When your agent spec is ready, you then create the agent in your org by specifying the agent spec file to the --job-spec flag of the "agent create" CLI command.
|
|
12
|
-
|
|
13
|
-
# flags.type.summary
|
|
14
|
-
|
|
15
|
-
Type of agent to create.
|
|
16
|
-
|
|
17
|
-
# flags.role.summary
|
|
18
|
-
|
|
19
|
-
Role of the agent.
|
|
20
|
-
|
|
21
|
-
# flags.company-name.summary
|
|
22
|
-
|
|
23
|
-
Name of your company.
|
|
24
|
-
|
|
25
|
-
# flags.company-description.summary
|
|
26
|
-
|
|
27
|
-
Description of your company.
|
|
28
|
-
|
|
29
|
-
# flags.company-website.summary
|
|
30
|
-
|
|
31
|
-
Website URL of your company.
|
|
32
|
-
|
|
33
|
-
# flags.output-dir.summary
|
|
34
|
-
|
|
35
|
-
Directory where the agent spec file is written; can be an absolute or relative path.
|
|
36
|
-
|
|
37
|
-
# flags.file-name.summary
|
|
38
|
-
|
|
39
|
-
Name of the generated agent spec file.
|
|
40
|
-
|
|
41
|
-
# examples
|
|
42
|
-
|
|
43
|
-
- Create an agent spec for your default org in the default location and use flags to specify the agent's role and your company details:
|
|
44
|
-
|
|
45
|
-
<%= config.bin %> <%= command.id %> --type customer --role "Assist users in navigating and managing bookings" --company-name "Coral Cloud" --company-description "Resort that manages guests and their reservations and experiences"
|
|
46
|
-
|
|
47
|
-
- Create an agent spec by being prompted for role and company details interactively; write the generated file to the "specs" directory and use the org with alias "my-org":
|
|
48
|
-
|
|
49
|
-
<%= config.bin %> <%= command.id %> --output-dir specs --target-org my-org
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$ref": "#/definitions/AgentCreateResult",
|
|
4
|
-
"definitions": {
|
|
5
|
-
"AgentCreateResult": {
|
|
6
|
-
"type": "object",
|
|
7
|
-
"additionalProperties": false,
|
|
8
|
-
"properties": {
|
|
9
|
-
"previewFilePath": {
|
|
10
|
-
"type": "string"
|
|
11
|
-
},
|
|
12
|
-
"isSuccess": {
|
|
13
|
-
"type": "boolean"
|
|
14
|
-
},
|
|
15
|
-
"errorMessage": {
|
|
16
|
-
"type": "string"
|
|
17
|
-
},
|
|
18
|
-
"agentId": {
|
|
19
|
-
"type": "object",
|
|
20
|
-
"properties": {
|
|
21
|
-
"botId": {
|
|
22
|
-
"type": "string"
|
|
23
|
-
},
|
|
24
|
-
"botVersionId": {
|
|
25
|
-
"type": "string"
|
|
26
|
-
},
|
|
27
|
-
"plannerId": {
|
|
28
|
-
"type": "string"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"required": ["botId", "botVersionId", "plannerId"],
|
|
32
|
-
"additionalProperties": false,
|
|
33
|
-
"description": "If the agent was created with saveAgent=true, these are the IDs that make up an agent; Bot, BotVersion, and GenAiPlanner metadata."
|
|
34
|
-
},
|
|
35
|
-
"agentDefinition": {
|
|
36
|
-
"type": "object",
|
|
37
|
-
"properties": {
|
|
38
|
-
"agentDescription": {
|
|
39
|
-
"type": "string"
|
|
40
|
-
},
|
|
41
|
-
"topics": {
|
|
42
|
-
"type": "array",
|
|
43
|
-
"items": {
|
|
44
|
-
"type": "object",
|
|
45
|
-
"properties": {
|
|
46
|
-
"scope": {
|
|
47
|
-
"type": "string"
|
|
48
|
-
},
|
|
49
|
-
"topic": {
|
|
50
|
-
"type": "string"
|
|
51
|
-
},
|
|
52
|
-
"actions": {
|
|
53
|
-
"type": "array",
|
|
54
|
-
"items": {
|
|
55
|
-
"type": "object",
|
|
56
|
-
"properties": {
|
|
57
|
-
"actionName": {
|
|
58
|
-
"type": "string"
|
|
59
|
-
},
|
|
60
|
-
"exampleOutput": {
|
|
61
|
-
"type": "string"
|
|
62
|
-
},
|
|
63
|
-
"actionDescription": {
|
|
64
|
-
"type": "string"
|
|
65
|
-
},
|
|
66
|
-
"inputs": {
|
|
67
|
-
"type": "array",
|
|
68
|
-
"items": {
|
|
69
|
-
"type": "object",
|
|
70
|
-
"properties": {
|
|
71
|
-
"inputName": {
|
|
72
|
-
"type": "string"
|
|
73
|
-
},
|
|
74
|
-
"inputDataType": {
|
|
75
|
-
"type": "string"
|
|
76
|
-
},
|
|
77
|
-
"inputDescription": {
|
|
78
|
-
"type": "string"
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
"required": ["inputName", "inputDataType", "inputDescription"],
|
|
82
|
-
"additionalProperties": false
|
|
83
|
-
},
|
|
84
|
-
"minItems": 1,
|
|
85
|
-
"maxItems": 1
|
|
86
|
-
},
|
|
87
|
-
"outputs": {
|
|
88
|
-
"type": "array",
|
|
89
|
-
"items": {
|
|
90
|
-
"type": "object",
|
|
91
|
-
"properties": {
|
|
92
|
-
"outputName": {
|
|
93
|
-
"type": "string"
|
|
94
|
-
},
|
|
95
|
-
"outputDataType": {
|
|
96
|
-
"type": "string"
|
|
97
|
-
},
|
|
98
|
-
"outputDescription": {
|
|
99
|
-
"type": "string"
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
"required": ["outputName", "outputDataType", "outputDescription"],
|
|
103
|
-
"additionalProperties": false
|
|
104
|
-
},
|
|
105
|
-
"minItems": 1,
|
|
106
|
-
"maxItems": 1
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
"required": ["actionName", "exampleOutput", "actionDescription", "inputs", "outputs"],
|
|
110
|
-
"additionalProperties": false
|
|
111
|
-
},
|
|
112
|
-
"minItems": 1,
|
|
113
|
-
"maxItems": 1
|
|
114
|
-
},
|
|
115
|
-
"instructions": {
|
|
116
|
-
"type": "array",
|
|
117
|
-
"items": {
|
|
118
|
-
"type": "string"
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
"classificationDescription": {
|
|
122
|
-
"type": "string"
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
"required": ["scope", "topic", "actions", "instructions", "classificationDescription"],
|
|
126
|
-
"additionalProperties": false
|
|
127
|
-
},
|
|
128
|
-
"minItems": 1,
|
|
129
|
-
"maxItems": 1
|
|
130
|
-
},
|
|
131
|
-
"sampleUtterances": {
|
|
132
|
-
"type": "array",
|
|
133
|
-
"items": {
|
|
134
|
-
"type": "string"
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
"required": ["agentDescription", "topics", "sampleUtterances"],
|
|
139
|
-
"additionalProperties": false
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
"required": ["agentDefinition", "isSuccess"]
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$ref": "#/definitions/AgentCreateSpecResult",
|
|
4
|
-
"definitions": {
|
|
5
|
-
"AgentCreateSpecResult": {
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"isSuccess": {
|
|
9
|
-
"type": "boolean"
|
|
10
|
-
},
|
|
11
|
-
"errorMessage": {
|
|
12
|
-
"type": "string"
|
|
13
|
-
},
|
|
14
|
-
"jobSpec": {
|
|
15
|
-
"type": "string"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"required": [
|
|
19
|
-
"isSuccess"
|
|
20
|
-
],
|
|
21
|
-
"additionalProperties": false
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
File without changes
|