> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gp.scale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Agents in SGP

> Getting started with building, testing and monitoring agents in SGP

## Using the SPG Agent Builder

To create an application in SGP based on Agent Service,

1. Navigate to the [<u>applications page</u>](https://egp.dashboard.scale.com/applications)

2. Create a new Application using the top right button and select **AI Builder in the modal.**

<img height="1515" width="2048" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXd34G1moL2rP2JG6-mIq6IuOfVY7RAMx-xM1PL2dCZ-S1L6rOyN24zhn2DpVU_Ye94tgToLnQvMoN91skI5suBczLsiWohMeEZy2hOU2jEa-gZ1FroGDO249Mr3NM09b-tOsZ8Imw?key=4UQ2rxZFcFiohhkK9_YjC7dy" />

You are then prompted to give a name to the application namespace as well as to the initial variant you will be configuring. Next, you'll see a YAML text editor:

<img height="1609" width="2048" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXda4fUCfMLfbFs9QBsSOMk1VG7sTmeCOQpMb9LRib_VNMQeG0MPH5r1H-4ELUy82dQ-SVhPdiPomLpte3jnge9wEbpL_9Scqllpf02Ne1EA22FjNASSpbgZc8fu8JAV4sqIzT_bBw?key=4UQ2rxZFcFiohhkK9_YjC7dy" />

This YAML configuration is what is used to build the agent on the fly using Agent Service. You can copy and paste or drag and drop an existing YAML file from your local device.

Alternatively, you can get started by selecting a template from the **Use a template** menu in the bottom. This is a library of preconfigured YAML files or snippets that we are constantly expanding. Selecting the template will immediately update the YAML in the editor, which you can modify.

For example, you could swap the `llm_model` from `gpt-4o-mini` to another one like `llama-3-1-70b-instruct` for an open source alternative. Note that these models are directly interfacing with SGPs model API and can be called by name or by using the `model_deployment_id`.

<img height="1610" width="2048" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfQsmjwEzBUJmFVKGKJgqaKfXlp3l2x77RTNF85qHULupqDzGQASr0jsQqnbIGpOBuQZWlgWeNI4Y1oIJ6p7frkgnm4XxwTAgHjdE311Mdhbc3_QI-XqL5FwZCO5q7BKqjIZXRmxw?key=4UQ2rxZFcFiohhkK9_YjC7dy" />

Often, it is useful to visualize this workflow. To do that, you can swap to the **Graph** view on the top left, which will show a node visualization of your workflow or state machine application. Clicking on any of the nodes shows its configuration.

<img height="1612" width="2048" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfQB-XWbu4hAmDfEYEp1UfEiwvnLrzSAJhYX1aOyNRjN6t3BKIXUln_wu0exnXa_AYURgnSV5qeOeryYl3_PBGZfKxzVhoxam-y2UNhi0aoDl0S8YzKoDihdgm8AFR4qpkMYxwpmw?key=4UQ2rxZFcFiohhkK9_YjC7dy" />

You can easily test the current configuration (as long as it is a valid YAML). To do that click **Test your configuration** in the bottom menu.

<img height="1610" width="2048" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc_g7eXwi4aFVpPjSMIyw2gnBJTPO2cnyWazzsKD7i7aQ7uTErBD3sZuj6-8D-FJ2QKkXGmYS1sznpMjtFzAk3FSNxVQ4jgmDZwE3wzbobTKC_6WHiV2peAhbVVEw1aDBY2iE2u?key=4UQ2rxZFcFiohhkK9_YjC7dy" />

By changing your YAML configuration and continuously testing its output, you can iteratively adjust your agent until it has reached the desired state. The **Runs** panel on the right supports multi-turn by default. If you want to reset context and start a new thread, select **New Thread** from the runs drop down in the top right.

<img height="332" width="1050" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdOG6NtHdfvSr_8B2UtCR3ZYrZE_GUiGa7eSMrLkr1rjppCL79VusR2F0HsbEg69CfB3ZXuwm_0YP_F0p9vjzkGnO2Ccs7ajSq9JXldyARu49avAlKA-dhqfIoRJuH3PVygLE2RfA?key=4UQ2rxZFcFiohhkK9_YjC7dy" />

The YAML configuration is auto-saved continuously to ensure progress is lost. Once you want to go ahead and publish the configuration for deployment, you can hit **Publish Variant** in the top right.

<img height="716" width="1530" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXczpjV1SPZ2pGyHWGK7G3LFjIF7bgzXlGDQbKgvVxJOrcd976UR0hJfS3UsA3eliic_nI_5j20wkYYOave84kyLh1UzSdXSAIgWxJonwa3dWn042SLDHLDbMuutAVI3bombzL13og?key=4UQ2rxZFcFiohhkK9_YjC7dy" />

## What's next?

Using the templates captures only a tiny fraction of what is possible with Agent Service. To write you own custom configurations you need to learn the set of available nodes, connections and techniques.&#x20;

Next up, we'll dive into building YAML files from scratch and will learn the most important nodes and patterns.
