Upsert Agent
Create an Agent or update it with a new version if it already exists.
Agents are identified by the ID or their path. The parameters (i.e. the template, temperature, model etc.) and tools determine the versions of the Agent.
You can provide version_name and version_description to identify and describe your versions. Version names must be unique within an Agent - attempting to create a version with a name that already exists will result in a 409 Conflict error.
Request
- Base URL: https://api.humanloop.com/v5
- URL: https://api.humanloop.com/v5/agents
- Auth: API key in header X-API-KEY
Request body
Path of the Agent, including the name. This locates the Agent in the Humanloop filesystem and is used as as a unique identifier. For example: folder/name or just name.
ID for an existing Agent.
The model instance used, e.g. gpt-4. See supported models
Supported model provider endpoints.
Template engine to use for rendering templates.
Supported model providers.
The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt
What sampling temperature to use when making a generation. Higher values means the model will be more creative.
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far.
Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far.
Other parameter values to be passed to the provider call.
If specified, model will make a best effort to sample deterministically, but it is not guaranteed.
Additional fields to describe the Prompt. Helpful to separate Prompt versions from each other with details on how they were created or used.
The maximum number of iterations the Agent can run. This is used to limit the number of times the Agent model is called.
Unique name for the Prompt version. Each Prompt can only have one version with a given name.
Description of the Version.
Description of the Prompt.
List of tags associated with this prompt.
Long description of the Prompt.
Response
Successful Response
Path of the Agent, including the name, which is used as a unique identifier.
Unique identifier for the Agent.
ID of the directory that the file is in on Humanloop.
The model instance used, e.g. gpt-4. See supported models
Supported model provider endpoints.
Template engine to use for rendering templates.
Supported model providers.
The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt
What sampling temperature to use when making a generation. Higher values means the model will be more creative.
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far.
Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far.
Other parameter values to be passed to the provider call.
If specified, model will make a best effort to sample deterministically, but it is not guaranteed.
Additional fields to describe the Prompt. Helpful to separate Prompt versions from each other with details on how they were created or used.
The maximum number of iterations the Agent can run. This is used to limit the number of times the Agent model is called.
Unique name for the Agent version. Version names must be unique for a given Agent.
Description of the version, e.g., the changes made in this version.
Description of the Agent.
List of tags associated with the file.
Long description of the file.
Name of the Agent.
The JSON schema for the Prompt.
Unique identifier for the specific Agent Version. If no query params provided, the default deployed Agent Version is returned.
The date and time the Agent Version was committed.
An enumeration.
The number of logs that have been generated for this Agent Version
The number of logs that have been generated across all Agent Versions
The raw content of the Agent. Corresponds to the .agent file.
Changes
No recorded changes to this operation across all 1 revision of this API.