AI Agents: Why Double Requests Every Time?

Describe the problem/error/question

When I run my AI Agent tasks, it always sends a double request.


What is the error message (if any)?

There is no message error… the problem is that when my initial request is completed (Which is fine btw), instead to just stop there, a new request is automatically created trying to reformat my output while it’s not required.

Please share your workflow

I am scraping search engines for specific data, and then sending this data to AI for analysis.

Share the output returned by the last node

=== 1st request (GOOD)

<template>
Search Intent: Informational

User's Information Needs:
- Understanding the cost range of renting a private jet.
- Factors that influence the price (jet size, model, etc.).
- Comparison of private jet rental to commercial flights (cost-effectiveness).
- Information about the cheapest private jet options.

Key Query Focus:
- Cost of private jet rental.
- Factors impacting rental cost.
- Potential cost-saving benefits of private jet rental.
- Specific models of affordable private jets.

Practical Considerations:
- Researching different private jet charter companies.
- Evaluating the best option for their travel needs (budget, distance, etc.).
- Understanding the inclusions in the rental price (crew, fuel, etc.).
-  Comparing prices from different providers.

Assumed User Mindset:
Curious about the feasibility of private jet travel.
Potentially seeking a luxurious/efficient travel experience. 
May be exploring different options for travel and want to understand costs related to private jets.
</template>

2nd request (NOT GOOD AND NOT REQUIRE)

{
    "action": "Final Answer",
    "action_input": "Private jet rental costs can vary significantly depending on factors like the jet's size, model, and the distance of the flight.  Generally, you can expect to pay anywhere from \\$1,000 to \\$10,000 per flight hour, or even more for larger, more luxurious jets.  \n\n**Factors Influencing Price:**\n\n* **Jet Size and Model:** Smaller turboprops can be more budget-friendly, while larger jets like Gulfstream or Boeing Business Jets come with a higher price tag. \n* **Flight Distance:** Longer flights naturally cost more due to increased fuel consumption and crew expenses. \n* **Time of Year:** Peak travel seasons may lead to higher rental rates. \n* **Location:**  Departure and destination airports can impact pricing.\n* **Amenities:**  Catering, in-flight entertainment, or specific cabin configurations can add to the cost. \n\n**Comparing to Commercial Flights:**\n\nWhile private jet travel is generally more expensive than commercial flights, it offers several advantages that some travelers find worth the cost.  These include greater flexibility and convenience, reduced travel time, and enhanced comfort and privacy. For groups or individuals who value time and luxury, a private jet can actually be a more cost-effective option when time and productivity gains are factored in.\n\n**Cheapest Private Jet Options:**\n\nIf you're looking for a more affordable private jet experience, consider smaller turboprop models like the Pilatus PC-12 or the Beechcraft King Air. You may find some models available through fractional ownership or jet card programs, which offer a more accessible way to experience private jet travel. \n\n**Important Considerations:**\n\nWhen researching private jet rental, it's vital to compare quotes from different charter companies and ensure you understand what's included in the rental price.  This typically includes the cost of the crew, fuel, and landing fees, but some providers may charge extra for certain amenities.  You should clarify these details ahead of time to avoid surprises. It may be beneficial to work with a jet charter broker who can assist with comparing options and finding the best deal for your specific needs. "
}

Information on your n8n setup

n8n installed via Cloudron.

  • n8n version: n8n 1.58.1
  • Database (default: SQLite): ProgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker (Cloudron)
  • Operating system: Ubuntu 24.04 LTS

Still, nobody to help?

I use Javascript code for now and handle the API calls myself… This works but it takes longer.

Does this behavior only happen in this workflow? Or in general?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.