Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.
This repository was archived by the owner on May 29, 2025. It is now read-only.

Agent not persisting between questions #1

@bennyschmidt

Description

@bennyschmidt

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiRelated to the APIbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions