Skip to content

BGTS Context Engine

Deterministic code-graph context for coding agents on Postgres, AGE and pgvector, with optional Jev or local re-selection of symbols.

MCP serverbetaMIT

Overview

BGTS Context Engine gives coding agents deterministic code-graph context. Ask a question like why a login timeout fires on a webhook and it returns the handful of symbols that actually answer it, ranked, budgeted and reproducible, rather than embedding-search chunks that merely read like the question. It runs on PostgreSQL with Apache AGE and pgvector and exposes MCP and REST interfaces.

The README reports an evaluation over 600 real merged changes in 12 repositories and 6 languages with two coding agents, comparing the agent alone with the agent using BCE first. A selector model named by BCE_SELECTOR, either hosted Jev or decider-2b/decider-4b on your own GPU, can optionally re-select from the ranked symbols, failing open to the plain ranking if unavailable. Docs are in English and Turkish.

What the decision model decides

TypeQuestionAnswers
Yes / noIs this ranked symbol needed to answer the question?(inferred)yes · no

How it works

  1. Index the repository into a code graph
  2. Agent asks a question via MCP or REST
  3. Engine ranks structurally relevant symbols within a budget
  4. Optional selector (Jev or local decider) re-selects
  5. Return symbols; fall back to plain ranking on failure

Strengths

  • Deterministic, reproducible context
  • Fails open when the selector is unavailable
  • Local selector option

Caveats

  • Requires Postgres with AGE and pgvector
  • Evaluation is the project's own

Getting started

pip install bgts-context-engine, then see the Quick start and docs/mcp.md.

At a glance

Type
MCP server
Status
beta
Language
Python
Runtime
MCP server + REST on PostgreSQL
Has code
yes
License
MIT

Use cases and integrations

How curated lists describe it

  • Deterministic code-graph context for coding agents on PostgreSQL, Apache AGE and pgvector, over MCP and REST; Jev or a local decider model can optionally re-select the ranked symbols, failing open to the plain ranking.

    MrJev/awesome-jev

Frequently asked questions

What does Jev do here?

Optionally re-selects from the ranked symbols; the engine works without it.

Can I avoid hosted models?

Yes, use decider-2b or decider-4b on your own GPU.

What does it need to run?

PostgreSQL with Apache AGE and pgvector.

Related projects

  • Single MCP tool that indexes a repo and has Jev rank a shortlist so a coding agent reads the right files and lines instead of grepping.

    MCP serverbetaPython
  • CLI and MCP server where Jev scores code fragments for a behaviour question and returns exact excerpts with line numbers.

    MCP serverbetaTypeScript
  • CLI and MCP server giving coding agents Jev-powered semantic search, focused reads and list picking in about a second for about a cent.

    BenchmarkbetaPython
  • MCP server and semantic index that tags shadcn-format components once and matches a plain-language brief to them deterministically.

    MCP serverbetaTypeScript
  • MCP server over Apple developer docs and WWDC transcripts that uses hybrid search, then Jev relevance scores to rank results.

    MCP serverproductionTypeScript
  • Local long-term memory for coding agents with an optional Jev reranker that orders recalled memories.

    ProjectproductionTypeScript