Workflow

Hourly Multi-Agent Search Refresh Workflow

Hourly workflow to refresh search data caches for multi-agent systems. Keeps all agents grounded in current data without redundant API calls.

Overview

Multi-agent systems where each agent makes its own search calls waste credits on duplicate queries and get inconsistent results when they search at different times. This workflow centralizes search into an hourly refresh that all agents read from, ensuring consistency and reducing API costs.

Trigger

Hourly cron, every hour on the hour.

Schedule

Hourly

Workflow Steps

1

Define Shared Query Registry

Maintain a registry of search queries that multiple agents need. Each entry includes the query, platform, and which agents consume the results.

2

Execute All Registered Queries

Fetch fresh results for every query in the registry. Store results with timestamps so agents know how fresh the data is.

3

Write Cache File for Agent Consumption

Write the refreshed data to a shared cache file that all agents can read from. Include metadata about freshness and query coverage.

4

Agent Cache Reader Function

Provide a function that agents use to read from the cache instead of making direct API calls. Includes staleness checks.

Python Implementation

Python
import requests, os
H = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}
data = requests.post('https://api.scavio.dev/api/v1/search', headers=H, json={'query': 'example', 'country_code': 'us'}).json()
print(len(data.get('organic_results', [])))

JavaScript Implementation

JavaScript
const H = {'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json'};
fetch('https://api.scavio.dev/api/v1/search', {method: 'POST', headers: H, body: JSON.stringify({query: 'example', country_code: 'us'})}).then(r => r.json()).then(d => console.log(d.organic_results?.length));

Platforms Used

Google

Web search with knowledge graph, PAA, and AI overviews

YouTube

Video search with transcripts and metadata

Reddit

Community, posts & threaded comments from any subreddit

Frequently Asked Questions

Multi-agent systems where each agent makes its own search calls waste credits on duplicate queries and get inconsistent results when they search at different times. This workflow centralizes search into an hourly refresh that all agents read from, ensuring consistency and reducing API costs.

This workflow uses a hourly cron, every hour on the hour.. Hourly.

This workflow uses the following Scavio platforms: google, youtube, reddit. Each platform is called via the same unified API endpoint.

Yes. Scavio's free tier includes 250 credits per month with no credit card required. That is enough to test and validate this workflow before scaling it.

Hourly Multi-Agent Search Refresh Workflow

Hourly workflow to refresh search data caches for multi-agent systems. Keeps all agents grounded in current data without redundant API calls.