@salesforce/plugin-agent 1.5.0 → 1.5.2

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 CHANGED
@@ -71,15 +71,15 @@ sf plugins
71
71
 
72
72
  ## `sf agent create`
73
73
 
74
- Create an Agent from an agent spec.
74
+ Create an agent in your org from a local agent spec file.
75
75
 
76
76
  ```
77
77
  USAGE
78
78
  $ sf agent create -o <value> -f <value> -n <value> [--json] [--flags-dir <value>] [--api-version <value>]
79
79
 
80
80
  FLAGS
81
- -f, --job-spec=<value> (required) The path to an agent spec file.
82
- -n, --name=<value> (required) The name of the agent.
81
+ -f, --job-spec=<value> (required) Path to an agent spec file.
82
+ -n, --name=<value> (required) API name of the new agent.
83
83
  -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
84
84
  configuration variable is already set.
85
85
  --api-version=<value> Override the api version used for api requests made by this command
@@ -89,27 +89,31 @@ GLOBAL FLAGS
89
89
  --json Format output as json.
90
90
 
91
91
  DESCRIPTION
92
- Create an Agent from an agent spec.
92
+ Create an agent in your org from a local agent spec file.
93
93
 
94
- Create an Agent from an agent spec. Agent metadata is created in the target org and retrieved to the local project.
94
+ To generate an agent spec file, run the "agent generate spec" CLI command, which outputs a JSON file with the list of
95
+ jobs and descriptions that the new agent can perform. Then specify this generated spec file to the --job-spec flag of
96
+ this command, along with the name of the new agent.
95
97
 
96
- EXAMPLES
97
- Create an Agent:
98
+ When this command finishes, your org contains the new agent, which you can then edit in the Agent Builder UI. The new
99
+ agent already has a list of topics and actions that were automatically created from the list of jobs in the provided
100
+ agent spec file. This command also retrieves all the metadata files associated with the new agent to your local DX
101
+ project.
98
102
 
99
- $ sf agent create --spec ./agent-spec.json
103
+ To open the new agent in your org's Agent Builder UI, run this command: "sf org open agent --name
104
+ <api-name-of-your-agent>".
100
105
 
101
- FLAG DESCRIPTIONS
102
- -f, --job-spec=<value> The path to an agent spec file.
106
+ EXAMPLES
107
+ Create an agent called "CustomerSupportAgent" in an org with alias "my-org" using the specified agent spec file:
103
108
 
104
- The agent spec file defines job titles and descriptions for the agent and can be created using the `sf agent create
105
- spec` command.
109
+ $ sf agent create --name CustomerSupportAgent --job-spec ./config/agentSpec.json --target-org my-org
106
110
  ```
107
111
 
108
- _See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.0/src/commands/agent/create.ts)_
112
+ _See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.2/src/commands/agent/create.ts)_
109
113
 
110
114
  ## `sf agent generate spec`
111
115
 
112
- Create an Agent spec.
116
+ Generate an agent spec, which is the list of jobs that the agent performs.
113
117
 
