This is the second part of a multi-part article on creating multi-agent research assistants using Datastax Langflow and AstraDB.
The purpose of this article is to explain how to integrate multiple Langflow streams and AstraDB to build a multi-agent application. For this project, the app will help researchers find websites on a specific topic in 3 steps:
- Check the user’s request to determine if it is a secure request.
- Find web pages that match the user’s request.
- Summarize the content of each web page.
In my last article, I set up two processes to check the security of a user’s theme and search the web for sites related to that theme. In this article, I’ll extend the web search agent process to add a verification tool to the agent.
The previous web search agent process looked like this:
The agent can access a web search tool and return a list of topic-relevant URLs it finds (and only URLs). However, the long-term goal is to add these URLs to the repository and be able to expand the study in the future. Therefore, I need to verify that the URL discovered by the web search agent already exists in the database.
astra database
First, I created a Datastax AstraDB Serverless database, added collections and keyspaces, and uploaded some sample data. This data consists of 15 URLs previously found by the web search agent. (Currently, I load the data manually, but will automate the loop in a later step.)
Longfro
Next, I need to modify the agent flow to include validation. I gave the agent another tool: the AstraDB tool. I connected this tool to my AstraDB collection and taught the agent how to use it by modifying the agent’s system prompt characters:
Modified proxy system prompt to include URL verification from repository:
After adding new tools and adjusting the system prompts of the agent, the modified agent search verification process is as follows:
Web search and verification agent process
The result is as expected: the modified proxy provides a non-duplicate list of websites related to the topic:
Web search and verification agent results
At this point, I have a process that checks user input for security. I also have an agent that returns a list of sites and compares them to those already stored in the database. The next step for the multi-agent research assistant will be to summarize the content of each website. That will be part 3.