I’m encountering an issue with the When using the “Retrieve Documents (As Tool for AI Agent)” mode, the node returns the response as a JSON-encoded string within the text field, rather than as a structured JSON object.
For example, my Qdrant point is structured as follows:
{
I expected the node to return the retrieved documents as structured JSON objects, similar to the output in the “Get Many” mode, facilitating easier data access within the AI agent.
This behaviour is expected as the response is going to the agent as context ie. you can’t really extract anything from the response from tools to use as variables or otherwise.
If you just want to retrieve the qdrant vector store document, you can just use the qdrant store node as you’ve done and then pipe that into the agent or another LLM node.
It would help if you’re able to explain what you’re trying to achieve?
The output from the datastore is indeed quite rich — it includes things like name, picture URL, a list of items (each with its own image, description, and URL). My goal was to have the AI extract specific pieces of that data and output it in a precise format.
I tested it a bit and noticed that while the AI recognizes the data structure, but it becomes tricky when I need something very specific — like extracting the second item in the list. It doesn’t always handle that well.
That’s why I was hoping the response could be passed as structured JSON rather than an encoded string — to make it easier for the agent to navigate and work with the data.