Graph Query Tools
LLM-invocable tools for exploring the graph view over proposition data.
Wraps the GraphQuery facade as @LlmTool methods so an LLM agent can walk entity neighbourhoods, find paths between entities, and ask why a proposition holds — without any graph backend, since the facade derives edges from proposition mentions.
Scope is inherited from the delegate: the GraphQuery is constructed with its own contextId, so every tool call is confined to that context. The tools deliberately expose no contextId argument, so an agent cannot read across context boundaries (mirroring how Memory bakes the context in at construction).
All calls return read-only, human-readable Tool.Result.text. Empty results yield graceful text ("No related entities found ...", "No path found ...") rather than throwing, and an unknown proposition id yields Tool.Result.error.
Usage — registered by the consuming application alongside Memory:
val graphQuery = GraphQuery(propositionStore, contextId)
val tools: List<Tool> = GraphQueryTools.asTools(graphQuery)
// Add to the agent's tool set, e.g. together with Memory.forContext(contextId)...Parameters
the graph-query facade to delegate to; its contextId scope is inherited
Functions
Explore the entities directly or transitively related to a given entity.
Find how two entities are connected, as a chain of intermediate entities and facts.
Explain why a stored fact holds: its grounding, sources, reinforcement, status and validity.