114
118
  ```
115
119
  USAGE
@@ -118,37 +122,55 @@ USAGE
118
122
  [-f <value>]
119
123
 
120
124
  FLAGS
121
- -d, --output-dir=<value> [default: config] The location within the project where the agent spec will be
122
- written.
123
- -f, --file-name=<value> [default: agentSpec.json] The name of the file to write the agent spec to.
125
+ -d, --output-dir=<value> [default: config] Directory where the agent spec file is written; can be an
126
+ absolute or relative path.
127
+ -f, --file-name=<value> [default: agentSpec.json] Name of the generated agent spec file.
124
128
  -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
125
129
  configuration variable is already set.
126
- -t, --type=<option> The type of agent to create.
130
+ -t, --type=<option> Type of agent to create.
127
131
  <options: customer|internal>
128
132
  --api-version=<value> Override the api version used for api requests made by this command
129
- --company-description=<value> The description of the company, containing details to be used when generating agent
130
- job descriptions.
131
- --company-name=<value> The name of the company.
132
- --company-website=<value> The website URL for the company.
133
- --role=<value> The role of the agent.
133
+ --company-description=<value> Description of your company.
134
+ --company-name=<value> Name of your company.
135
+ --company-website=<value> Website URL of your company.
136
+ --role=<value> Role of the agent.
134
137
 
135
138
  GLOBAL FLAGS
136
139
  --flags-dir=<value> Import flag values from a directory.
137
140
  --json Format output as json.
138
141
 
139
142
  DESCRIPTION
140
- Create an Agent spec.
143
+ Generate an agent spec, which is the list of jobs that the agent performs.
144
+
145
+ When using Salesforce CLI to create an agent in your org, the first step is to generate the local JSON-formatted agent
146
+ spec file with this command.
141
147
 
142
- Create an Agent spec, which is a list of job titles and descriptions that the agent performs.
148
+ An agent spec is a list of jobs and descriptions that capture what the agent can do. Use flags such as --role and
149
+ --company-description to provide details about your company and the role that the agent plays in your company; you can
150
+ also enter the information interactively if you prefer. When you then execute this command, the large language model
151
+ (LLM) associated with your org uses the information to generate the list of jobs that the agent most likely performs.
152
+ We recommend that you provide good details for --role, --company-description, etc, so that the LLM can generate the
153
+ best and most relevant list of jobs and descriptions. Once generated, you can edit the spec file; for example, you can
154
+ remove jobs that don't apply to your agent.
155
+
156
+ When your agent spec is ready, you then create the agent in your org by specifying the agent spec file to the
157
+ --job-spec flag of the "agent create" CLI command.
143
158
 
144
159
  EXAMPLES
145
- Create an Agent spec in the default location:
160
+ Create an agent spec for your default org in the default location and use flags to specify the agent's role and your
161
+ company details:
162
+
163
+ $ sf agent generate spec --type customer --role "Assist users in navigating and managing bookings" \
164
+ --company-name "Coral Cloud" --company-description "Resort that manages guests and their reservations and \
165
+ experiences"
166
+
167
+ Create an agent spec by being prompted for role and company details interactively; write the generated file to the
168
+ "specs" directory and use the org with alias "my-org":
146
169
 
147
- $ sf agent generate spec --type customer_facing --role Support --company-name "Coral Cloud" \
148
- --company-description "A meaningful description"
170
+ $ sf agent generate spec --output-dir specs --target-org my-org
149
171
  ```
150
172
 
151
- _See code: [src/commands/agent/generate/spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.0/src/commands/agent/generate/spec.ts)_
173
+ _See code: [src/commands/agent/generate/spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.2/src/commands/agent/generate/spec.ts)_
152
174
 
153
175
  ## `sf agent preview`
154
176
 
@@ -183,7 +205,7 @@ FLAG DESCRIPTIONS
183
205
  the API name of the agent? (TBD based on agents library)
184
206
  ```
185
207
 
186
- _See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.0/src/commands/agent/preview.ts)_
208
+ _See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.2/src/commands/agent/preview.ts)_
187
209
 
188
210
  ## `sf agent test cancel`
189
211
 
@@ -215,7 +237,7 @@ EXAMPLES
215
237
  $ sf agent test cancel --job-id AiEvalId
216
238
  ```
217
239
 
218
- _See code: [src/commands/agent/test/cancel.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.0/src/commands/agent/test/cancel.ts)_
240
+ _See code: [src/commands/agent/test/cancel.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.2/src/commands/agent/test/cancel.ts)_
219
241
 
220
242
  ## `sf agent test results`
221
243
 
@@ -254,7 +276,7 @@ FLAG DESCRIPTIONS
254
276
  results will not be written.
