How to Configure Agent Variables in FastLinePro?
Agent variables are parameters that can be passed to the AI agent through an Action in the scenario. After passing, they become available in prompts (instructions) in the format {{variable_name}}.
When Needed
- You need to pass additional information to the agent (user name, dialogue context).
- You need to personalize agent responses based on user data.
- You need to pass dynamic data from the scenario to the agent.
What's Important to Know
- Variables — parameters passed to the AI agent through an Action.
- Variables are available in prompts in the format
{{variable_name}}. - If you create a variable, be sure to pass it in the block parameters in the scenario.
- Without passing in the scenario, the variable will not be available in instructions.
Prerequisites
You are logged in with integrator or administrator rights. You have navigated to the FastLinePromodule viaApps -> FastLinePro.You have a created AI agent or are creating a new one.
Step-by-Step Instructions
Creating Variables in Agent Interface
- In the
FastLinePromodule, go to the "Agents" or "Chatbots" section. - Select an agent for editing or create a new one.
- Find the "Variables" section in agent settings.
- Click the "Add Variable" button.
- Enter the variable name (for example,
first_name,user_id,order_number):- Name must be in Latin
- You can use underscores
- Name must be unique for the agent
- Add a variable description (optional) for better understanding of its purpose.
- Save the variable.
Using Variables in Prompt
- In the agent's "Instructions" (Prompt) section, use variables in the format
{{variable_name}}.
Example prompt with variables:
You are a customer support assistant.
User: {{first_name}}
User ID: {{user_id}}
Answer user questions, addressing them by name {{first_name}}.
Passing Variables in Scenario
- In the scenario constructor, add an "Action" block with the
action_fastline_profunction. - In action parameters, find the "inputs" field (or similar).
- Specify variables in JSON format:
{
"agent_name": "support_agent",
"user_input": "{{question}}",
"inputs": {
"first_name": "Bohdan",
"user_id": "12345"
}
}
⚠️ Important: If you create a variable in the agent interface, be sure to pass it in the block parameters in the scenario. Without this, the variable will not be available in instructions, and the AI agent will not be able to use it during response generation.
What Happens After
After configuring variables and passing them in the scenario, variables become available in the agent's prompt. The AI agent will be able to use these variables to personalize responses and access additional information.
How to Verify It Worked
- Check that variables are created in the agent interface.
- Make sure variables are used in the prompt in the format
{{variable_name}}. - Check that variables are passed in the
action_fastline_proaction parameters in the scenario. - Test the agent to make sure variables work correctly.