Cutting token costs in a Hermes agent prospecting workflow

An n8n runs every day at 8 AM and calls a through OpenRouter to find 10 possible B2B clients. For each company, it gathers an email address, phone number, a short description of what the company does, and a note on which business processes could be automated. The structured result goes back to n8n and is written into .

The workflow works, but the cost is too high. Even with a cheap model, the agent uses many tokens because it searches the web and reads full pages for every company. The possible fixes are to reduce tool output, use cache, and make prompts stricter; rebuild more of the flow in plain n8n by scraping business registries, , or for names and contact details; then use one small LLM call per company only to write the idea.

Sonar API is also being considered as a search-focused alternative, but the available details do not show its real cost or quality for this job.

Key points

  • A 10-lead daily workflow can still become costly if the agent searches and reads many web pages.
  • Shorter , cache, and stricter prompts may help reduce token use.
  • Moving contact collection into direct n8n scraping can cut down unnecessary LLM calls.
  • Use the LLM mainly for the company-specific note, not for every lookup step.
  • Sonar API may be worth testing, but its cost and quality need measurement.

Sources covering this story (2)

Read original