Request time agent config with nestjs #1111
Unanswered
blackmouse572
asked this question in
Q&A
Replies: 1 comment
-
|
Hey @blackmouse572 , Recommended pattern:
VoltAgent already supports this:
Only if configurations are truly very different and heavy, use a small LRU/TTL cache of Agent instances keyed by config hash (instead of creating one every request). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys, my usecase is specific is unknown tools, system prompt and knowledge base at runtime. It gathers data onthe database by user's id then through factories to construct options for the agent. I didn't find these options in the documents.
I think when a user requests a controller endpoint, I can create a new
VoltAgentinstance and use it. But I am concerned about resource consumption since users can send a lot of requests, and construct new instance might be overwhelmingBeta Was this translation helpful? Give feedback.
All reactions