diff --git a/backend/agent/run.py b/backend/agent/run.py index 45fd3e4d..6fbf3468 100644 --- a/backend/agent/run.py +++ b/backend/agent/run.py @@ -232,26 +232,6 @@ class PromptManager: else: system_content = default_system_content - if await is_enabled("knowledge_base"): - try: - from services.supabase import DBConnection - kb_db = DBConnection() - kb_client = await kb_db.client - - current_agent_id = agent_config.get('agent_id') if agent_config else None - - kb_result = await kb_client.rpc('get_combined_knowledge_base_context', { - 'p_thread_id': thread_id, - 'p_agent_id': current_agent_id, - 'p_max_tokens': 4000 - }).execute() - - if kb_result.data and kb_result.data.strip(): - system_content += "\n\n" + kb_result.data - - except Exception as e: - logger.error(f"Error retrieving knowledge base context for thread {thread_id}: {e}") - if agent_config and (agent_config.get('configured_mcps') or agent_config.get('custom_mcps')) and mcp_wrapper_instance and mcp_wrapper_instance._initialized: mcp_info = "\n\n--- MCP Tools Available ---\n" mcp_info += "You have access to external MCP (Model Context Protocol) server tools.\n" diff --git a/frontend/src/components/agents/knowledge-base/agent-knowledge-base-manager.tsx b/frontend/src/components/agents/knowledge-base/agent-knowledge-base-manager.tsx index c13281e2..a7f0cc5c 100644 --- a/frontend/src/components/agents/knowledge-base/agent-knowledge-base-manager.tsx +++ b/frontend/src/components/agents/knowledge-base/agent-knowledge-base-manager.tsx @@ -648,7 +648,7 @@ export const AgentKnowledgeBaseManager = ({ agentId, agentName }: AgentKnowledge className="pl-9" /> -