DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to replay a retrieval call to audit a bad agent change with BGTS Context Engine

Re-run the exact context an agent received and check which stage surfaced the wrong symbol.

Short answer: docker compose -f deploy/docker-compose.yml up -d; then pip install bgts-context-engine; bce migrate. All steps.

Who it is forA tech lead or reviewer who needs to explain why an agent made a bad change and wants to see exactly what it was told.

The problemWithout a record of the retrieval inputs, it is hard to tell whether the agent or the context caused a bad change.

The outcomeThe same task text against the same commit returns the same ranking, so the failing stage can be found and fixed.

What you need first

  • 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

Steps

  1. docker compose -f deploy/docker-compose.yml up -d
  2. pip install bgts-context-engine
  3. bce migrate
  4. bce index --repo /path/to/your/repo --name my-service
  5. bce context --task "fix the login timeout in the meeting webhook" --no-select (inferred, check the README)
  6. bce bench

Prompt for your agent

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.

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.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for bgts-ai-org/bgts-context-engine and "Replay a retrieval call to audit a bad agent change"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer