Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Context Engineering

Context engineering is the discipline of choosing what knowledge your agent stores, how it is shaped, and what gets retrieved at the right moment. LocusGraph is the Structured Agent Knowledge layer that makes that discipline practical.

The Misconception

"Context engineering" describes a discipline, not a product category. Saying "we do context engineering" is like saying "we do software engineering" — true, but not specific enough.

Calling LocusGraph "agent memory" is also too small. Memory means recall. Knowledge means understanding. LocusGraph turns agent experience into typed, linked, scored knowledge that compounds over time, so the agent does not just remember — it becomes wiser.

Why It Matters

The difference between an agent that flounders and one that grows wiser is not the model. It is the structured agent knowledge feeding the model.

Context engineering with LocusGraph answers three questions:

  1. What do you store? Not every event deserves a place in the graph. Store decisions, learned skills, error patterns, and key facts. Skip transient noise.
  2. How do you shape it? Context IDs, payload schemas, and linking strategies determine how knowledge connects, scores, and graduates from event to pattern to skill.
  3. When do you retrieve it? Query design, scoping filters, and limit tuning control what knowledge enters the agent's context window.

Three Pillars

Schema Design

Define consistent context ID conventions and payload structures. A coding agent might use skill:react_hooks, error:null_pointer, and session:2025_03_19. Consistency makes retrieval predictable and graduation reliable.

Scoping Strategy

Use graph-level, type-level, and name-level filters to control the search space. Scoping prevents irrelevant knowledge from polluting the agent's context window.

Retrieval Tuning

Adjust query specificity, result limits, and context filters to balance precision and recall. Start narrow, widen only when needed. Confidence scoring keeps validated knowledge at the front.

Context engineering is iterative. Start with simple schemas, observe what your agent retrieves, and refine. LocusGraph's confidence scoring helps surface what works and suppress what does not.

Where LocusGraph Plays an Active Role

StageWithout LocusGraphWith LocusGraph
CaptureAppend to chat history or vector storeTyped event admitted with source, payload, links, and confidence
RetrievalSimilar text returnedValidated knowledge ranked by relevance and confidence
ReuseRe-explain context every sessionGraduated skills retrieved on demand
DecayStale snippets stay foreverContradictions lower confidence; bad knowledge fades

Next

Memory Schemas
Design context IDs, payloads, and hierarchies.
Scoping Strategies
Filter knowledge by type, name, and graph.