Portal Community

Example 1 — Customer Support Agent

Autonomously resolve inbound customer support queries using account lookup, order status check, knowledge base search, and email tools.

Scenario

A customer sends a message via the support portal. A webhook triggers a BizFirst workflow. The FlowAiAgent node receives the message and the customer ID, then autonomously investigates the account, checks related orders, searches the knowledge base for resolution policies, and sends a resolution email — all without any hard-coded branching.

Configuration

{
  "goal": "Resolve this customer support query professionally: {@ $var.customerMessage }",
  "context": {
    "customer_id": "{@ $var.customerId }",
    "account_tier": "{@ $var.accountTier }",
    "channel": "support_portal"
  },
  "available_tools": [
    "lookupAccount",
    "checkOrderStatus",
    "searchKnowledgeBase",
    "sendEmail",
    "createSupportTicket"
  ],
  "model": "claude-sonnet-4",
  "max_turns": 8,
  "temperature": 0.2,
  "system_prompt": "You are a professional customer support agent for BizFirstGO. Always verify the customer account before taking action. If the query cannot be resolved with available tools, create a support ticket and notify the customer. Your final response must be a JSON object with fields: resolution_summary (string), action_taken (string), escalated (boolean).",
  "credential_id": "anthropic-prod"
}

Expected Agent Behaviour

Downstream Expression

// Check if escalation was required
{@ $node.supportAgent.result.escalated }

// Get the resolution summary for logging
{@ $node.supportAgent.result.resolution_summary }

Example 2 — Lead Data Enrichment Agent

Enrich a sales lead with company data, LinkedIn profile info, and CRM history before updating the record.

Scenario

When a new lead is submitted via a form, the agent enriches the record by pulling data from LinkedIn, a company intelligence API, and the internal CRM. It then synthesises all data into a structured enrichment object and updates the CRM record.

Configuration

{
  "goal": "Enrich this sales lead with company intelligence, LinkedIn profile data, and CRM history. Lead details: {@ $var.leadRecord }",
  "context": {
    "workspace_id": "{@ $var.workspaceId }",
    "sales_owner": "{@ $var.salesOwner }"
  },
  "available_tools": [
    "searchLinkedIn",
    "lookupCompanyIntelligence",
    "queryCRM",
    "updateCRMRecord"
  ],
  "model": "claude-sonnet-4",
  "max_turns": 6,
  "temperature": 0.1,
  "system_prompt": "You are a sales intelligence agent. Gather all available data and produce a structured enrichment. If any data source returns no result, note that field as 'not_found'. Your final response must be valid JSON with fields: company_size, industry, linkedin_title, linkedin_company, crm_prior_interactions, enrichment_confidence (0-100).",
  "credential_id": "anthropic-prod"
}

Typical Tool Call Sequence

TurnTool CalledPurpose
1searchLinkedInFind person profile by name and company
2lookupCompanyIntelligenceGet company size, funding, industry
3queryCRMFind prior interactions with this domain
4updateCRMRecordWrite enrichment data back to the lead record

Example 3 — Intelligent Request Routing Agent

Classify an incoming business request and route it to the correct queue or workflow based on content, urgency, and department.

Scenario

Inbound requests arrive via email or form. The agent classifies the request type, determines the appropriate department and priority, and routes it to the correct queue — replacing a rigid keyword-matching rule set with flexible AI reasoning.

Configuration

{
  "goal": "Classify this incoming request and route it to the correct internal queue: {@ $var.requestText }",
  "context": {
    "sender_email": "{@ $var.senderEmail }",
    "received_at": "{@ $var.timestamp }",
    "channel": "{@ $var.channel }"
  },
  "available_tools": [
    "classifyIntent",
    "lookupSenderProfile",
    "checkQueueCapacity",
    "routeToQueue",
    "sendAcknowledgement"
  ],
  "model": "claude-haiku-3-5",
  "max_turns": 5,
  "temperature": 0.0,
  "system_prompt": "You are a triage agent. Classify requests into one of: billing, technical_support, sales_inquiry, hr_query, compliance. Set priority as: urgent, high, normal, or low based on keywords and sender history. Always send an acknowledgement after routing. Output JSON: {\"category\": \"...\", \"priority\": \"...\", \"queue_id\": \"...\", \"acknowledgement_sent\": true/false}.",
  "credential_id": "anthropic-prod"
}
Model selection tip: This example uses claude-haiku-3-5 because the routing logic is well-defined, the context is short, and high throughput is needed. For borderline classification cases requiring nuanced judgment, upgrade to claude-sonnet-4.

Example 4 — Automated Report Generation Agent

Collect sales, operations, and finance data from multiple APIs and produce a formatted weekly summary report.

Scenario

Every Monday morning a scheduled trigger fires. The FlowAiAgent node collects KPI data from multiple internal APIs, performs trend analysis, and produces a formatted markdown report that is then stored to S3 and emailed to the management team.

Configuration

{
  "goal": "Generate the weekly management summary report for the week ending {@ $var.weekEndDate }. Collect all required KPIs, identify trends, and write a concise executive summary followed by department sections.",
  "context": {
    "report_recipients": "{@ $var.recipients }",
    "regions": ["APAC", "EMEA", "Americas"],
    "currency": "USD"
  },
  "available_tools": [
    "querySalesDB",
    "queryFinanceAPI",
    "queryOperationsAPI",
    "calculateTrend",
    "writeReportToS3",
    "sendEmailWithAttachment"
  ],
  "model": "claude-opus-4",
  "max_turns": 15,
  "temperature": 0.4,
  "system_prompt": "You are an executive business analyst. Produce a professional weekly report in markdown format. Structure: 1) Executive Summary (3-5 bullet points), 2) Sales Performance by region, 3) Operations KPIs, 4) Financial Summary, 5) Key Actions Required. Use tables where appropriate. After writing the report, save it and send it.",
  "credential_id": "anthropic-prod"
}

Why claude-opus-4 Here?

Report generation requires synthesising large amounts of numeric data, identifying multi-period trends, and producing well-structured prose in a single coherent document. Opus-4's extended reasoning and writing capability produces significantly higher-quality reports than Sonnet or Haiku for this task, and the higher token cost is justified by the strategic value of the output.

Downstream Workflow Steps

// Get the S3 URL of the stored report from the tool_calls output
{@ $node.reportAgent.tool_calls | filter(x => x.tool_name == "writeReportToS3") | first | .output.s3_url }
Long-running agents: Report generation agents with 15 max turns and Opus-4 can take 30–90 seconds. Ensure your workflow trigger has an appropriate timeout. For scheduled reports, use a ScheduledTrigger node with asynchronous execution so the scheduler does not time out waiting for the agent.