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.
Block Preview
Function Calling Agent
Agent with function calling capabilities
Usage
- Add the block to your workflow and connect it to the upstream step.
- Configure any required credentials or tokens in the inputs.
- Fill in required inputs and optional parameters for the run.
- Run a test execution, inspect outputs, and iterate before deploying.
- Deploy the function_calling_agent block with monitoring enabled in production.
Inputs (UI)
System Prompt
long-inputPlaceholder: Enter system prompt for the function calling agent...
Layout: full
User Input
long-inputPlaceholder: Enter the user query or task...
Layout: full
Model
dropdownLayout: half
Options: Dynamic options
Temperature
sliderLayout: 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
sliderLayout: 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-inputPlaceholder: 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
codePlaceholder: [ { "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
codePlaceholder: // 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-inputPlaceholder: 5
Layout: half
Parallel Execution
switchLayout: half
Enable Memory
switchLayout: half
Memory Limit
sliderLayout: half
Condition: memoryEnabled = true
Importance Threshold
sliderLayout: half
Condition: memoryEnabled = true
Memory Tags
short-inputPlaceholder: customer-support, billing, technical
Layout: half
Condition: memoryEnabled = true
Inputs (API)
systemPrompt
stringOptional
userInput
stringRequired
model
stringRequired
apiKey
stringRequired
functions
jsonRequired
functionImplementations
stringRequired
maxFunctionCalls
numberOptional
parallelExecution
booleanOptional
temperature
numberOptional
memoryEnabled
booleanOptional
memoryLimit
numberOptional
memoryImportance
numberOptional
memoryTags
stringOptional
Outputs
Primary response type:
{
"content": "string",
"model": "string",
"functionCalls": "json",
"tokens": "json"
}