What is function calling in AI Agents? A Guide for CTOs in wealth management
Function calling is the mechanism that lets an AI agent choose and invoke a specific software function, API, or tool instead of only returning text. In practice, it is how you connect a language model to real systems so it can fetch data, execute workflows, and return structured results.
How It Works
Think of an AI agent as a private banker who can talk well but cannot touch the portfolio system directly. Function calling gives that banker a controlled set of actions: look up client holdings, calculate risk exposure, book a meeting, or raise an alert.
The flow is straightforward:
- •A user asks something like, “What’s the current exposure in equities for this discretionary portfolio?”
- •The model interprets the request and decides whether it needs a tool.
- •Instead of guessing, it emits a structured function call such as
get_portfolio_exposure(client_id). - •Your application receives that call, executes the real backend function, and returns the result.
- •The model uses that result to produce the final response in plain English.
For a CTO, the important point is this: the model does not magically gain system access. You define the allowed functions, their input schema, and your application decides whether to execute them. That makes function calling closer to a controlled integration layer than free-form automation.
A useful analogy is a wealth advisor working with an operations desk. The advisor can ask for statements, trade confirmations, or suitability checks, but they do not manually enter every system. They request actions through a defined process. Function calling is that process for AI agents.
Technically, this matters because the output is structured. Instead of vague prose like “I think client A has high concentration risk,” you get something like:
{
"function": "calculate_concentration_risk",
"arguments": {
"portfolio_id": "PF-10291",
"threshold": 0.2
}
}
That structure is what makes AI agents usable in regulated environments. You can log it, validate it, authorize it, audit it, and reject it before anything touches production data.
Why It Matters
- •
It turns chat into workflow execution
Without function calling, the model can only explain things. With it, the agent can retrieve market data, run suitability checks, trigger CRM updates, or open an ops ticket.
- •
It reduces hallucination risk
In wealth management, “best effort” answers are not enough. Function calling forces the model to query source systems instead of inventing balances, allocations, or policy details.
- •
It improves control and auditability
Every tool invocation can be logged with inputs, outputs, timestamps, and user context. That matters for compliance reviews and internal model governance.
- •
It supports separation of concerns
The model handles language understanding and orchestration. Your backend services handle business logic. That keeps sensitive rules out of prompts and makes systems easier to maintain.
Real Example
Suppose a relationship manager asks an internal AI agent:
“Show me whether client Jane Doe can increase her equity allocation by 10% without breaching her IPS.”
A good agent should not answer from memory. It should call tools in sequence:
- •Fetch Jane Doe’s portfolio
- •Retrieve her investment policy statement
- •Run concentration and suitability checks
- •Return a recommendation with supporting facts
A simplified implementation might look like this:
def get_portfolio(client_id: str) -> dict:
# Pull from portfolio management system
...
def get_ips(client_id: str) -> dict:
# Pull from document store / policy engine
...
def check_suitability(portfolio: dict, ips: dict, proposed_change: dict) -> dict:
# Apply house rules and regulatory constraints
...
# Agent decides which function to call based on user intent
tool_call = {
"function": "check_suitability",
"arguments": {
"portfolio": {"client_id": "JANE-001"},
"ips": {"client_id": "JANE-001"},
"proposed_change": {"equity_delta_pct": 10}
}
}
In production you would not pass raw nested objects like that without validation. You would resolve identifiers server-side, enforce authorization per tool call, and restrict which fields the model can request.
The output might be:
- •Current equity allocation: 54%
- •IPS maximum equity allocation: 60%
- •Proposed post-change allocation: 64%
- •Result: Not permitted
- •Reason: Breaches IPS limit by 4 percentage points
That is where function calling earns its keep. The agent becomes useful in front-office workflows because it can orchestrate real checks against real systems while staying inside guardrails.
Related Concepts
- •
Tool use
Broader term for letting models interact with external systems. Function calling is one implementation pattern under this umbrella.
- •
Structured outputs
Useful when you want strict JSON responses for downstream automation without free-form text parsing.
- •
Agent orchestration
The logic that decides which tools to call, in what order, and when to stop.
- •
RAG (Retrieval-Augmented Generation)
Retrieves documents or knowledge before answering. Different from function calling because retrieval is usually read-only; function calls can execute actions.
- •
Policy engines
Best paired with function calling in regulated firms. They enforce eligibility rules, approval thresholds, and entitlement checks before execution.
For wealth management CTOs, the practical takeaway is simple: function calling is how you move from “AI as a conversational layer” to “AI as an operational layer.” It gives you a controlled interface between language models and core systems without handing the model direct authority over your stack.
Keep learning
- •The complete AI Agents Roadmap — my full 8-step breakdown
- •Free: The AI Agent Starter Kit — PDF checklist + starter code
- •Work with me — I build AI for banks and insurance companies
By Cyprian Aarons, AI Consultant at Topiax.
Want the complete 8-step roadmap?
Grab the free AI Agent Starter Kit — architecture templates, compliance checklists, and a 7-email deep-dive course.
Get the Starter Kit