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

# Create a prompt

> Create prompts in the Dashboard visual editor or as local .prompt.mdx files

<Tabs>
  <Tab title="Cloud">
    ### 1. Create a prompt

    Open the create menu in the Dashboard to start a new prompt.

    <img src="https://mintcdn.com/puzzlet-9ba7bb98/KmsdEn15yStMq4xE/images/platform/prompt-management/create-a-prompt/create-prompt.png?fit=max&auto=format&n=KmsdEn15yStMq4xE&q=85&s=0d9e1644fc8b8798f236f62f9d6e9506" alt="Create-prompt menu in the Dashboard" className="w-full rounded-xl border border-gray-800 shadow-2xl mb-8" width="878" height="604" data-path="images/platform/prompt-management/create-a-prompt/create-prompt.png" />

    The **Create** menu in the top bar lets you add a new prompt, dataset, or component to the current app.

    ### 2. Name your prompt

    Give your prompt a descriptive name and choose the generation type (Text, Object, Image, or Speech).

    <img src="https://mintcdn.com/puzzlet-9ba7bb98/KmsdEn15yStMq4xE/images/platform/prompt-management/create-a-prompt/create-prompt-name.png?fit=max&auto=format&n=KmsdEn15yStMq4xE&q=85&s=af0e0ce955651e9cea9d58880191b1ea" alt="Prompt name and generation-type selection dialog" className="w-full rounded-xl border border-gray-800 shadow-2xl mb-8" width="1224" height="914" data-path="images/platform/prompt-management/create-a-prompt/create-prompt-name.png" />

    The new-prompt dialog takes a name (used as the filename under `agentmark/`) and a generation type (**Text**, **Object**, **Image**, or **Speech**), which determines the frontmatter config key and supported message tags.

    ### 3. Write your prompt

    Select your model and write your prompt using message tags.

    <img src="https://mintcdn.com/puzzlet-9ba7bb98/KmsdEn15yStMq4xE/images/platform/prompt-management/create-a-prompt/write-prompt.png?fit=max&auto=format&n=KmsdEn15yStMq4xE&q=85&s=6f3cbcf4602fa08e92a03f578aada7a8" alt="Prompt editor with message tags" className="w-full rounded-xl border border-gray-800 shadow-2xl mb-8" width="1872" height="1574" data-path="images/platform/prompt-management/create-a-prompt/write-prompt.png" />

    The editor has a model selector, frontmatter for config (model, temperature, etc.), and a message-tag editor for the prompt body (`<System>`, `<User>`, `<Assistant>`). Syntax highlighting and inline validation help catch frontmatter or tag errors as you type.

    ### 4. Run your prompt

    Add your input variables and run the prompt to see results.

    <video src="https://mintcdn.com/puzzlet-9ba7bb98/xNzpVKgBdOYuvrcl/images/platform/prompt-management/create-a-prompt/run-prompt.mp4?fit=max&auto=format&n=xNzpVKgBdOYuvrcl&q=85&s=f20a565324812a584f5f7d0cc39eb9fc" aria-label="Running a prompt with input variables" autoPlay muted loop playsInline className="w-full rounded-xl border border-gray-800 shadow-2xl mb-8" data-path="images/platform/prompt-management/create-a-prompt/run-prompt.mp4" />

    Fill the input-variable fields (any `{props.foo}` references in your prompt), then click **Run** to execute the prompt. The output streams into the right panel in real time.

    ### 5. Publish

    Publish to save your changes and make them available to your application.

    <img src="https://mintcdn.com/puzzlet-9ba7bb98/KmsdEn15yStMq4xE/images/platform/prompt-management/create-a-prompt/publish-prompt.png?fit=max&auto=format&n=KmsdEn15yStMq4xE&q=85&s=5c30b4322b5b061eb8e91dda3675fd93" alt="Publish button in the prompt editor" className="w-full rounded-xl border border-gray-800 shadow-2xl mb-8" width="1872" height="1506" data-path="images/platform/prompt-management/create-a-prompt/publish-prompt.png" />

    The **Publish** button commits your edits to the app's default Git branch and makes the new version available to your application via the SDK or CLI.

    Every change is automatically versioned. You can view the full version history, compare changes between versions, and rollback to any previous version from the Dashboard. See [Version control](/build/version-control) for details.
  </Tab>

  <Tab title="Local">
    ### 1. Create a `.prompt.mdx` file

    Add a new file in your project's `agentmark/` directory:

    ```mdx agentmark/greeting.prompt.mdx theme={null}
    ---
    name: greeting
    text_config:
      model_name: openai/gpt-5-mini
      temperature: 0.7
    ---

    <System>
    You are a friendly assistant.
    </System>

    <User>
    Say hello to {props.name} and tell them something interesting.
    </User>
    ```

    ### 2. Choose a generation type

    The frontmatter key determines the output type:

    | Key             | Output          | Tags                                |
    | --------------- | --------------- | ----------------------------------- |
    | `text_config`   | Text response   | `<System>`, `<User>`, `<Assistant>` |
    | `object_config` | Structured JSON | `<System>`, `<User>`, `<Assistant>` |
    | `image_config`  | Image           | `<ImagePrompt>`                     |
    | `speech_config` | Audio           | `<SpeechPrompt>`, `<System>`        |

    [Learn more about generation types →](/build/generation-types/overview)

    ### 3. Run your prompt

    ```bash theme={null}
    agentmark run-prompt agentmark/greeting.prompt.mdx
    ```

    <Note>
      Requires the development server running (`agentmark dev`).
    </Note>

    Or run it from your application code. See [Running prompts](/build/running-prompts).

    ### 4. Iterate

    Edit the file, save, and run again. With the dev server running, changes are picked up automatically.

    Your prompts are version-controlled in git alongside your code. When synced to Cloud, every change is tracked with full history and rollback. See [Version control](/build/version-control) for details.
  </Tab>
</Tabs>

## Next steps

<CardGroup cols={2}>
  <Card title="Running prompts" icon="play" href="/build/running-prompts">
    Execute prompts from your application via SDK
  </Card>

  <Card title="Playground" icon="flask-vial" href="/build/playground">
    Compare models and prompts side-by-side
  </Card>

  <Card title="Generation types" icon="sparkles" href="/build/generation-types/overview">
    Text, object, image, and speech output
  </Card>

  <Card title="TemplateDX syntax" icon="brackets-curly" href="/templatedx/syntax">
    Variables, conditionals, loops, and components
  </Card>
</CardGroup>

<div className="mt-8 rounded-lg bg-blue-50 p-6 dark:bg-blue-900/30">
  <h3 className="font-semibold mb-3">Have questions?</h3>
  <p className="mb-4">Reach out any time:</p>

  <ul>
    <li>
      Email the team at <a href="mailto:hello@agentmark.co" className="text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-200">[hello@agentmark.co](mailto:hello@agentmark.co)</a> for support
    </li>

    <li>
      Schedule an <a href="https://cal.com/ryan-randall/enterprise" className="text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-200">Enterprise Demo</a> to learn about AgentMark's business solutions
    </li>
  </ul>
</div>
