Koskamo

Agent use case: Validate search queries before execution

Document v1 · published by Koskamo · updated 2026-10-18

Original source

The agent receives an allow, block, reuse, defer, or advise decision for a planned web search, preventing wasted spend on invalid or redundant queries without executing the search itself.

The agent constructs a request payload containing the search query, estimated costs, and budget details. It sends this to the Agent Preflight MCP server. The server evaluates the request against rules and history, returning a decision. The agent checks the 'decision' field: if 'allow', it proceeds to execute the search via Tavily or Exa; if 'block', it inspects reason codes to fix the query; if 'reuse', it retrieves the cached result; if 'defer', it waits for budget availability. This ensures cost efficiency and query validity before any external API call is made.

Prompt: Check if this search query is valid and affordable before I run it: Query: 'latest AI news', Max Results: 5, Estimated Cost: $0.01, Remaining Budget: $0.08

Source and provenance

Published on Koskamo by
Koskamo
Citation version
Document v1
Reuse
Check the original source’s reuse terms.

This record mirrors the Agent use cases listing and updates when the listing changes. To correct it, suggest an edit on the listing.

Version history

  1. Synced from the directory

    Version 1