Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Playground causes knowledge base to be loaded 3 times? #2072

Open
RobSpectre opened this issue Feb 10, 2025 · 0 comments
Open

[Bug] Playground causes knowledge base to be loaded 3 times? #2072

RobSpectre opened this issue Feb 10, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@RobSpectre
Copy link

Description

Logging suggests that when running an agent in the Playground, the KnowledgeBase is loaded three times.

$ python insurance_classifier_agent.py 
INFO     Creating collection                                                                                                                                   
INFO     Loading knowledge base                                                                                                                                
INFO     Reading: data/lob_matrix.csv                                                                                                                          
INFO     Upserted batch of 16 documents.                                                                                                                       
INFO     Added 16 documents to knowledge base                                                                                                                  
INFO     Starting playground on http://localhost:7777                                                                                                          
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Agent Playground ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                                                             ┃
┃                                                                             ┃
┃  Playground URL: https://app.agno.com/playground?endpoint=localhost%3A7777  ┃
┃                                                                             ┃
┃                                                                             ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
INFO:     Will watch for changes in these directories: ['/media/rspectre/Storage/workspace/agno_insurance_classifier']
INFO:     Uvicorn running on http://localhost:7777 (Press CTRL+C to quit)
INFO:     Started reloader process [2275375] using WatchFiles
INFO     Creating collection                                                                                                                                   
INFO     Loading knowledge base                                                                                                                                
INFO     Reading: data/lob_matrix.csv                                                                                                                          
INFO     Upserted batch of 16 documents.                                                                                                                       
INFO     Added 16 documents to knowledge base                                                                                                                  
INFO     Creating collection                                                                                                                                   
INFO     Loading knowledge base                                                                                                                                
INFO     Reading: data/lob_matrix.csv                                                                                                                          
INFO     Upserted batch of 16 documents.                                                                                                                       
INFO     Added 16 documents to knowledge base                                                                                                                  
INFO:     Started server process [2275415]
INFO:     Waiting for application startup.
INFO:     Application startup complete.

Steps to Reproduce

Run an Agent in a playground with a KnowledgeBase.

knowledge_base = CSVKnowledgeBase(
    path="data/lob_matrix.csv",
    vector_db=PgVector(
        table_name="insurance_lob_matrix",
        db_url=db_url
    ),
)

knowledge_base.load(upsert=True)
storage = PostgresAgentStorage(table_name="insurance_classifier_agent", db_url=db_url)

insurance_classifier_agent = Agent(
    model=Gemini(id="gemini-2.0-pro-exp-02-05"),
    knowledge=knowledge_base,
    storage=storage,
    read_chat_history=True,
    show_tool_calls=True,
    description="""You are a helpful classifier in the insurance business.
      You use your knowledge base to classify from a company description what
      lines of business an insurance company features.
    """
)

Agent Configuration (if applicable)

Provide relevant agent configuration.

Expected Behavior

The KnowledgeBase to be loaded once.

Actual Behavior

It appears to be loaded three times.

Environment

  • Ubuntu 22.04
  • virtualenv
  • Python 3.10.12
@RobSpectre RobSpectre added the bug Something isn't working label Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant