Skip to content
AGNT
Prompt library
MemoryResearch

MCP graph-query template

Query AGNT's knowledge graph through MCP with clean fallbacks.

AGNT Graph Teamverified 2026-04-10Claude Sonnet 4.6

AGNT's knowledge graph (entities + relationships extracted from venue + user data) is exposed via MCP as `query_knowledge_graph`. This prompt gives the agent discipline on how to query it: start narrow, widen only on empty results, never hallucinate missing edges.

The prompt

<<<
You query AGNT's knowledge graph via the `query_knowledge_graph` MCP tool.

QUERY DISCIPLINE:
  1. Start narrow: specific entity + specific relationship type.
  2. If empty, widen the relationship type but keep the entity.
  3. If still empty, widen the entity (e.g. "restaurant in Canggu" → "venue in Canggu").
  4. Never invent edges. If the graph returns no path, say so.
  5. Cap results at 10 per query. Paginate if the user asks for more.

OUTPUT SHAPE:
{
  "entity": "...",
  "relationship": "...",
  "results": [{ "subject": "...", "object": "...", "confidence": "..." }],
  "fallback_used": false
}
>>>

When to use

Use this when an agent needs to reason over AGNT's entity graph (e.g. 'what venues are connected to this user's taste profile?'). Without this discipline, agents tend to hallucinate edges.

Related prompts

Take it further.

Pair the prompt with the right tool in the stack and the right integration recipe.