Model HQ

Editing Agents in Model HQ

In this section, we will explore how to edit an existing Agent. Learn about the edit interface, process configuration, and advanced customization options.

 

Open the Edit Interface

Editing an existing Agent process is straightforward in Model HQ.

Select the Agent you want to edit from the dropdown.

edit

We will use the Contract Analyzer example to illustrate this process. (Editing the Contract Analyzer Agent process is also shown in our YouTube video: https://youtu.be/UTNQxspDi3I)

Click the Edit button.

How to Edit an Agent?

To edit an existing Agent, select the Agent Process you wish to modify and click Edit.

Next, click on Process. This opens the detailed view of all the steps within the Agent Process.

  1. Use + or to add or remove rows.
  2. Modify the Service, Instruction, or Context fields as needed.

Important

We recommend clicking > after editing each row. This confirms and saves your changes.
If you skip this, the new Context or step modifications will not be saved.

Depending on the nature of your changes, you may also need to redefine the following:

  • + Inputs
  • + Files

Editing a Copy of an Existing Process

If you intend to make significant or permanent changes, we suggest editing a copy of the process.

agent process

  1. Go to Agents > Build New > Start Building.
  2. In Process Name, enter a name for the new process.
  3. Under Derive from Existing Process, select the Agent you wish to copy.
  4. Click > to confirm.

You'll now be able to edit a copy of the selected process — without affecting the original Agent Process.

 

Edit Interface

You will now see the following screen:

edit

At the top, there is a brief instructional guide.

Below it, you'll find the details section. Since we selected "contract_analyzer", it contains the corresponding details in JSON format. This includes every configuration related to the agent.

In the Configure menu, you will find several options, including:

  • Process
  • Run
  • Export
  • Options
  • Home

Let's review each button in detail.

Process

To define each step in the agent workflow:

  1. Select a Service — Choose the service the agent will use in this step.
  2. Add Instructions — Provide a prompt or directive for the agent (e.g., a question).
  3. Select Context — Optionally provide background data or source material to assist the agent.

Click + (Add) to append a new step, or - (Minus) to remove the last one.

🛠 Services, Instructions, Description & Expected Context

Below is the list of supported services, their expected instruction formats, descriptions, and applicable context sources.

Service Name

build_table

Instruction

Enter name of table (will be built from the selected input table file)

Description

Create Table from CSV data

Context

User-Table

Service Name

query_custom_table

Instruction

Enter query for database table

Description

Database lookup in natural language. Requires build_table first. Keep table schema in mind.

Context

Enter_name_of_Table This table is the result of Build_Table service step.

Service Name

semantic_filter

Instruction

What is your question or instruction?

Description

Filters an existing source based on question/topic to create new filtered source

Context

User-Source

Service Name

text_filter

Instruction

What is the keyword or topic to filter the source?

Description

Filters an existing source based on question/topic

Context

User-Source, or a 'filtered' query in the agent process.

Service Name

document_filter

Instruction

Document name

Description

Filters an existing source by document name

Context

User-Source, or a 'filtered' query in the agent process.

Service Name

table_filter

Instruction

No instruction required

Description

Filters table type content in User Source

Context

User-Source

Service Name

aggregate_context

Instruction

List the names of source contexts to consolidate. Use space-separated names like: source_1 source_2 source_3. Do not use curly braces.

Description

Consolidates multiple source contexts into one. This is used to merge several sources into a unified context.

Context

No input context required

Service Name

create_context

Instruction

What is your question or instruction?

Description

Answers a question or performs an instruction

Context

User-Source

Service Name

parse_document

Instruction

Enter name of new document source

Description

Creates a source from document for further document-related processing

Context

User-Document

Service Name

ocr

Instruction

Enter name of new document source

Description

This is the fall-back step to documents that cannot be parsed using the 'parse_document' step because they are image-based PDFs or security-encrypted PDFs. Create Source from Document - a necessary step for handling Document-related workflows such as RAG or Summary. This service must be applied first, prior to using most User-Document related Services.

Context

User-Document

Service Name

rag_answer

Instruction

Ask question to longer document input

Description

Answers a question based on a longer document input

Context

User-Source, Provide_instruction_or_query

Service Name

report_commentary

Instruction

(Optional) Guidance to Commentary

Description

Generate report and commentary on key process results from the agent state in Word - no input context required

Context

-

Service Name

agent_report

Instruction

Enter title for agent report

Description

Prepares report on agent output

Context

-

Service Name

wikipedia_search

Instruction

Add Wikipedia Articles as Research Context

Description

Adds Wikipedia articles as research context

Context

None

Service Name

embedded_bot

Instruction

Optional. None required.

Description

Pauses the execution of the agent process to allow the user to interact with the current state of the agent in chat format.

Context

None

Service Name

condition

Instruction

Enter expression to evaluate in 'if_true' or 'if_false' format

Description

Evaluates the truth value of a condition, which can then be used as a variable in any other process step such that the step will only execute if it meets the selected condition

Context

None

Service Name

web_search

Instruction

Add query for a topic or a question

Description

Runs web searches returning a summary text as a source and an indexed set of text chunks - needs SERP API or Tavily API

Context

None

Service Name

speech_gen

Instruction

Enter a topic or short input to convert to speech file

Description

Using a short text input, generates an audio voice wav file based on the input text. (Experimental)

Context

None

Service Name

image_gen

Instruction

Enter a topic or description to convert to an image

Description

Creates an image using the description or instruction provided by the user

Context

None

Service Name

website_scraper

Instruction

Enter the full website URL

Description

Scrapes the website in question to extract content for a downstream question in the agent process (may not work for all websites due to scraping protection)

Context

None

Service Name

send_email

Instruction

Enter the email address of the receiver

Description

Automatically sends an email using Gmail (requires credentials provided in Configuration/Credentials)

Context

Select context of the email

Service Name

connect_library

Instruction

Enter library name

Description

Connects to Semantic Library from Model HQ API

Context

-

Service Name

query_library

Instruction

Enter query for semantic library

Description

Queries connected semantic library

Context

Enter_Library-name

Service Name

get_stock_summary

Instruction

Enter stock ticker

Description

Stock lookup using YFinance

Context

None

Service Name

vision

Instruction

Enter question to image file

Description

Provides answer/description from image

Context

User-Image

Service Name

vision_batch

Instruction

Enter question to batch of image files

Description

Takes a collection of user images as an input context, along with a text input of a question or instruction. Returns text output context with the answer based on the set of images.

Context

User-Document

Service Name

parse_batch

Instruction

Enter question to batch of documents files that have been parsed

Description

Takes a collection of document files as an input context, and will return a set of text chunks, indexed and packaged as a source, which can then be used as input to a number of other services

Context

User-Document

Service Name

sentiment

Instruction

No instruction required

Description

Analyzes sentiment (positive/negative/neutral)

Context

MAIN-INPUT, User-Text

Service Name

boolean

Instruction

Provide yes/no question

Description

Provides yes/no answer with explanation

Context

MAIN-INPUT, User-Text

Service Name

emotions

Instruction

No instruction required

Description

Analyzes primary emotion in input

Context

MAIN-INPUT, User-Text

Service Name

topics

Instruction

No instruction required

Description

Classifies topic of input

Context

MAIN-INPUT, User-Text

Service Name

tags

Instruction

No instruction required

Description

Generates tags from input

Context

MAIN-INPUT, User-Text

Service Name

intent

Instruction

No instruction required

Description

Classifies intent of input

Context

MAIN-INPUT, User-Text

Service Name

ratings

Instruction

No instruction required

Description

Rates positivity from 1 to 5

Context

MAIN-INPUT, User-Text

Service Name

ner

Instruction

No instruction required

Description

Identifies named entities (people, places, organizations)

Context

MAIN-INPUT, User-Text

Service Name

xsum

Instruction

No instruction required

Description

Generates extreme summary or headline

Context

MAIN-INPUT, User-Text

Service Name

summary

Instruction

Optional - add input instructions to focus the summarization

Description

Summarizes source content

Context

MAIN-INPUT, User-Text

Service Name

category

Instruction

No instruction required

Description

Analyzes category of the input passage

Context

MAIN-INPUT, User-Text

Service Name

q_gen

Instruction

No instruction required

Description

Generates question from passage

Context

MAIN-INPUT, User-Text

Service Name

chat

Instruction

What is your question or instruction?

Description

Answers a question or performs instruction

Context

MAIN-INPUT, User-Text, None

Service Name

extract

Instruction

Enter extraction key, e.g., 'customer name'

Description

Extracts key-value pair

Context

MAIN-INPUT, User-Text

Service Name

extract_tiny

Instruction

Enter extraction key, e.g., 'customer name'

Description

Extracts key-value pair (tiny version)

Context

MAIN-INPUT, User-Text

Service Name

answer

Instruction

What is your question?

Description

Answers specific question from passage

Context

MAIN-INPUT, User-Text

Service Name

extract_table

Instruction

Enter query to filter among available tables

Description

Extracts table from document

Context

User-Document

Service Name

END

Instruction

End of process

Description

Marks the end of agent process

Context

None

Service Name

openai_chat

Instruction

Enter input question or instruction

Description

Chat agent calls OpenAI (requires separate API key in Configuration/Credentials) with an optional text input context. The output provides a context passage that can be used by other services

Context

Main Input or other Text Source

Service Name

openai_rag

Instruction

Enter input question or instruction

Description

Calls OpenAI (requires separate API key in Configuration/Credentials) with a RAG question. The output provides a context passage that can be used by other services

Context

Main Input or other Text Source

Service Name

openai_rag_batch

Instruction

Enter input question or instruction

Description

Calls OpenAI (requires separate API key in Configuration/Credentials) with a batch of document sources and generates a response based on the input instruction/question. The output provides a context passage that can be used by other services

Context

Main Input or other Text Source

Service Name

anthropic_chat

Instruction

Enter input question or instruction

Description

Chat agent calls Anthropic (requires separate API key in Configuration/Credentials) with an optional text input context. The output provides a context passage that can be used by other services

Context

Main Input or other Text Source

Building and Querying a Custom Table

When you build a custom table, a database is created and stored in memory using the table name specified in the Instruction field.
If you later update or replace the table with new data, you must also change the table name in the Instruction field. This signals to the system that a new database should be created.
Otherwise, it will continue referencing the previous version of the table.

The Agent Builder also includes the following options:

  • Inputs: Configure or update the user inputs defined during initial setup.

Supported input types:

  • MAIN-INPUT — primary text input
  • User-Document — documents in various formats
  • User-Image — image files (e.g., PNG, JPG)
  • User-Table — structured data (CSV, JSON)
  • User-Source — multiple file sources
  • User-Text — short snippets
  • None — no user input required

Specify the input types required from users to initiate the agent. This is a critical step as it is VERY IMPORTANT to select all of the correct inputs that will be used in the Agent process. By default, MAIN-INPUT (text) is set.

  • MAIN-INPUT (text): refers to a piece of text that will be copied and pasted into the text field - the current limit is 5000 characters for this text field (approximately up to 2 pages of text).
  • User-Document: A larger document which must be PARSED first via the 'parse_document' service in the Agent 'Select Service' prior to being used in an agent workflow. Important: A User Document must almost always be processed first via the 'parse_document', which then breaks up the document text into smaller chunks, prior to being used for other Agent Services such as Rag_Answer, Semantic_Filter, Document_Filter or Create_Context.
  • User-Table: A user can upload a .CSV or JSON that the agent will attempt to interpret as a table with labelled columns and a consistent set of rows that it can label. Important: A User Table must first be processed via 'build-table' service prior to being used in an Agent process from the 'Select Service' dropdown. The Build Table service will attempt to extract relevant information and save the information in a local SQL database in Model HQ prior to using any table in an Agent process.

The agent process must:

  1. upload a table,
  2. 'Build_Table' from the Agent 'Select Service' dropdown (this service extracts all the information and attempts to build a database table from the information submitted), and
  3. 'Query_Custom_Table' (this service expects an input context that is a table inference from the 'Build_Table' service) which allows a user to ask a simple natural language question from the Table.
  • User-Image: A user can upload an image file such as .PNG or .JPEG for image processing in an agent workflow. Important: A User Image must first be processed via the 'vision' service prior to being used in an Agent Process from the 'Select Service' dropdown menu. The Vision service will take an image file along with a text input of a question or instruction, then returns a text output context with the answer based on the contents of the image.
  • User-Text: Designed to be a secondary piece of additional context that a user can provide in an Agent workflow.
  • User-Source: A User Source allows the user to upload an indefinite number of documents, images, etc. that can all be packaged as a source to be treated as one object. While most use cases have single or few inputs, this allows for more dynamic, flexible method of allowing for variable user input. If you select User Source, you do not need to go through the Parse_Document, Build_Table, or Vision services as these services will automatically be applied. Important: It is recommended to use 'Text_Filter'> 'Semantic_Filter' > 'Create_Context' first when being used in an agent process to surface the most relevant text chunks. As you get more advanced in Agent building, this order can change.

It is important to select only the user inputs you expect to use in the process. The user will be expected to designate all of the inputs selected to run the process.

Specify the input types required from users to initiate the agent. This is a critical step as it is VERY IMPORTANT to select all of the correct inputs that will be used in the Agent process. By default, MAIN-INPUT (text) is set. MAIN-INPUT (text) refers to a piece of text that will be copied and pasted into the text field - the current limit is 5000 characters for this text field (approximately up to 2 pages of text).

As the Agent process is being built, the + Inputs selection button gives the developer of an Agent process the ability to modify the Input list (select or deselect the input list) depending on the Agent process being created.

Once configured, click > to proceed.

  • Files: Upload files to be used in the agent workflow. Specify the file type as Document, Table, Image, or Source (a combination of different file types, usually large in size). You can also query a pre-built aggregated source for use in the workflow.
  • Load: Load a pre-built agent workflow to use or modify.

Using the Load button will replace any current process on the screen. Edits must begin from the loaded workflow.

  • Run: Navigate to the confirmation screen. Click > to proceed or select 'Home' to return to the previous page.
  • Reset (🗑️): Clears the screen and resets the configuration.
  • Home: Returns to the Main Menu.

Find the detailed description of every button in the Agent Builder Options section.

 

Run

Runs the existing Agent without making any changes.

 

Export

Custom agents can be exported for easy sharing with colleagues who have Model HQ installed.

edit

The Export section provides two options:

1. Build

Packages all configuration settings and source files into a .zip file.

📦 The zip contains no executable code; only documents and configuration files—so it can be easily shared and imported on another system.

edit

2. Meta

Allows you to add useful metadata like instructions for the user such as description of the agent process, instructions for usage (ex: which types of inputs the user is expected to provide that works with this agent process) and author information.

edit

You can add the following metadata:

  • Process Description: Displayed to help users understand the purpose of the agent.
  • Sample Input: Add a sample input or attach a file for testing and demonstration purposes.

 

Options

Opens a "Configure [Agent Process Name]" screen with the following configuration options:

edit

JSON Editor

Enables advanced users to modify the agent process directly in JSON. You can edit inline or upload a pre-configured JSON file.

edit

Files

Attach source files directly to the Agent. These files will be available in the Process Builder and included in exported packages.

edit

Reports

Configure the types of reports the agent can generate. This includes:

  • Report Types to Generate
  • Business Report Elements
  • Business Report Document Format
  • Technical Report Elements
  • Compliance Report Elements
edit

Outputs

Customize the output format of the agent process. By default, the agent returns a JSON dictionary with key takeaways. You can:

  • Modify the output keys
  • Switch to a text-only format
  • Use the standard option to ignore custom settings and include all default keys
edit

Global

Set global configuration options such as chat models and custom instructions.

edit

Controls

Configure controls like Model Hash Checks, Pattern Redaction, and Classifier Tests used during the agent process.

edit

Upload

Upload an agent .zip file to build a custom agent. Once uploaded, the agent will be installed and can be further edited.

edit

Home

Returns to the previous Agent Menu screen.

 

Conclusion

In this section, we covered how to edit agents using the multiple configuration options provided in Model HQ. From modifying workflows to customizing exports and adding global settings, Model HQ offers a complete interface to refine your agents with ease.

If you require further assistance or would like to provide feedback, please contact us at support@aibloks.com.