{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "bgts-ai-org-bgts-context-engine--replay-a-retrieval-call-to-audit-an-agent",
 "repo": "bgts-ai-org/bgts-context-engine",
 "repo_url": "https://github.com/bgts-ai-org/bgts-context-engine",
 "repo_slug": "bgts-ai-org-bgts-context-engine",
 "title": "Replay a retrieval call to audit a bad agent change",
 "page_title": "How to replay a retrieval call to audit a bad agent change with BGTS Context Engine",
 "summary": "Re-run the exact context an agent received and check which stage surfaced the wrong symbol.",
 "who": "A tech lead or reviewer who needs to explain why an agent made a bad change and wants to see exactly what it was told.",
 "problem": "Without a record of the retrieval inputs, it is hard to tell whether the agent or the context caused a bad change.",
 "outcome": "The same task text against the same commit returns the same ranking, so the failing stage can be found and fixed.",
 "steps": [
  "`docker compose -f deploy/docker-compose.yml up -d`",
  "`pip install bgts-context-engine`",
  "`bce migrate`",
  "`bce index --repo /path/to/your/repo --name my-service`",
  "`bce context --task \"fix the login timeout in the meeting webhook\" --no-select` (inferred, check the README)",
  "`bce bench`"
 ],
 "agent_prompt": "Using the bgts-context-engine repository, index <target repo path> at the commit <commit id>, then run bce context with the task <task text> and the flag --no-select. Expected output: the byte-exact context pack. Verify by running the same command again and confirming the output matches.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "The README says bce bench checks determinism by running each case repeatedly, but the case format is not in the text provided, so check its arguments in the docs before use.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "Docker with Docker Compose, to run PostgreSQL 16 with Apache AGE and pgvector",
  "Python with pip",
  "A local repository to index",
  "A coding agent that can call MCP tools, or the bce command line"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/bgts-ai-org-bgts-context-engine/replay-a-retrieval-call-to-audit-an-agent/",
 "md": "https://dedupedai.com/use-cases/bgts-ai-org-bgts-context-engine/replay-a-retrieval-call-to-audit-an-agent/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/bgts-ai-org-bgts-context-engine--replay-a-retrieval-call-to-audit-an-agent.json",
 "api_version": "v1"
}
