Overview
Runtime workflow for any coding agent (Cursor, Claude Code, Codex, OpenCode): before the agent suggests a fix, it queries Scavio with site:github.com/[pkg]/issues plus the error string, surfaces the top 3 open/closed issues, and grounds the suggestion in real project activity.
Trigger
Every agent tool call where the user reports an error or asks about a dependency
Schedule
On agent tool call
Workflow Steps
Extract package and error
From the user's message or stack trace, extract the package name and error fingerprint.
Scoped GitHub SERP query
Build `site:github.com/<owner>/<pkg>/issues <error>` and POST to Scavio.
Rank by recency and reactions
Parse top 3 results; prefer open issues with recent activity.
Include in agent context
Inject issue title, URL, and top comment into the next LLM turn.
Suggest grounded fix
Agent references the actual issue thread in its answer.
Python Implementation
import os, requests
API_KEY = os.environ["SCAVIO_API_KEY"]
H = {"x-api-key": API_KEY}
def issue_context(owner, pkg, error):
q = f'site:github.com/{owner}/{pkg}/issues {error}'
r = requests.post("https://api.scavio.dev/api/v1/search",
headers=H, json={"query": q}).json()
return r.get("organic_results", [])[:3]
print(issue_context("langchain-ai", "langchain", "ToolInvocation deprecated"))JavaScript Implementation
const H = { "x-api-key": process.env.SCAVIO_API_KEY, "content-type": "application/json" };
async function issueContext(owner, pkg, error) {
const q = `site:github.com/${owner}/${pkg}/issues ${error}`;
const r = await fetch("https://api.scavio.dev/api/v1/search", {
method: "POST", headers: H, body: JSON.stringify({ query: q })
}).then(r => r.json());
return (r.organic_results || []).slice(0, 3);
}Platforms Used
Web search with knowledge graph, PAA, and AI overviews