> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://humanloop.com/docs/v4/prompt-file-format/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://humanloop.com/_mcp/server. > The `.prompt` file format is a human-readable and version-control-friendly format for storing model configurations. ![.prompt file format](/docs/_fern-img/3068eaa0072875ac26ed969af25684b0441c9efeb25c424f3c74003aa43611c7.webp) Our `.prompt` file format is a serialized representation of a [Prompt](/docs/v4/prompts), designed to be human-readable and suitable for checking into your version control systems alongside your code. This allows technical teams to maintain the source of truth for their prompts within their existing version control workflow. ## Format The format is heavily inspired by [MDX](https://mdxjs.com/), with model and parameters specified in a YAML header alongside a JSX-inspired syntax for chat templates. **`Chat`** ```jsx Chat --- model: gpt-4o temperature: 0.7 max_tokens: -1 provider: openai endpoint: chat --- You are a friendly assistant. ``` **`Completion`** ```jsx Completion --- model: claude-2 temperature: 0.7 max_tokens: 256 top_p: 1.0 provider: anthropic endpoint: complete --- Autocomplete the sentence. Context: {{context}} {{sentence}} ``` ### Multi-modality and images Images can be specified using nested `` tags within a `` message. To specify text alongside the image, use a `` tag. **`Image and Text`** ```jsx Image and Text --- model: gpt-4o temperature: 0.7 max_tokens: -1 provider: openai endpoint: chat tools: [] --- You are a friendly assistant. What is in this image? ``` ### Tools, tool calls, and tool responses Specify the tools available to the model as a JSON list in the YAML header. Tool calls in assistant messages can be added with nested `` tags. A `` tag within an `` tag denotes a tool call of `type: "function"`, and requires the attributes `name` and `id`. The text wrapped in a `` tag should be a JSON-formatted string containing the tool call's arguments. Tool call responses can then be added with `` tags after the `` message. ```jsx --- model: gpt-4o temperature: 0.7 max_tokens: -1 provider: openai endpoint: chat tools: [ { "name": "get_current_weather", "description": "Get the current weather in a given location", "parameters": { "type": "object", "properties": { "location": { "type": "string", "name": "Location", "description": "The city and state, e.g. San Francisco, CA" }, "unit": { "type": "string", "name": "Unit", "enum": [ "celsius", "fahrenheit" ] } }, "required": [ "location" ] } } ] --- You are a friendly assistant. What is the weather in SF? { "location": "San Francisco, CA" } Cloudy with a chance of meatballs. ``` > Our file format for serializing Prompts to store alongside your source code.