[GH-ISSUE #3922] [FEAT]: Expose all tools, agents, llm calls, user database tables in the handler.js #2499

Closed
opened 2026-02-22 18:29:57 -05:00 by yindo · 1 comment
Owner

Originally created by @uninstallit on GitHub (May 30, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3922

What would you like to see?

Perhaps, there are limitations that I am not aware of - but when I build a custom agent - I would like the ability to have access to the whole ecosystem within an agent.

For example, lets say I want to handle a different chunking strategy - I can create one or multiple agents that can chunk, embed, and save to database tables that pertain to the authenticated user.

I think it would also be nice for an agent to be able to call another agent from within the handler - after all its just a function. Following the example above - I can have a custom agent that performs rag multiple times on the different chunking strategies - and its invoking the chunking agents from before.

The ability to have more access to the ecosystem also pertains to the agent flows where there is no agent/custom agent block, database, tool, etc.

Originally created by @uninstallit on GitHub (May 30, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3922 ### What would you like to see? Perhaps, there are limitations that I am not aware of - but when I build a custom agent - I would like the ability to have access to the whole ecosystem within an agent. For example, lets say I want to handle a different chunking strategy - I can create one or multiple agents that can chunk, embed, and save to database tables that pertain to the authenticated user. I think it would also be nice for an agent to be able to call another agent from within the handler - after all its just a function. Following the example above - I can have a custom agent that performs rag multiple times on the different chunking strategies - and its invoking the chunking agents from before. The ability to have more access to the ecosystem also pertains to the agent flows where there is no agent/custom agent block, database, tool, etc.
yindo added the enhancementfeature request labels 2026-02-22 18:29:57 -05:00
yindo closed this issue 2026-02-22 18:29:57 -05:00
Author
Owner

@timothycarambat commented on GitHub (Jun 3, 2025):

Since it is all imported code, you technically can bundle infinite functions into that handler.js file and import them at the top. This includes other agents as well - since you are calling them in the function itself the LLM does not need to explictly call them.

Ideally, an agent does one "task" and it is up to the LLM to chain them together for any given query. But if you want to invoke functions from other agents (or even other JS files), as long as the function is module.exported then you can import it and use it. There is no restriction there since it is all just evaluated as code inside the handler.

This is intentional, so that you really can do whatever you want in an agent skills.

Does that make sense? Do you have an example to share?

@timothycarambat commented on GitHub (Jun 3, 2025): Since it is all imported code, you technically can bundle infinite functions into that handler.js file and `import` them at the top. This includes other agents as well - since you are calling them in the function itself the LLM does not need to explictly call them. Ideally, an agent does one "task" and it is up to the LLM to chain them together for any given query. But if you want to invoke functions from other agents (or even other JS files), as long as the function is `module.export`ed then you can import it and use it. There is no restriction there since it is all just evaluated as code inside the handler. This is intentional, so that you really can do whatever you want in an agent skills. Does that make sense? Do you have an example to share?
yindo changed title from [FEAT]: Expose all tools, agents, llm calls, user database tables in the handler.js to [GH-ISSUE #3922] [FEAT]: Expose all tools, agents, llm calls, user database tables in the handler.js 2026-06-05 14:46:55 -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#2499