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

# Editor

> The prompt authoring workspace — message blocks, model parameters, and template variables.

The Prompt Editor is the core workspace of Prompt Studio. It provides a structured, IDE‑like interface for building and refining your prompts.

## Message Blocks

Prompts are composed of structured **message blocks**. Each block represents a message in the conversation:

| Block Type    | Purpose                                                  |
| ------------- | -------------------------------------------------------- |
| **System**    | Sets the model's behavior, personality, and instructions |
| **User**      | Sample user input for testing and demonstration          |
| **Assistant** | Pre-filled assistant responses for few-shot examples     |

Click **Add Message** to add additional blocks. Drag blocks to reorder them.

## Template Variables

Use `{{variable_name}}` syntax anywhere in your message blocks to create dynamic prompts:

```
You are a helpful assistant for {{company_name}}.
The user's name is {{user_name}} and they need help with {{topic}}.
```

Variables are resolved at runtime when the prompt is called via API:

```bash theme={null}
curl -X POST https://api.traceport.ai/v1/prompt/my-prompt/run \
  -H "Authorization: Bearer <API_KEY>" \
  -d '{"variables": {"company_name": "Acme", "user_name": "John", "topic": "billing"}}'
```

## Model Parameters

The right panel lets you configure model-specific settings:

| Parameter       | Description                                                       |
| --------------- | ----------------------------------------------------------------- |
| **Model**       | Select the provider and model (e.g., Anthropic Claude 3.5 Sonnet) |
| **Temperature** | Controls randomness (0 = deterministic, 1 = creative)             |
| **Max Tokens**  | Maximum number of tokens in the response                          |
| **Top P**       | Nucleus sampling parameter                                        |

## Toolbar Actions

The editor toolbar includes:

* **Run** — Execute the prompt and view the output in the right panel
* **Save** — Save the current state as a draft
* **Publish** — Promote the draft to a published version
* **Fork** — Create a copy of the prompt for experimentation
* **Optimize** — Let Traceport's AI analyze and suggest improvements to your prompt

<Tip>
  Use the **Fork** feature to experiment with prompt variations without affecting the original.
</Tip>
