> ## Documentation Index
> Fetch the complete documentation index at: https://developer.watson-orchestrate.ibm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating agent with Orchestrate copilot

<PromptTune reason="guide the agent creation flow. Start from scratch and build the agent through a natural conversation with you." />

<Expandable title="command flags">
  | Flag                   | Type   | Required | Description                                                                                                                                                                                              |
  | ---------------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `--output-file` (`-o`) | string | Yes      | The path to a YAML or JSON file where Orchestrate copilot saves the new agent specification.<br />Do not set this flag if you use the `--dry-run` flag.                                                  |
  | `--chat-llm`           | string | No       | Determines which model the underlying Orchestrate copilot server uses. Currently, the model name must end with `llama-3-3-70b-instruct`, but it can originate from any supported virtual model provider. |
  | `--llm`                | string | No       | The LLM used to optimize the agent. The default is `groq/openai/gpt-oss-120b`.                                                                                                                           |
  | `--dry-run`            | string | No       | A flag that prevents saving the results to a file. Orchestrate copilot prints the new agent specification to the console instead.                                                                        |
  | `--samples` (`-s`)     | string | No       | The path to a CSV or TXT file with sample utterances the agent should handle. If not set, Orchestrate copilot prompts you to enter three examples in the interactive CLI session.                        |

  <Note>
    **Note:**
    If you use the `--help` flag with this command, you see that it also includes the `--file` flag. This flag applies only to the agent refinement flow. When you set it, Orchestrate copilot starts that flow. For more information, see [Refining agent with Orchestrate copilot](./refining_agent).
  </Note>
</Expandable>

**Command examples**

<Tabs>
  <Tab title="Example 1">
    Basic agent creation:

    ```bash BASH theme={null}
    orchestrate copilot prompt-tune -o output.yaml
    ```
  </Tab>

  <Tab title="Example 2">
    Agent creation with selected LLM:

    ```bash BASH theme={null}
    orchestrate copilot prompt-tune -o output.yaml --llm groq/openai/gpt-oss-120b
    ```
  </Tab>

  <Tab title="Example 3">
    Agent creation with specified samples:

    ```bash BASH theme={null}
    orchestrate copilot prompt-tune -o output.yaml -s samples.csv
    ```
  </Tab>

  <Tab title="Example 4">
    Agent creation dry run:

    ```bash BASH theme={null}
    orchestrate copilot prompt-tune --dry-run
    ```
  </Tab>
</Tabs>

**Orchestrate copilot interation example**

The following example shows how you interact with Orchestrate copilot to create an agent. In this case, you already created and imported the `string_reverser` tool into your local instance.

```text BASH [expandable] theme={null}
🤖 Copilot: To create a configuration for your agent in the IBM Watsonx Orchestrate platform, let's start by describing the functionality of your agent. What tasks do you want your agent to 
perform, and what kind of operations should it be able to handle? Please provide a detailed or high-level description of your agent's intended functionality.

👤 You: I want to create an agent that can reverse strings

🤖 Copilot: Based on your agent description, I've sorted the available tools by their relevancy and suggest the following tools for your agent:

1. **string_reverser**: A tool that can reverse any provided string.

Please select the tools you want your agent to use by specifying their numbers or names. If you want to see the full list of available tools, I can provide that as well. 

Remember, you can choose one, multiple, or no tools for your agent.

👤 You: 1

🤖 Copilot: You have selected the **string_reverser** tool for your agent.

Now, let's decide on the agent style. Based on your agent description and the selected tool, I suggest a "default" style. This is because the task of reversing strings is a straightforward 
one that can be accomplished using the intrinsic capabilities of the LLM and the selected tool.

Do you approve of the "default" style for your agent?

👤 You: Yes

[INFO] - Please provide 3 sample utterances you expect your agent to handle:
 >: reverse "xyz"
 >: flip "abc"
 >: invert "123"
[INFO] - You provided the following samples:
  1. reverse "xyz"
  2. flip "abc"
  3. invert "123"

🤖 Copilot: Based on your task description, I'll create an initial prompt. 

**Role** - 
You are an agent that can reverse strings according to the user's input.

**Tool Usage Guidelines** - 
1. Before you call a tool, make sure you have all the required tool parameters.
2. Do NOT assume any tool parameters
3. Do NOT pass parameters to the tool that are not explicitly defined
4. Do NOT call the same tool multiple times with the same parameters

**How To Use Tools**

- When the user wants to reverse a string, call the string_reverser tool with the string as a parameter.

Here's my initial prompt. How would you like the output to be formatted? Would you like it to be in a specific format, such as uppercase or lowercase?

👤 You: No use that prompt its perfect

╔═════════════════════════════════════════╗
║  Your agent building session finished successfully!             ║
║  Agent YAML saved in file:                                      ║
║  /Users/user123/output.yaml                                     ║
╚═════════════════════════════════════════╝
```
