TalksAWS re:Invent 2025 - Function calling vs agents: Choose the right AI approach (DEV204)

AWS re:Invent 2025 - Function calling vs agents: Choose the right AI approach (DEV204)

Summary of AWS re:Invent 2025 - Function calling vs agents: Choose the right AI approach (DEV204)

Introduction

  • The presentation discusses the design choices companies face when integrating generative AI into real-world systems.
  • Two main approaches are explored: function calling within large language models (LLMs) and deploying autonomous AI agents.
  • Each approach offers different benefits and trade-offs in terms of complexity, performance, safety, and business value.

Function Calling

  • Function calling allows developers to define APIs and functions that an LLM can invoke to access external data, perform calculations, or interact with code.
  • This provides more reliable and deterministic outputs compared to unconstrained text generation, making AI safer to integrate into business workflows.
  • Example use case: A banking assistant can retrieve a customer's exact account balance by calling a backend function, rather than guessing the answer.
  • Function calling is efficient for simple, known interactions, but becomes more complex as the number of interdependent functions and dynamic requirements scale.

AI Agents

  • Agents are autonomous AI processes that can reason about how to solve a problem, decompose tasks into multiple steps, and dynamically choose which tools or functions to use.
  • Agents are more adaptable than function calling, as they can plan multiple steps ahead, analyze intermediate results, and adjust their actions accordingly.
  • This allows agents to actively drive problem-solving, rather than just passively responding.
  • Example use case: A travel planning agent can autonomously retrieve weather forecasts, check flight and hotel availability, and suggest activities based on the user's needs and the context.

Multi-Agent Systems

  • For more complex problems that span multiple domains, a single agent may not be enough, and a multi-agent system can be more effective.
  • In a multi-agent system, specialized agents focus on particular areas, with their own expertise, tools, and instructions, and a coordinator agent orchestrates their collaboration.
  • Two common multi-agent architectures are the hierarchical (supervisor-worker) pattern and the network (swarm) pattern, each with their own trade-offs.

Challenges and Considerations

  • Key challenges with multi-agent systems include orchestration complexity, latency and costs, debugging, and security/safety concerns.
  • When choosing between function calling, single agents, and multi-agent systems, the main factors to consider are:
    • Task complexity: Simple tasks may only require function calling, while more complex, multi-step problems may benefit from agents or multi-agent systems.
    • Predictability vs. adaptability: Function calling offers more predictable behavior, while agents and multi-agent systems allow for more adaptability and emergent problem-solving.
    • Cost and latency: Function calling is generally faster and cheaper, while agents and multi-agent systems can be more resource-intensive.
    • Control over business logic: Function calling keeps the logic fully under the developer's control, while agents and multi-agent systems delegate more decision-making to the AI.
    • Autonomy: Function calling is reactive, agents are proactive, and multi-agent systems enable collaborative, autonomous problem-solving.

Real-World Use Cases

  • Function calling: FAQ bots, currency conversion, order status lookups
  • Single agents: Travel planning, personal research assistants, content summarization
  • Multi-agent systems: Complex contract generation, enterprise-wide troubleshooting, legal due diligence

Key Takeaways

  1. Start simple with function calling for deterministic, straightforward tasks.
  2. Use single agents for multi-step tasks that require adaptive reasoning.
  3. Employ multi-agent systems for complex problems involving multiple domains and specialized collaboration.
  4. Always plan for observability, monitoring, and governance when deploying AI-powered systems.
  5. Leverage AWS services like Amazon Bedrock, Lambda, Sagemaker, and Step Functions to build end-to-end AI solutions.

Your Digital Journey deserves a great story.

Build one with us.

Cookies Icon

These cookies are used to collect information about how you interact with this website and allow us to remember you. We use this information to improve and customize your browsing experience, as well as for analytics.

If you decline, your information won’t be tracked when you visit this website. A single cookie will be used in your browser to remember your preference.