Configuration
Complete property reference for the FlowAiAgent node — goal, context, tools, model selection, reasoning controls, and system prompt.
Configuration Properties
| Property | Type | Required | Description |
|---|---|---|---|
goal | string | Required | Natural language instruction describing what the agent must achieve. Supports BizFirst expressions such as {@ $var.customerQuery }. This is the primary directive given to the model each turn. |
context | string / object | Optional | Additional background data or structured context passed to the agent alongside the goal. Use this to provide record data, prior conversation history, or environmental facts that are not available via tools. Accepts BizFirst expressions. |
available_tools | array of strings | Optional | List of tool names the agent is allowed to invoke. Each name must match a tool registered in the BizFirst Tool Registry for this workflow. Example: ["lookupAccount", "sendEmail", "queryKnowledgeBase"]. If omitted the agent reasons and responds without calling tools. |
model | string | Optional | Model identifier. Default: claude-sonnet-4. Options: claude-opus-4, claude-sonnet-4, claude-haiku-3-5, gpt-4o, gpt-4o-mini. See the model selection guidance below. |
max_turns | integer | Optional | Maximum number of reasoning-and-tool-call turns before the node exits via the error port. Default: 10. Range: 1–50. For simple tasks use 3–5; for complex multi-API tasks use 10–20. |
temperature | float | Optional | Controls output randomness. Range: 0.0 (fully deterministic) to 1.0 (creative). Default: 0.2. For data extraction and routing use 0.0–0.2. For report writing or summarisation use 0.3–0.7. |
system_prompt | string | Optional | Additional system-level instructions prepended before the goal. Use to set persona, enforce output format (e.g. "Always respond in JSON"), apply domain constraints, or define tool use policies. Supports BizFirst expressions. |
credential_id | string | Required | ID of the AI provider credential stored in BizFirst Credentials Manager. Required for Anthropic (Claude) or OpenAI API access. |
Model Selection Guide
| Model | Speed | Capability | Cost | Best For |
|---|---|---|---|---|
claude-opus-4 | Slower | Highest | Highest | Complex legal/financial reasoning, long tool chains (8+ tools), high-stakes decisions |
claude-sonnet-4 | Balanced | High | Medium | Most business workflows — good balance of reasoning and speed |
claude-haiku-3-5 | Fastest | Good | Low | High-volume routing, classification, simple lookups |
gpt-4o | Balanced | High | Medium | OpenAI-ecosystem workflows, vision/image tasks |
gpt-4o-mini | Fast | Good | Low | Cost-sensitive OpenAI-based agents |
Temperature Reference
| Value | Behaviour | Use Case |
|---|---|---|
0.0 | Deterministic — always the same output | Data extraction, classification, routing |
0.2 | Near-deterministic with slight variation | Structured data tasks, API calls, field mapping |
0.5 | Balanced | Summarisation, email drafting, report writing |
0.8–1.0 | Creative, high variation | Brainstorming, marketing copy (rarely appropriate for agents) |
Example Configuration JSON
{
"goal": "Resolve this customer support query: {@ $var.customerMessage }",
"context": {
"customer_id": "{@ $var.customerId }",
"account_tier": "{@ $var.accountTier }",
"prior_tickets": "{@ $var.priorTickets }"
},
"available_tools": [
"lookupAccount",
"checkOrderStatus",
"searchKnowledgeBase",
"sendEmail"
],
"model": "claude-sonnet-4",
"max_turns": 8,
"temperature": 0.2,
"system_prompt": "You are a BizFirst support agent. Always verify the customer account before performing any action. Respond in a professional, empathetic tone. When you have resolved the query, summarise your actions in JSON format.",
"credential_id": "anthropic-prod"
}
system_prompt Best Practices
- Use the system_prompt to enforce output format — e.g., "Respond only with valid JSON matching this schema: …"
- Define tool use policies — e.g., "Always look up the account before calling sendEmail"
- Set a persona and tone for customer-facing agents
- Add domain constraints — e.g., "You are processing EU payroll data. Never include PII in tool call metadata"
- Inject fallback instructions — e.g., "If you cannot resolve the query within 5 turns, escalate by calling the escalate tool"
Tool registration: Tools listed in
available_tools must be defined in the BizFirst Tool Registry for the current workspace. Each tool definition includes a name, description, input schema, and the underlying HTTP or workflow action to execute. The agent receives the tool descriptions automatically — you do not need to describe tools inside the system_prompt.
max_turns safety: Setting
max_turns too high on a misconfigured tool (e.g., a tool that always returns an error) can cause the agent to loop for a long time, consuming significant tokens. Always test with a low max_turns value first and monitor the turns_used output during development. In production, set up a workflow alert if turns_used equals max_turns consistently.
context Field — Detailed Guidance
The context field is separate from the goal and serves as background data the agent receives at the start of each invocation. Use it to provide:
- Structured record data — the customer record, order details, or incident that the goal refers to, so the agent does not need to call a tool just to fetch basic context
- Prior conversation history — if continuing a multi-turn human conversation, pass the prior messages as context
- Environmental constraints — current date, time zone, active promotions, or feature flags that the agent may need to reason about
- Partial data — results from earlier workflow steps that are too large to embed in the goal string
The context is injected as structured data before the goal in the agent's system context. Keep context focused — only include what the agent actually needs. Excessive context increases token consumption across all turns.
Full Configuration Example — Data Enrichment Agent
{
"goal": "Enrich this lead record with company intelligence and LinkedIn data: {@ $var.leadRecord }",
"context": {
"workspace": "{@ $var.workspaceId }",
"owner": "{@ $var.salesOwner }",
"crm_source": "Salesforce"
},
"available_tools": [
"lookupLinkedIn",
"lookupCompanyIntelligence",
"queryCRM",
"updateCRMRecord"
],
"model": "claude-sonnet-4",
"max_turns": 6,
"temperature": 0.1,
"system_prompt": "You are a sales intelligence agent. Gather available data on the lead's company and LinkedIn profile. If a source returns no data, mark that field as 'not_found'. Your final output must be valid JSON with fields: company_size (string), industry (string), linkedin_title (string), linkedin_company (string), crm_interactions (integer), enrichment_confidence (0-100 integer).",
"credential_id": "anthropic-prod"
}
Combining goal and context — Best Practices
| Scenario | goal | context |
|---|---|---|
| Customer support | "Resolve: {@ $var.message }" | Customer record, prior tickets, account tier |
| Lead enrichment | "Enrich this lead: {@ $var.lead }" | CRM source, workspace ID, sales owner |
| Intelligent routing | "Classify and route: {@ $var.request }" | Business hours, team capacity, SLA tiers |
| Report generation | "Generate weekly summary for week ending {@ $var.date }" | Recipients, regions, currency, prior week benchmark |
Choosing between goal and system_prompt: Put the task description and specific input data in
goal. Put persistent instructions about how to behave, format output, and use tools in system_prompt. The goal changes per invocation (driven by workflow data). The system_prompt is typically fixed per workflow node.