private Map<String,Object> webSearch( State state ) {
        log.debug("---WEB SEARCH---");

        String question = state.question();

        var result = WebSearchTool.of( tavilyApiKey ).apply(question);

        var webResult = result.stream()
                            .map( content -> content.textSegment().text() )
                            .collect(Collectors.joining("\n"));

        return mapOf( "documents", listOf( webResult ) );
    }
@Test
    public void WebSearchTest() {

        WebSearchTool webSearchTool = WebSearchTool.of(getTavilyApiKey());
        List<Content> webSearchResults = webSearchTool.apply("agent memory");

        String webSearchResultsText = webSearchResults.stream().map( content -> content.textSegment().text() )
                .collect(Collectors.joining("\n"));

        assertNotNull( webSearchResultsText );

        System.out.println( webSearchResultsText );

    }