255
277
  ```
256
278
 
257
- _See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.0/src/commands/agent/test/results.ts)_
279
+ _See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.2/src/commands/agent/test/results.ts)_
258
280
 
259
281
  ## `sf agent test resume`
260
282
 
@@ -302,7 +324,7 @@ FLAG DESCRIPTIONS
302
324
  If the command continues to run after the wait period, the CLI returns control of the terminal window to you.
303
325
  ```
304
326
 
305
- _See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.0/src/commands/agent/test/resume.ts)_
327
+ _See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.2/src/commands/agent/test/resume.ts)_
306
328
 
307
329
  ## `sf agent test run`
308
330
 
@@ -353,6 +375,6 @@ FLAG DESCRIPTIONS
353
375
  If the command continues to run after the wait period, the CLI returns control of the terminal window to you.
354
376
  ```
355
377
 
356
- _See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.0/src/commands/agent/test/run.ts)_
378
+ _See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.2/src/commands/agent/test/run.ts)_
357
379
 
358
380
  <!-- commandsstop -->
@@ -7,6 +7,7 @@ export default class AgentCreate extends SfCommand<AgentCreateResult> {
7
7
  static readonly summary: string;
8
8
  static readonly description: string;
9
9
  static readonly examples: string[];
10
+ static readonly requiresProject = true;
10
11
  static state: string;
11
12
  static readonly flags: {
12
13
  'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
@@ -4,20 +4,19 @@
4
4
  * Licensed under the BSD 3-Clause license.
5
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
6
  */
7
+ import * as fs from 'node:fs';
7
8
  import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
8
- import { Messages } from '@salesforce/core';
9
- import { Duration, sleep } from '@salesforce/kit';
9
+ import { Lifecycle, Messages } from '@salesforce/core';
10
10
  import { MultiStageOutput } from '@oclif/multi-stage-output';
11
11
  import { colorize } from '@oclif/core/ux';
12
+ import { Agent, AgentCreateLifecycleStages } from '@salesforce/agents';
12
13
  Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
13
14
  const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.create');
14
- // There is no API for this yet. It's being planned/built by the Agent Creator team.
15
- // However, we could possibly use:
16
- // /services/data/{api-version}/connect/attach-agent-topics
17
15
  export default class AgentCreate extends SfCommand {
18
16
  static summary = messages.getMessage('summary');
19
17
  static description = messages.getMessage('description');
20
18
  static examples = messages.getMessages('examples');
19
+ static requiresProject = true;
21
20
  static state = 'beta';
22
21
  static flags = {
23
22
  'target-org': Flags.requiredOrg(),
@@ -26,7 +25,6 @@ export default class AgentCreate extends SfCommand {
26
25
  char: 'f',
27
26
  required: true,
28
27
  summary: messages.getMessage('flags.job-spec.summary'),
29
- description: messages.getMessage('flags.job-spec.description'),
30
28
  }),
31
29
  name: Flags.string({
32
30
  char: 'n',
@@ -42,25 +40,35 @@ export default class AgentCreate extends SfCommand {
42
40
  title: `Creating ${flags.name} Agent`,
43
41
  stages: [
44
42
  jsonParsingStage,
45
- 'Generating GenAiPlanner metadata',
46
- 'Creating agent in org',
47
- 'Retrieving agent metadata',
43
+ 'Generating local metadata',
44
+ 'Deploying metadata to org',
45
+ 'Creating Agent in org',
46
+ 'Retrieving Agent metadata',
48
47
  ],
49
48
  });
50
49
  mso.goto(jsonParsingStage);
51
- await sleep(Duration.milliseconds(200));
52
- mso.goto('Generating GenAiPlanner metadata');
53
- await sleep(Duration.milliseconds(200));
54
- mso.goto('Creating agent in org');
55
- // POST to /services/data/{api-version}/connect/attach-agent-topics
56
- // To simulate time spent on the server generating the spec.
57
- await sleep(Duration.seconds(5));
58
- mso.goto('Retrieving agent metadata');
59
- await sleep(Duration.seconds(3));
50
+ const agentConfig = {
51
+ ...JSON.parse(fs.readFileSync(flags['job-spec'], 'utf8')),
52
+ name: flags.name,
53
+ };
54
+ // @ts-expect-error not using async method in callback
55
+ Lifecycle.getInstance().on(AgentCreateLifecycleStages.CreatingLocally, () => mso.goto('Generating local metadata'));
56
+ Lifecycle.getInstance().on(AgentCreateLifecycleStages.DeployingMetadata, () =>
57
+ // @ts-expect-error not using async method in callback
58
+ mso.goto('Deploying metadata to org'));
59
+ // @ts-expect-error not using async method in callback
60
+ Lifecycle.getInstance().on(AgentCreateLifecycleStages.CreatingRemotely, () => mso.goto('Creating Agent in org'));
61
+ Lifecycle.getInstance().on(AgentCreateLifecycleStages.RetrievingMetadata, () =>
62
+ // @ts-expect-error not using async method in callback
63
+ mso.goto('Retrieving Agent metadata'));
64
+ const agent = new Agent(flags['target-org'].getConnection(flags['api-version']), this.project);
65
+ const created = await agent.create(agentConfig);
60
66
  mso.stop();
61
- this.log(colorize('green', `Successfully created ${flags.name} in ${flags['target-org'].getUsername() ?? 'the target org'}.`));
67
+ this.log(created.isSuccess
68
+ ? colorize('green', `Successfully created ${flags.name} in ${flags['target-org'].getUsername() ?? 'the target org'}.`)
69
+ : colorize('red', `failed to create agent ${flags.name}: ${created.errorMessage ?? ''}`));
62
70
  this.log(`Use ${colorize('dim', `sf org open agent --name ${flags.name}`)} to view the agent in the browser.`);
63
- return { isSuccess: true };
71
+ return { isSuccess: created.isSuccess };
64
72
  }
65
73
  }
66
74
  //# sourceMappingURL=create.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/agent/create.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,cAAc,CAAC,CAAC;AAOnF,oFAAoF;AACpF,kCAAkC;AAClC,6DAA6D;AAE7D,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,SAA4B;IAC5D,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC;IAEtB,MAAM,CAAU,KAAK,GAAG;QAC7B,YAAY,EAAE,KAAK,CAAC,WAAW,EAAE;QACjC,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE;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,CAAC,IAAI,KAAK,OAAO,CAAC,YAAY,IAAI,EAAE,EAAE,CAAC,CAC3F,CAAC;QACF,IAAI,CAAC,GAAG,CAAC,OAAO,QAAQ,CAAC,KAAK,EAAE,4BAA4B,KAAK,CAAC,IAAI,EAAE,CAAC,oCAAoC,CAAC,CAAC;QAE/G,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;IAC1C,CAAC"}
@@ -129,7 +129,7 @@ export default class AgentCreateSpec extends SfCommand {
129
129
  });
130
130
  // Write a file with the returned job specs
131
131
  const filePath = join(flags['output-dir'], flags['file-name']);
132
- writeFileSync(filePath, JSON.stringify({ type, role, companyName, companyDescription, companyWebsite, JobSpec: agentSpec }, null, 4));
132
+ writeFileSync(filePath, JSON.stringify({ type, role, companyName, companyDescription, companyWebsite, jobSpec: agentSpec }, null, 4));
133
133
  this.spinner.stop();
134
134
  this.log(`\nSaved agent spec: ${filePath}`);
135
135
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"spec.js","sourceRoot":"","sources":["../../../../src/commands/agent/generate/spec.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAa,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAW,MAAM,oBAAoB,CAAC;AAEpD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,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,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAEnD,IAAI,aAAa,EAAE,CAAC;YAClB,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;YAE7F,OAAO,aAAa,CAAC;QACvB,CAAC;QAED,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,MAAM,CAAC;gBACZ,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;gBAC5D,OAAO;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;iBACxC;aACF,CAAC,CAAC;QACL,CAAC;QAED,OAAO,aAAa,CAAC;YACnB,OAAO;YACP,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,KAAK,EAAE;gBACL,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;aACxC;SACF,CAAC,CAAC;IACL,CAAC"}
@@ -1,25 +1,25 @@
1
1
  # summary
2
2
 
3
- Create an Agent from an agent spec.
3
+ Create an agent in your org from a local agent spec file.
4
4
 
5
5
  # description
6
6
 
7
- Create an Agent from an agent spec. Agent metadata is created in the target org and retrieved to the local project.
7
+ To generate an agent spec file, run the "agent generate spec" CLI command, which outputs a JSON file with the list of jobs and descriptions that the new agent can perform. Then specify this generated spec file to the --job-spec flag of this command, along with the name of the new agent.
8
8
 
9
- # flags.job-spec.summary
9
+ When this command finishes, your org contains the new agent, which you can then edit in the Agent Builder UI. The new agent already has a list of topics and actions that were automatically created from the list of jobs in the provided agent spec file. This command also retrieves all the metadata files associated with the new agent to your local DX project.
10
10
 
11
- The path to an agent spec file.
11
+ 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>".
12
12
 
13
- # flags.job-spec.description
13
+ # flags.job-spec.summary
14
14
 
15
- The agent spec file defines job titles and descriptions for the agent and can be created using the `sf agent create spec` command.
15
+ Path to an agent spec file.
16
16
 
17
17
  # flags.name.summary
18
18
 
19
- The name of the agent.
19
+ API name of the new agent.
20
20
 
21
21
  # examples
22
22
 
23
- - Create an Agent:
23
+ - Create an agent called "CustomerSupportAgent" in an org with alias "my-org" using the specified agent spec file:
24
24
 
25
- <%= config.bin %> <%= command.id %> --spec ./agent-spec.json
25
+ <%= config.bin %> <%= command.id %> --name CustomerSupportAgent --job-spec ./config/agentSpec.json --target-org my-org
@@ -1,41 +1,49 @@
1
1
  # summary
2
2
 
3
- Create an Agent spec.
3
+ Generate an agent spec, which is the list of jobs that the agent performs.
4
4
 
5
5
  # description
6
6
 
7
- Create an Agent spec, which is a list of job titles and descriptions that the agent performs.
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.
8
12
 
9
13
  # flags.type.summary
10
14
 
11
- The type of agent to create.
15
+ Type of agent to create.
12
16
 
13
17
  # flags.role.summary
14
18
 
15
- The role of the agent.
19
+ Role of the agent.
16
20
 
17
21
  # flags.company-name.summary
18
22
 
19
- The name of the company.
23
+ Name of your company.
20
24
 
21
25
  # flags.company-description.summary
22
26
 
23
- The description of the company, containing details to be used when generating agent job descriptions.
27
+ Description of your company.
24
28
 
25
29
  # flags.company-website.summary
26
30
 
27
- The website URL for the company.
31
+ Website URL of your company.
28
32
 
29
33
  # flags.output-dir.summary
30
34
 
31
- The location within the project where the agent spec will be written.
35
+ Directory where the agent spec file is written; can be an absolute or relative path.
32
36
 
33
37
  # flags.file-name.summary
34
38
 
35
- The name of the file to write the agent spec to.
39
+ Name of the generated agent spec file.
36
40
 
37
41
  # examples
38
42
 
39
- - Create an Agent spec in the default location:
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":
40
48
 
41
- <%= config.bin %> <%= command.id %> --type customer_facing --role Support --company-name "Coral Cloud" --company-description "A meaningful description"
49
+ <%= config.bin %> <%= command.id %> --output-dir specs --target-org my-org