Custom Agents in the Agents Catalog
Only HTTPS endpoints are supported for Custom Agents.
- Go to Agents in the left-hand navigation.
- In the Agents catalog tab, select the Custom agent tile.

- Fill in the form:
- Give the agent a clear name and description.
- Provide the public HTTPS endpoint that Encord should call.
- Enter possible decisions that the agent can return (for example, “approve” or “reject”). These decisions are represented as pathways in the Workflow. If your agent does not return decisions, you can leave this field blank.
- Save the configuration to register the Custom Agent.
Setting Up Custom Agents
Before you can register a Custom Agent, you must create and host the HTTPS endpoint that acts as your agent. At a high level, your backend should:- Accept a JSON payload from Encord describing the current project, data item, and frame.
- Use the Encord SDK or API (and any external models you choose) to perform work.
- Write results back to Encord (for example, updating labels or classifications).
- Return a successful HTTP status code so the editor knows the request completed.
Testing Custom Agent Endpoints
You can test your custom agent endpoint directly from the Encord platform to verify it’s working correctly before using it in production.
- Navigate to your agent in the Enabled tab.
- Click the Test tab in the agent details page.
- Configure the test payload with sample data (project hash, data hash, and frame number).
- Click Test agent to send a request to your endpoint.
Using Custom Agents
The Agent is triggered:- In the Label Editor: On demand by the Tasker while annotating or reviewing a task. See here for more information.
- From your Workflow: On tasks that pass through the Workflow node. Custom agents are triggered in the same way as other Agents. Click here to learn more.
Custom Workflow Agents - Manual
If your custom agent should be triggered manually, open the Advanced tab in the Agent node configuration to set them up. Tasks in this Agent stage do not proceed through the workflow unless the agent is triggered manually. When setting up an agent as “advanced”, you do not directly assign a custom agent. Instead, you are hosting a service that picks up tasks from the Workflow stage, performs an action, and then progresses the task to the next stage.
Examples
Use the Encord SDK to configure your Advanced Custom Agent. The Agent executes the configured SDK script for all tasks that are routed through the Agent stage in your Workflow.General Example
General Example
The General Example script shows how to configure a Workflow Agent with the name
Agent 1 and with a pathway called continue to Review.Ensure that you:- Replace
<private_key_path>with the path to your private key. - Replace
<project_hash>with the hash of your Project. - Insert your custom logic where the comment instructs you to do so.
General Example
Pre-Classification of Images Using GPT 4o
Pre-Classification of Images Using GPT 4o
See our end-to-end guide for Pre-Classification using GPT 4o for more detailed information.

- Replace
<private_key_path>with the hash of your private key. - Replace
<project_hash>with the hash of your Project. - Replace
Agent 1with the name of your Agent stage.
Pre-Labeling Videos Using a Mock Model
Pre-Labeling Videos Using a Mock Model
The Pre-Labeling Script selects a random class from the Ontology, generates random bounding box labels, and applies random confidence scores for video frames before advancing the videos to the annotation stage (
In the following script:
Annotate 1). Below is an example of a Workflow where the Pre-Labeling agent can be effectively utilized.
- Replace
<project_hash>with the hash of your Project. - Replace the mock model with your own model, and adapt the rest of the script according to your needs.
- If you choose to give your python file a different name, ensure you replace all references to
prelabel_video.pywith your new file name.
prelabel_video.py
Repeatable Ontology Feature Requirements
Some agent templates support repeatable Ontology feature requirements, which allow you to assign multiple ontology features to a single role. This is useful for agents that need to operate across several classes simultaneously, for example, a merge-object-classes agent that combines multiple source classes into one.Selecting features for a repeatable requirement
When an agent template declares a requirement as repeatable, the configuration form displays a multi-select tree picker instead of the standard single-select picker.The multi-select tree picker only appears for requirements that the agent template has marked as repeatable. Requirements that are not repeatable continue to use the standard single-select behavior.
- Select as many Ontology features as the requirement allows by clicking each feature in the tree picker.
- The form enforces a minimum number of selections. You cannot submit the form until you have selected at least the required number of features. If you select too few, the form displays the message: “Please select at least N features”.
- If the template defines a maximum number of selections, the picker prevents you from selecting additional features once the maximum is reached.
How selected features appear in the agent detail view
After you save the agent, the detail view groups all features selected for a repeatable requirement under a single label. For example, if you selected ClassA and ClassB for a role called Source Object Classes, the detail view displays: Source Object Classes:ClassA ClassB

