The AI Agent block

AI Request block

The AI Agent block generates content, runs flow modules, and makes logical decisions based on prompts and data it receives. You can give the AI Agent block context with special variables called labels, and it can use flow modules as tools. The AI Agent block interprets context from labels and tools to complete tasks intelligently. For example, you could select a tool that gets the weather for one city, then prompt the AI Agent block to get the weather for three cities. The block will automatically run the selected tool three times to get three results.

Input

Context - Labeled inputs that are always available to the agent and can be referenced in the prompt in plain text. The AI Agent block interprets context about the variable’s value from the variable’s label. For example, a label of "city", with an assigned city name, provides more context than a "variable-1" label. Click Add icon Add data blocks to add more inputs. Inputs can assign values with any of the following data blocks:

Outputs

Result - Sends the result of the AI Agent block's task.

Setup

Model - Select an AI model. Different models consume different amounts of credits. See Manage your team's Postman Flows credit usage for details about how the AI Agent block consumes credits.

Prompt - The system prompt for the AI. Enter a prompt in plain language that describes what you want your agent to do, for example, "Say hello in three languages." You can reference labels' values in the prompt by including the label's name as plain text. If you added tools to the block, the AI Agent block will automatically use them to follow the prompt.

Tools - Tools are flow modules your AI Agent block can run automatically when it needs to. The AI Agent block will try to generate any input data it needs from its own knowledge or from context you've provided. To use a flow module as a tool, the flow module must have at least one snapshot.

The AI Agent block interprets context from a module's name and the names of any inputs and outputs in the module. For example, if a module has inputs named "latitude" and "longitude", the AI Agent block will understand what the input values are.

To add a tool, click Add a tool then click one from the dropdown list.

Additional Settings - Appears when you select the block, and enables you to select an AI model or enforce an output schema that you can parse later in the flow.

To enforce an output schema, do the following:

  1. Select the AI Agent block, then select Setting icon Additional Settings.

  2. Select JSON icon Enforce output schema > JSON icon Schema.

  3. Select Generate from example and paste valid JSON data into the text box, then select Generate schema. Alternatively, select Define custom schema to manually enter a JSON schema.

Last modified: 2025/06/02