Belief-native extraction
Turn raw trajectories into knowledge and decision nodes that preserve source offsets.
BCG turns agent trajectories into inspectable beliefs, evidence, confidence, and relationships—then returns the right graph state to the next model call.
Two independent records identify the same person and location.
Conversation memory preserves history. Vector memory finds similarity. BCG maintains what an agent currently believes—and makes the path to that belief inspectable.
Turn raw trajectories into knowledge and decision nodes that preserve source offsets.
Inspect the initial score, evidence contribution, and relation-derived factors separately.
Read how beliefs depend on, add context to, or contradict one another.
Track when knowledge formed, how it changed, and which session produced it.
Canonicalize repeated beliefs before linking to keep downstream structure compact.
Persist JSON and JSONL state for replay, visualization, and trajectory audits.
Default, Summary, and BCG use the same agent model and harness. Only context management changes.
accuracy over Default
accuracy over Default
Use BCG beneath your own runtime through Python or HTTP. The bundled terminal agent is only a reference integration.
Stream trajectory turns or load a completed run.
Extract, merge, link, and update confidence.
Build compact graph state for the task at hand.
Return belief context to the next model call.
In a successful BrowseComp trajectory, the model explicitly referenced stored belief IDs and confidence, then avoided repeating a completed search.
Model trace “Memory explicitly B53 says age 4, confidence .78, then B51. Answer.”Open the complete case study
The search result identifies Johanna Catharina Stoffelina Engelbrecht as age 4 and as the daughter of Mrs Alida Maria Hendrika Aletta Engelbrecht.
from bcg import BCG, BCGMemory, BCGRunner, LLMClient
memory = BCGMemory(graph=BCG())
runner = BCGRunner(
memory=memory,
llm=LLMClient(),
backend="unified",
)
result = await runner.observe_trajectory(turns)
context = memory.context(task="Decide the next action")
# Start an OpenAI-compatible construction backend
bcg construct server unified \
--config ~/.bcg/config.yaml \
--host 127.0.0.1 \
--port 8848
# Stream one turn from any agent runtime
curl -X POST http://127.0.0.1:8848/turn \
-H "Content-Type: application/json" \
-d '{"problem_id":"case-42","role":"user","content":"..."}'
# Install from source
git clone https://github.com/bigai-nlco/belief-context-graph.git
cd belief-context-graph
make install
# Launch the optional reference terminal Agent
uv run bcg
curl -LsSf https://raw.githubusercontent.com/bigai-nlco/belief-context-graph/main/install.sh | sh