.prompt and .agent Files
Human-readable formats for Prompts and Agents that can be stored alongside your source code.
Human-readable formats for Prompts and Agents that can be stored alongside your source code.

Humanloop provides serialized File formats (.prompt, .agent) for storing Prompts and Agents as human-readable, version-control-friendly files.
These formats enable you to integrate your Prompts and Agents into standard software development workflows.
Humanloop currently supports the following File formats:
The Humanloop SDK supports working with local Files in your codebase, enabling a code-first development approach.
For detailed instructions on syncing and using local Files, see our Store Prompts in code guide.
Both .prompt and .agent files follow the same basic structure:
---): Contains all configuration parameters including model selection,
generation parameters, and tool definitions. The frontmatter defines how the Prompt or Agent will execute when called.{{variable_name}} syntax.The formats are nearly identical, with .agent files having just two additional parameters (max_iterations and tools[].on_agent_call) to control execution flow.
Currently, we only support pulling these Files from Humanloop to your local environment. However, you can modify local Files and use them directly - when the SDK detects changes to a File, it automatically creates a new version for that path. Two-way synchronization is coming soon.
Images can be specified using nested <image> tags within a <user> message. To specify text alongside the image, use a <text> tag.
Currently, the url attribute only supports remote URLs (https://). Local file paths are not supported yet, though we’re exploring this capability for future releases.
Tools are specified in the YAML header as a JSON array. Both .prompt and .agent files can include tools,
though .agent files include additional configuration for tool execution control.
Assistant messages can contain either text or tool requests. For tool requests, use a <tool> tag within an <assistant>
tag with attributes name and id. The text wrapped in the <tool> tag should be a JSON-formatted string containing the tool call’s arguments.
Tool responses can then be added with standalone <tool> tags after the <assistant> message,
using the same name and id to link the response to the request.