Humanloop acts as a registry of your Prompts so you can centrally manage all their versions and Logs, and evaluate and improve your AI systems.
This guide will show you how to create a Prompt in the UI or via the SDK/API.
Prerequisite: A Humanloop account.
You can create an account now by going to the Sign up page.
If you haven’t already, create an account or log in to Humanloop
If you’re the first person in your organization, you’ll need to add an API key to a model provider.
Using the Prompt Editor will use your OpenAI credits in the same way that the OpenAI playground does. Keep your API keys for Humanloop and the model providers private.
When you first open Humanloop you’ll see your File navigation on the left. Click ‘+ New’ and create a Prompt.

In the sidebar, rename this file to “Comedian Bot” now or later.
The left hand side of the screen defines your Prompt – the parameters such as model, temperature and template. The right hand side is a single chat session with this Prompt.

In the editor, update the system message to:

This message forms the chat template. It has an input slot called topic (surrounded by two curly brackets) for an input value that is provided each time you call this Prompt.
On the right hand side of the page, you’ll now see a box in the Inputs section for topic.
topic e.g. music, jogging, whateverThis will call OpenAI’s model and return the assistant response. Feel free to try other values, the model is very funny.
You now have a first version of your prompt that you can use.

Under the Prompt File, click ‘Logs’ to view all the generations from this Prompt
Click on a row to see the details of what version of the Prompt generated it. From here you can give feedback to that generation, see performance metrics, open up this example in the Editor, or add this log to a Dataset.

The Humanloop Python SDK allows you to programmatically create and version your Prompts in Humanloop, and log generations from your models. This guide will show you how to create a Prompt using the SDK.
Note that you can also version your prompts dynamically with every Prompt
Prerequisite: A Humanloop SDK Key.
You can get this from your Organisation Settings page if you have the right permissions.
First you need to install and initialize the SDK. If you have already done this, skip to the next section.
Open up your terminal and follow these steps:
After initializing the SDK client, you can call the Prompt creation endpoint.
This can be done by using the Prompt Upsert method in the SDK.
Or by calling the API directly:
You now have a Prompt in Humanloop that contains your initial version. You can call the Prompt in Editor and invite team members by going to your organization’s members page.
With the Prompt set up, you can now integrate it into your app by following the Call a Prompt Guide.