Navigation
Mobile DocsNavigation
Mobile DocsAgent with function calling capabilities
Create an agent that can call custom functions, process their results, and use them to generate comprehensive responses.
Layout: full
Placeholder: Enter system prompt for the function calling agent...
Layout: full
Condition: agentProfileId = ""
Placeholder: Enter the user query or task...
Layout: full
Layout: full
Options: Dynamic options
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
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
Placeholder: 5
Layout: half
Layout: half
Layout: half
Layout: half
Condition: memoryEnabled = true
Layout: half
Condition: memoryEnabled = true
Placeholder: customer-support, billing, technical
Layout: half
Condition: memoryEnabled = true
Optional
Optional
Required
Required
Optional
Required
Required
Optional
Optional
Optional
Optional
Optional
Optional
Optional
Primary response type:
{
"content": "string",
"model": "string",
"functionCalls": "json",
"tokens": "json"
}