[GH-ISSUE #2287] [QUESTION] Clarification on function calling implementation with Agents #1493

Closed
opened 2026-02-22 18:25:05 -05:00 by yindo · 2 comments
Owner

Originally created by @dusan-t on GitHub (Sep 14, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2287

Hi,
I would like to clarify how function calling is implemented within agents.
Specifically, I am interested in understanding whether agents leverage the native function calling parameters specific to each LLM, or if it relies on the LLM's general intelligence to determine when a tool should be called.

To elaborate, each LLM that supports function calling has its own function calling format within its API. My concern is whether agents adhere to these specific function calling parameters when making API calls, or if it sends function calling instructions to the LLM as part of a regular chat interaction.

Thanks.

Originally created by @dusan-t on GitHub (Sep 14, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2287 Hi, I would like to clarify how function calling is implemented within agents. Specifically, I am interested in understanding whether agents leverage the native function calling parameters specific to each LLM, or if it relies on the LLM's general intelligence to determine when a tool should be called. To elaborate, each LLM that supports function calling has its own function calling format within its API. My concern is whether agents adhere to these specific function calling parameters when making API calls, or if it sends function calling instructions to the LLM as part of a regular chat interaction. Thanks.
yindo closed this issue 2026-02-22 18:25:05 -05:00
Author
Owner

@dusan-t commented on GitHub (Sep 14, 2024):

I've looked at the code, and it seems that the JS code from the agent's plugin/tool is mapped and translated to match each LLM provider's function calling syntax.

@dusan-t commented on GitHub (Sep 14, 2024): I've looked at the code, and it seems that the JS code from the agent's plugin/tool is mapped and translated to match each LLM provider's function calling syntax.
Author
Owner

@timothycarambat commented on GitHub (Sep 14, 2024):

OpenAI & Anthropic has specific formatting for tool calls, everything else uses Untooled, not you may be thinking - Ollama supports tool calls, so does Groq, why not just use that.

  • Through testing, we get more consistent tool responses via this method, which is also 100% provider agnostic and can easily be placed on any provider with zero lift instead of defining and reworking each provider to be agent capable. Groq's built in tool calling, for example, is quite bad. Untooled give groq much better coherence and tool calling
@timothycarambat commented on GitHub (Sep 14, 2024): OpenAI & Anthropic has specific formatting for tool calls, everything else uses [Untooled](https://github.com/Mintplex-Labs/anything-llm/blob/master/server/utils/agents/aibitat/providers/helpers/untooled.js), not you may be thinking - Ollama supports tool calls, so does Groq, why not just use that. - Through testing, we get _more consistent_ tool responses via this method, which is also 100% provider agnostic and can easily be placed on any provider with zero lift instead of defining and reworking each provider to be agent capable. Groq's built in tool calling, for example, is quite bad. Untooled give groq much better coherence and tool calling
yindo changed title from [QUESTION] Clarification on function calling implementation with Agents to [GH-ISSUE #2287] [QUESTION] Clarification on function calling implementation with Agents 2026-06-05 14:41:03 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1493