Skip to content

Commit

Permalink
fix: edit messages for agent create and agent generte spec
Browse files Browse the repository at this point in the history
  • Loading branch information
jshackell-sfdc committed Dec 11, 2024
1 parent 77cfb0b commit 031ff27
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 21 deletions.
18 changes: 9 additions & 9 deletions messages/agent.create.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# summary

Create an Agent from an agent spec.
Create an agent in your org from a local agent spec file.

# description

Create an Agent from an agent spec. Agent metadata is created in the target org and retrieved to the local project.
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.

# flags.job-spec.summary
When this command finishes, your org contains the new agent, which you can then edit in the Agent Builder UI. This command also retrieves all the metadata files associated with the new agent to your local DX project.

The path to an agent spec file.
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>". If your agent's name includes spaces, replace them with underscores to get the API name. For example, if you specified --name "My Agent", the API name is "My_Agent".

# flags.job-spec.description
# flags.job-spec.summary

The agent spec file defines job titles and descriptions for the agent and can be created using the `sf agent create spec` command.
Path to an agent spec file.

# flags.name.summary

The name of the agent.
Name of the new agent.

# examples

- Create an Agent:
- Create an agent called "Customer Support Agent" in an org with alias "my-org" using the specified agent spec file:

<%= config.bin %> <%= command.id %> --spec ./agent-spec.json
<%= config.bin %> <%= command.id %> --name "Customer Support Agent" --job-spec ./config/agentSpec.json --target-org my-org
30 changes: 19 additions & 11 deletions messages/agent.generate.spec.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,49 @@
# summary

Create an Agent spec.
Generate an agent spec, which is the list of jobs that the agent performs.

# description

Create an Agent spec, which is a list of job titles and descriptions that the agent performs.
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.

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.

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.

# flags.type.summary

The type of agent to create.
Type of agent to create.

# flags.role.summary

The role of the agent.
Role of the agent.

# flags.company-name.summary

The name of the company.
Name of your company.

# flags.company-description.summary

The description of the company, containing details to be used when generating agent job descriptions.
Description of your company.

# flags.company-website.summary

The website URL for the company.
Website URL of your company.

# flags.output-dir.summary

The location within the project where the agent spec will be written.
Directory where the agent spec file is written; can be an absolute or relative path.

# flags.file-name.summary

The name of the file to write the agent spec to.
Name of the generated agent spec file.

# examples

- Create an Agent spec in the default location:
- 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:

<%= 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"

- 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":

<%= config.bin %> <%= command.id %> --type customer_facing --role Support --company-name "Coral Cloud" --company-description "A meaningful description"
<%= config.bin %> <%= command.id %> --output-dir specs --target-org my-org
1 change: 0 additions & 1 deletion src/commands/agent/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export default class AgentCreate extends SfCommand<AgentCreateResult> {
char: 'f',
required: true,
summary: messages.getMessage('flags.job-spec.summary'),
description: messages.getMessage('flags.job-spec.description'),
}),
name: Flags.string({
char: 'n',
Expand Down

0 comments on commit 031ff27

Please sign in to comment.