Move Agent

Move the Agent to a different path or change the name.

Authentication

X-API-KEYstring
API Key authentication via header

Path parameters

idstringRequired
Unique identifier for Agent.

Request

This endpoint expects an object.
pathstringOptional
Path of the Flow including the Flow name, which is used as a unique identifier.
namestringOptional
Name of the Flow.
directory_idstringOptional

Unique identifier for the Directory to move Flow to. Starts with dir_.

Response

Successful Response
pathstring
Path of the Agent, including the name, which is used as a unique identifier.
idstring
Unique identifier for the Agent.
modelstring

The model instance used, e.g. gpt-4. See supported models

toolslist of objects
List of tools that the Agent can call. These can be linked files or inline tools.
namestring
Name of the Agent.
version_idstring
Unique identifier for the specific Agent Version. If no query params provided, the default deployed Agent Version is returned.
created_atdatetime
updated_atdatetime
statusenum
The status of the Agent Version.
Allowed values:
last_used_atdatetime
version_logs_countinteger
The number of logs that have been generated for this Agent Version
total_logs_countinteger
The number of logs that have been generated across all Agent Versions
inputslist of objects
Inputs associated to the Agent. Inputs correspond to any of the variables used within the Agent template.
directory_idstring
ID of the directory that the file is in on Humanloop.
endpointenum
The provider model endpoint used.
Allowed values:
templatestring or list of objects
The template contains the main structure and instructions for the model, including input variables for dynamic values. For chat models, provide the template as a ChatTemplate (a list of messages), e.g. a system message, followed by a user message with an input variable. For completion models, provide a prompt template as a string. Input variables should be specified with double curly bracket syntax: `{{input_name}}`.
template_languageenum
The template language to use for rendering the template.
Allowed values:
providerenum
The company providing the underlying model service.
max_tokensintegerDefaults to -1

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

temperaturedoubleDefaults to 1
What sampling temperature to use when making a generation. Higher values means the model will be more creative.
top_pdoubleDefaults to 1

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.

stopstring or list of strings

The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence.

presence_penaltydoubleDefaults to 0

Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far.

frequency_penaltydoubleDefaults to 0

Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far.

othermap from strings to any
Other parameter values to be passed to the provider call.
seedinteger
If specified, model will make a best effort to sample deterministically, but it is not guaranteed.
response_formatobject

The format of the response. Only {"type": "json_object"} is currently supported for chat.

reasoning_effortenum or integer

Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget.

attributesmap from strings to any
Additional fields to describe the Prompt. Helpful to separate Prompt versions from each other with details on how they were created or used.
max_iterationsinteger
The maximum number of iterations the Agent can run. This is used to limit the number of times the Agent model is called.
version_namestring
Unique name for the Agent version. Version names must be unique for a given Agent.
version_descriptionstring
Description of the version, e.g., the changes made in this version.
descriptionstring
Description of the Agent.
tagslist of strings
List of tags associated with the file.
readmestring
Long description of the file.
schemamap from strings to any
The JSON schema for the Prompt.
type"agent"
environmentslist of objects
The list of environments the Agent Version is deployed to.
created_byany
The user who created the Agent.
committed_byany
The user who committed the Agent Version.
committed_atdatetime
The date and time the Agent Version was committed.
evaluatorslist of objects
Evaluators that have been attached to this Agent that are used for monitoring logs.
evaluator_aggregateslist of objects
Aggregation of Evaluator results for the Agent Version.
raw_file_contentstring
The raw content of the Agent. Corresponds to the .agent file.

Errors

422
Move Agents ID Patch Request Unprocessable Entity Error