Skip to content

Broad-Side: lens queue via headless agent (@openrouter/agent) — sync-priced, tool-using variant #143

Description

@TheAmericanMaker

Roadmap item (see ROADMAP.md). Explores the middle tier between Broad-Side's batch API (50% pricing, no tools, single-turn) and the full interactive CodeCartographer pipeline (agent loop + tools, driven by a host).

OpenRouter's official scaffold for this is the create-headless-agent skill (OpenRouterTeam/skills): a queue worker that runs @openrouter/agent's callModel loop per prompt with local tools (grep/file/shell), retry-with-backoff, session persistence, output-schema validation, and stop conditions including maxCost(amount).

Open questions the design must answer before this is worth building:

  • Cost: sync API = ~2x batch pricing per lens. Does tool-using capability (grep first, read only what matches) recover the difference by shrinking input tokens vs Broad-Side's stuff-everything-into-context approach? Only a real comparison run answers this.
  • Overlap: the tool-using variant re-implements much of what the interactive pipeline already does. Its niche would be unattended multi-turn verification (e.g., 'confirm the finding by reading the cited line'), which batch cannot do.
  • Hybrid (the likelier winner): keep batch API for the six lens sweeps, then spend one sync-priced verification pass on the top N synthesis findings — read the cited file:line, confirm or discard each lead, promote survivors to verified status. This attacks the biggest weakness (unverified leads) at a fraction of full-pipeline cost.

Related: #133 (truncation repair), #135 (triage lens), #141 (multi-model). Retry-safety note: batch requests are pure, so resubmission is always safe; a tool-using variant must adopt the headless-agent rule (retry only before tool calls, since replaying a mutating tool double-executes it).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featFeature work planned on the Broad-Side roadmap

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions