Search Results Now Show Graph Affordances
July 2, 2026
Postgram search now gives agents a cheap signal when a result has graph context
behind it. Compact REST, MCP, and CLI search output may include an edges
summary with a total count and relation labels. That lets an agent notice
connected context without immediately pulling neighbor content into the prompt.
The result is a smaller, more deliberate retrieval loop: search first, inspect the edge summary, then expand only when the user’s question actually needs graph context.
What Changed
Section titled “What Changed”Postgram PR #77 adds search edge affordances across the main agent surfaces:
POST /api/searchcan includeedges.countandedges.relationson search results.- MCP
searchcompact output preserves the same edge summary. pgm search --jsonandpgm search --tooninclude the summary when edges exist.- The MCP tool description now tells agents when to use
expand_graph. - CLI
--versionhandling was tightened while shipping the same release window.
Example compact search result:
{ "id": "mem_123", "type": "memory", "score": 0.82, "content": "Decision note...", "chunk": "Decision note...", "edges": { "count": 3, "relations": [ { "relation": "mentioned_in", "count": 2 }, { "relation": "blocked_by", "count": 1 } ] }}The summary intentionally does not include neighbor content. It only says that traversable context exists.
Retrieval Guidance
Section titled “Retrieval Guidance”Use the compact edge summary as a routing hint:
- Expand when the question asks about causes, provenance, decisions, dependencies, blockers, ownership, involvement, related discussions, or ambiguous search hits.
- Skip expansion when the compact result already answers a direct factual question.
- Use
expand_graph: true,pgm search --expand-graph, orpgm expand <id>when connected context is actually needed.
This keeps common recall cheap while still making graph context discoverable.