Blocks

Function Calling Agent

Agent with function calling capabilities

Create an agent that can call custom functions, process their results, and use them to generate comprehensive responses.

Back to Catalog
Agentsfunction_calling_agent

Block Preview

Function Calling Agent

Agent with function calling capabilities

Usage

  1. Add the block to your workflow and connect it to the upstream step.
  2. Configure any required credentials or tokens in the inputs.
  3. Fill in required inputs and optional parameters for the run.
  4. Run a test execution, inspect outputs, and iterate before deploying.
  5. Deploy the function_calling_agent block with monitoring enabled in production.

Inputs (UI)

System Prompt

long-input

Placeholder: Enter system prompt for the function calling agent...

Layout: full

User Input

long-input

Placeholder: Enter the user query or task...

Layout: full

Model

dropdown

Layout: half

Options: Dynamic options

Temperature

slider

Layout: half

Condition: model = ["gpt-4o","gpt-4o-mini","gpt-4-turbo","gpt-4","gpt-3.5-turbo","o3-mini","gpt-5-mini","gpt-5","o1-mini","o1-preview","gemini-2.5-pro-preview-05-06","gemini-2.5-flash-preview-05-20","gemini-2.0-flash","gemini-2.0-flash-lite","deepseek-chat","deepseek-reasoner","llama-4-scout-17b-16e-instruct","llama-4-maverick-17b-128e-instruct","llama-3.3-70b-versatile","qwen-qwq-32b","deepseek-r1-distill-llama-70b"]

Temperature

slider

Layout: half

Condition: model = ["claude-opus-4-5-20251022","claude-sonnet-4-20250514","claude-opus-4-20250514","claude-haiku-4-5-20251001","claude-3-7-sonnet-20250219","grok-3-latest","grok-3-fast-latest"]

API Key

short-input

Placeholder: Enter your API key

Layout: full

Condition: model = ["qwen2.5:0.5b","qwen2.5:1.5b","qwen2.5:3b","llama3.2:1b","llama3.2:3b","phi3.5:3.8b"]

Functions

code

Placeholder: [ { "name": "get_weather", "description": "Get the current weather for a location", "parameters": { "type": "object", "properties": { "location": { "type": "string", "description": "The city and state, e.g. San Francisco, CA" }, "unit": { "type": "string", "enum": ["celsius", "fahrenheit"], "description": "The unit of temperature" } }, "required": ["location"] } }, { "name": "calculate_mortgage", "description": "Calculate monthly mortgage payment", "parameters": { "type": "object", "properties": { "principal": { "type": "number", "description": "The loan amount" }, "interest_rate": { "type": "number", "description": "Annual interest rate (percentage)" }, "term_years": { "type": "number", "description": "Loan term in years" } }, "required": ["principal", "interest_rate", "term_years"] } } ]

Layout: full

Function Implementations

code

Placeholder: // Define your function implementations here // These will be executed when the agent calls the functions async function get_weather(args) { const { location, unit = "celsius" } = args; // In a real implementation, you would call a weather API return { location, temperature: 22.5, unit, condition: "Sunny", humidity: 65 }; } async function calculate_mortgage(args) { const { principal, interest_rate, term_years } = args; const monthlyRate = interest_rate / 100 / 12; const payments = term_years * 12; const x = Math.pow(1 + monthlyRate, payments); const monthly = (principal * x * monthlyRate) / (x - 1); return { monthly_payment: monthly.toFixed(2), total_payment: (monthly * payments).toFixed(2), total_interest: ((monthly * payments) - principal).toFixed(2) }; }

Layout: full

Max Function Calls

short-input

Placeholder: 5

Layout: half

Parallel Execution

switch

Layout: half

Enable Memory

switch

Layout: half

Memory Limit

slider

Layout: half

Condition: memoryEnabled = true

Importance Threshold

slider

Layout: half

Condition: memoryEnabled = true

Memory Tags

short-input

Placeholder: customer-support, billing, technical

Layout: half

Condition: memoryEnabled = true

Inputs (API)

systemPrompt

string

Optional

userInput

string

Required

model

string

Required

apiKey

string

Required

functions

json

Required

functionImplementations

string

Required

maxFunctionCalls

number

Optional

parallelExecution

boolean

Optional

temperature

number

Optional

memoryEnabled

boolean

Optional

memoryLimit

number

Optional

memoryImportance

number

Optional

memoryTags

string

Optional

Outputs

Primary response type:

{
  "content": "string",
  "model": "string",
  "functionCalls": "json",
  "tokens": "json"
}

Tool Access

function_executemath_processorjson_processortext_processorhttp_request
Function Calling Agent | NowFlow Blocks