How do I configure the Plan and execute agent node?#
An agent is used to extend the functionality of a Large Language Model or Chat Model with the use of additional nodes such as triggers, retrievers, loaders and output parsers. Agent nodes are distinct from Chain nodes in that they automatically determine the correct attached node to use for a given user input.
The plan and execute agent plan what to do then execute sub-tasks to compete a task within a pathway
Before you begin#
- Learn about pathways
- Learn about pathway nodes
- Learn about agents
- Learn about Large Language Models
- Add a pathway
Step 1 - add the node#
- Click + to open the nodes panel
- Search for Agent in the node search field.
- Click Ai Agent to open the node editor
- Choose Plan and execute agent from the Agent field.
Step 2 - choose how to handle prompts#
Prompt | Description | Additional information |
---|---|---|
Take from previous node automatically | Looks for chatInput parameter supplied by the preceding node |
Execute previous nodes to load input data |
Define below | Define JSON parameters that will be sent to a child node such as a Model, Operator, Memory or Tool. These should be defined based on the outputs from a preceding node in the pathway | Execute previous nodes to load input data |
Step 3 - Add optional output parser#
- Toggle Require specific output format so you can add an Output Parser node to the agent once you've completed initial configuration.
Step 4 - Add optional message#
There are three ways to add parameters to Fixed or Expression fields in a given node:
Method | Description | Additional information |
---|---|---|
Load from previous nodes | Click Execute previous nodes in the Input panel to load parameters from connected and configured nodes | Not available for Triggers |
Add a fixed value | Click Fixed on available fields to enter plain-text or JSON values | Learn how to edit fixed responses |
Add a JSON expression | Click Expression on available fields to enter a JSON expression | Learn how to edit expressions |
Note
The Expression editor loads all possible parameters from connected nodes. These can then be added to fields as required
Add a plain-text message or expression for the user or the agent:
Optional | Description | Required |
---|---|---|
Human message | Add or edit text used by the connected model to interpret input from end users. | Required parameters |
Next step#
Link the Agent to child nodes: