You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 29, 2025. It is now read-only.
Investigate and fix why the agent is not persisted in the API (but does persist when using ArthasGPT for example when using ArthasGPTCommandLine).
Problem
Because it's being instantiated each time, the bot can take longer to respond and loses context with follow-ups.
Clues
In VERBOSE mode, the user should not see the lines Creating Arthas agent... and Creating vector store... after each question is asked, only on load when the agent is instantiated.
In ArthasGPT the agent is kept in scope using a simple variable, but in the API a scoped agent is injected to the route on each invocation. It appears this agent is not being retained by the injector as it's undefined whenever a request is made (causing a new agent to spawn).